diff options
author | Daniel Bevenius <daniel.bevenius@gmail.com> | 2024-02-12 09:38:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-12 10:38:44 +0200 |
commit | 4a46d2b7923be83d6019251671ee63aa1fa0d6bc (patch) | |
tree | e5b9b1a9f7bf3fef826674f9808d0936b00ebb95 | |
parent | 3b169441dfe8e420f88d1592708cc2a871daadb9 (diff) |
llava : remove prog parameter from ArgumentParser (#5457)
* llava: remove prog parameter from ArgumentParser
This commit removes the `prog` parameter from `ArgumentParser`
so that it uses the default value which is the name of the script.
The motivation for this change is that currently the usage output looks
like this:
```console
$ python examples/llava/convert-image-encoder-to-gguf.py --help
usage: convert_hf_to_gguf.py [-h] ...
```
And with this change it will look like this:
```console
$ python examples/llava/convert-image-encoder-to-gguf.py --help
usage: convert-image-encoder-to-gguf.py [-h] ...
```
Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com>
* ci: add W503 to flake8 ignore list
This commit adds W503 to the ignore list for flake8. This is done to
avoid the following error:
W503 line break before binary operator
Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com>
---------
Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com>
-rw-r--r-- | .github/workflows/python-lint.yml | 2 | ||||
-rw-r--r-- | examples/llava/convert-image-encoder-to-gguf.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/.github/workflows/python-lint.yml b/.github/workflows/python-lint.yml index 56d17b66..ea0a05ea 100644 --- a/.github/workflows/python-lint.yml +++ b/.github/workflows/python-lint.yml @@ -16,5 +16,5 @@ jobs: - name: flake8 Lint uses: py-actions/flake8@v2 with: - ignore: "E203,E211,E221,E225,E231,E241,E251,E261,E266,E501,E701,E704" + ignore: "E203,E211,E221,E225,E231,E241,E251,E261,E266,E501,E701,E704,W503" exclude: "examples/*,examples/*/**,*/**/__init__.py" diff --git a/examples/llava/convert-image-encoder-to-gguf.py b/examples/llava/convert-image-encoder-to-gguf.py index f5a3c9b4..e204b56b 100644 --- a/examples/llava/convert-image-encoder-to-gguf.py +++ b/examples/llava/convert-image-encoder-to-gguf.py @@ -71,7 +71,7 @@ def bytes_to_unicode(): return dict(zip(bs, cs)) -ap = argparse.ArgumentParser(prog="convert_hf_to_gguf.py") +ap = argparse.ArgumentParser() ap.add_argument("-m", "--model-dir", help="Path to model directory cloned from HF Hub", required=True) ap.add_argument("--use-f32", action="store_true", default=False, help="Use f32 instead of f16") ap.add_argument("--text-only", action="store_true", required=False, |