Skip to content
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

A bug in argument parser. #941

Open
ChenDaiwei-99 opened this issue Dec 10, 2024 · 0 comments
Open

A bug in argument parser. #941

ChenDaiwei-99 opened this issue Dec 10, 2024 · 0 comments

Comments

@ChenDaiwei-99
Copy link

Issue:
In the original code:
e2e_rlhf.py line 68

parser.add_argument(
  "--reward-model",
  type=lambda x: x.replace("facebook/opt-", ""),
  default="350m",
  choices=("350m"),
  help="Which facebook/opt-* model to use for Reward (step 2)",
)

The choices argument is mistakenly defined as a string instead of a tuple. This causes choices to be interpreted as a sequence of characters ('3', '5', '0', 'm') rather than a single valid choice.

Solution:
To fix the issue, define choices as a tuple by adding a trailing comma:

choices=("350m",)
This ensures that choices is correctly interpreted as a tuple containing a single element, "350m".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant