From 2469deedccb349713d305352d54cdfdd27561a82 Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Wed, 4 Oct 2023 12:39:39 +0200 Subject: [PATCH] Normalize a bit. --- docs/source/basic_tutorials/launcher.md | 14 +++++++------- update_doc.py | 5 +---- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/docs/source/basic_tutorials/launcher.md b/docs/source/basic_tutorials/launcher.md index 27b8c70e..62abe8c6 100644 --- a/docs/source/basic_tutorials/launcher.md +++ b/docs/source/basic_tutorials/launcher.md @@ -77,7 +77,7 @@ Options: [possible values: float16, bfloat16] ``` -## trust-remote-code +## TRUST_REMOTE_CODE ```shell --trust-remote-code Whether you want to execute hub modelling code. Explicitly passing a `revision` is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision @@ -251,7 +251,7 @@ Options: [env: WEIGHTS_CACHE_OVERRIDE=] ``` -## disable-custom-kernels +## DISABLE_CUSTOM_KERNELS ```shell --disable-custom-kernels For some models (like bloom), text-generation-inference implemented custom cuda kernels to speed up inference. Those kernels were only tested on A100. Use this flag to disable them if you're running on different hardware and encounter issues @@ -291,7 +291,7 @@ Options: [env: ROPE_FACTOR=] ``` -## json-output +## JSON_OUTPUT ```shell --json-output Outputs the logs in JSON format (useful for telemetry) @@ -323,7 +323,7 @@ Options: [env: WATERMARK_DELTA=] ``` -## ngrok +## NGROK ```shell --ngrok Enable ngrok tunneling @@ -347,19 +347,19 @@ Options: [env: NGROK_EDGE=] ``` -## env +## ENV ```shell -e, --env Display a lot of information about your runtime environment ``` -## help +## HELP ```shell -h, --help Print help (see a summary with '-h') ``` -## version +## VERSION ```shell -V, --version Print version diff --git a/update_doc.py b/update_doc.py index 4f6efe76..6206e211 100644 --- a/update_doc.py +++ b/update_doc.py @@ -32,6 +32,7 @@ def main(): header = tokens[-1][:-1] else: header = line.split("--")[-1] + header = header.upper().replace("-", "_") block.append(line) @@ -39,10 +40,6 @@ def main(): final_doc += f"## {header}\n```shell\n{rendered_block}\n```\n" block = [] - print(final_doc) - - - filename = "docs/source/basic_tutorials/launcher.md" if args.check: with open(filename, "r") as f: