Skip to content

Commit 4a46d2b

Browse files
authored
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 <[email protected]> * 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 <[email protected]> --------- Signed-off-by: Daniel Bevenius <[email protected]>
1 parent 3b16944 commit 4a46d2b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/python-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ jobs:
1616
- name: flake8 Lint
1717
uses: py-actions/flake8@v2
1818
with:
19-
ignore: "E203,E211,E221,E225,E231,E241,E251,E261,E266,E501,E701,E704"
19+
ignore: "E203,E211,E221,E225,E231,E241,E251,E261,E266,E501,E701,E704,W503"
2020
exclude: "examples/*,examples/*/**,*/**/__init__.py"

examples/llava/convert-image-encoder-to-gguf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def bytes_to_unicode():
7171
return dict(zip(bs, cs))
7272

7373

74-
ap = argparse.ArgumentParser(prog="convert_hf_to_gguf.py")
74+
ap = argparse.ArgumentParser()
7575
ap.add_argument("-m", "--model-dir", help="Path to model directory cloned from HF Hub", required=True)
7676
ap.add_argument("--use-f32", action="store_true", default=False, help="Use f32 instead of f16")
7777
ap.add_argument("--text-only", action="store_true", required=False,

0 commit comments

Comments
 (0)