-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix commandline --help exception #1381
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
skyan
requested review from
andrew-openai,
jwang47 and
logankilpatrick
as code owners
October 17, 2023 06:27
mmtmn
reviewed
Oct 19, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Nice find!
etr2460
approved these changes
Dec 5, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing, thanks for the fix!
jacobbieker
pushed a commit
to withmartian/-ARCHIVED--router-evals
that referenced
this pull request
Jan 9, 2024
currently when running `oaieval --help`, it will throw an exception: ``` Traceback (most recent call last): File "/Users/yanlin/miniconda3/envs/modelenv/bin/oaieval", line 8, in <module> sys.exit(main()) File "/Users/yanlin/workspace/github/evals/evals/cli/oaieval.py", line 264, in main args = cast(OaiEvalArguments, parser.parse_args(sys.argv[1:])) File "/Users/yanlin/miniconda3/envs/modelenv/lib/python3.10/argparse.py", line 1833, in parse_args args, argv = self.parse_known_args(args, namespace) File "/Users/yanlin/miniconda3/envs/modelenv/lib/python3.10/argparse.py", line 1866, in parse_known_args namespace, args = self._parse_known_args(args, namespace) File "/Users/yanlin/miniconda3/envs/modelenv/lib/python3.10/argparse.py", line 2079, in _parse_known_args start_index = consume_optional(start_index) File "/Users/yanlin/miniconda3/envs/modelenv/lib/python3.10/argparse.py", line 2019, in consume_optional take_action(action, args, option_string) File "/Users/yanlin/miniconda3/envs/modelenv/lib/python3.10/argparse.py", line 1943, in take_action action(self, namespace, argument_values, option_string) File "/Users/yanlin/miniconda3/envs/modelenv/lib/python3.10/argparse.py", line 1106, in __call__ parser.print_help() File "/Users/yanlin/miniconda3/envs/modelenv/lib/python3.10/argparse.py", line 2567, in print_help self._print_message(self.format_help(), file) File "/Users/yanlin/miniconda3/envs/modelenv/lib/python3.10/argparse.py", line 2551, in format_help return formatter.format_help() File "/Users/yanlin/miniconda3/envs/modelenv/lib/python3.10/argparse.py", line 283, in format_help help = self._root_section.format_help() File "/Users/yanlin/miniconda3/envs/modelenv/lib/python3.10/argparse.py", line 214, in format_help item_help = join([func(*args) for func, args in self.items]) File "/Users/yanlin/miniconda3/envs/modelenv/lib/python3.10/argparse.py", line 214, in <listcomp> item_help = join([func(*args) for func, args in self.items]) File "/Users/yanlin/miniconda3/envs/modelenv/lib/python3.10/argparse.py", line 214, in format_help item_help = join([func(*args) for func, args in self.items]) File "/Users/yanlin/miniconda3/envs/modelenv/lib/python3.10/argparse.py", line 214, in <listcomp> item_help = join([func(*args) for func, args in self.items]) File "/Users/yanlin/miniconda3/envs/modelenv/lib/python3.10/argparse.py", line 540, in _format_action help_text = self._expand_help(action) File "/Users/yanlin/miniconda3/envs/modelenv/lib/python3.10/argparse.py", line 637, in _expand_help return self._get_help_string(action) % params TypeError: %o format: an integer is required, not dict ``` the reason is just a '%' symbol in help string, use `%%` instead.
Linmj-Judy
pushed a commit
to TablewareBox/evals
that referenced
this pull request
Feb 27, 2024
currently when running `oaieval --help`, it will throw an exception: ``` Traceback (most recent call last): File "/Users/yanlin/miniconda3/envs/modelenv/bin/oaieval", line 8, in <module> sys.exit(main()) File "/Users/yanlin/workspace/github/evals/evals/cli/oaieval.py", line 264, in main args = cast(OaiEvalArguments, parser.parse_args(sys.argv[1:])) File "/Users/yanlin/miniconda3/envs/modelenv/lib/python3.10/argparse.py", line 1833, in parse_args args, argv = self.parse_known_args(args, namespace) File "/Users/yanlin/miniconda3/envs/modelenv/lib/python3.10/argparse.py", line 1866, in parse_known_args namespace, args = self._parse_known_args(args, namespace) File "/Users/yanlin/miniconda3/envs/modelenv/lib/python3.10/argparse.py", line 2079, in _parse_known_args start_index = consume_optional(start_index) File "/Users/yanlin/miniconda3/envs/modelenv/lib/python3.10/argparse.py", line 2019, in consume_optional take_action(action, args, option_string) File "/Users/yanlin/miniconda3/envs/modelenv/lib/python3.10/argparse.py", line 1943, in take_action action(self, namespace, argument_values, option_string) File "/Users/yanlin/miniconda3/envs/modelenv/lib/python3.10/argparse.py", line 1106, in __call__ parser.print_help() File "/Users/yanlin/miniconda3/envs/modelenv/lib/python3.10/argparse.py", line 2567, in print_help self._print_message(self.format_help(), file) File "/Users/yanlin/miniconda3/envs/modelenv/lib/python3.10/argparse.py", line 2551, in format_help return formatter.format_help() File "/Users/yanlin/miniconda3/envs/modelenv/lib/python3.10/argparse.py", line 283, in format_help help = self._root_section.format_help() File "/Users/yanlin/miniconda3/envs/modelenv/lib/python3.10/argparse.py", line 214, in format_help item_help = join([func(*args) for func, args in self.items]) File "/Users/yanlin/miniconda3/envs/modelenv/lib/python3.10/argparse.py", line 214, in <listcomp> item_help = join([func(*args) for func, args in self.items]) File "/Users/yanlin/miniconda3/envs/modelenv/lib/python3.10/argparse.py", line 214, in format_help item_help = join([func(*args) for func, args in self.items]) File "/Users/yanlin/miniconda3/envs/modelenv/lib/python3.10/argparse.py", line 214, in <listcomp> item_help = join([func(*args) for func, args in self.items]) File "/Users/yanlin/miniconda3/envs/modelenv/lib/python3.10/argparse.py", line 540, in _format_action help_text = self._expand_help(action) File "/Users/yanlin/miniconda3/envs/modelenv/lib/python3.10/argparse.py", line 637, in _expand_help return self._get_help_string(action) % params TypeError: %o format: an integer is required, not dict ``` the reason is just a '%' symbol in help string, use `%%` instead.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
currently when running
oaieval --help
, it will throw an exception:the reason is just a '%' symbol in help string, use
%%
instead.