Skip to content

Cleaning up --help: Gate Evaluation Arguments #885

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

Merged
merged 1 commit into from
Jul 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 25 additions & 18 deletions cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,31 @@ def add_arguments_for_verb(parser, verb: str):
choices=["fast", "cpu", "cuda", "mps"],
help="Hardware device to use. Options: cpu, cuda, mps",
)

if verb == "eval":
_add_evaluation_args(parser)

parser.add_argument(
"--hf-token",
type=str,
default=None,
help="A HuggingFace API token to use when downloading model artifacts",
)
parser.add_argument(
"--model-directory",
type=Path,
default=default_model_dir,
help=f"The directory to store downloaded model artifacts. Default: {default_model_dir}",
)
parser.add_argument(
"--port",
type=int,
default=5000,
help="Port for the web server in browser mode",
)

# Add CLI Args specific to Model Evaluation
def _add_evaluation_args(parser) -> None:
parser.add_argument(
"--tasks",
nargs="+",
Expand All @@ -249,24 +274,6 @@ def add_arguments_for_verb(parser, verb: str):
default=None,
help="Maximum length sequence to evaluate",
)
parser.add_argument(
"--hf-token",
type=str,
default=None,
help="A HuggingFace API token to use when downloading model artifacts",
)
parser.add_argument(
"--model-directory",
type=Path,
default=default_model_dir,
help=f"The directory to store downloaded model artifacts. Default: {default_model_dir}",
)
parser.add_argument(
"--port",
type=int,
default=5000,
help="Port for the web server in browser mode",
)


def arg_init(args):
Expand Down
Loading