Skip to content

Commit

Permalink
rename performance to optim-level in legacy auto api (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
bfineran committed May 4, 2023
1 parent 918dc92 commit bec4f0d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/sparsify/cli/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def _parse_run_args_to_auto(sparse_transfer: bool, **kwargs):
task=kwargs["use_case"],
dataset=kwargs["data"],
save_directory=kwargs["working_dir"],
performance=kwargs["optim_level"],
optim_level=kwargs["optim_level"],
base_model=kwargs["model"],
recipe=kwargs["recipe"],
recipe_args=kwargs["recipe_args"] or {},
Expand Down
12 changes: 5 additions & 7 deletions src/sparsify/schemas/auto_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,13 @@ class APIArgs(BaseModel):
description="Absolute path to save directory",
default=DEFAULT_OUTPUT_DIRECTORY,
)
performance: Union[str, float] = Field(
title="performance",
optim_level: float = Field(
title="optim_level",
description=(
"Preferred tradeoff between accuracy and performance. Can be a string or a "
"float value in the range [0, 1]. Currently supported strings (and their "
"respective float values are `accuracy` (0), `balanced` (0.5), and "
"`performant` (1.0)"
"Preferred tradeoff between accuracy and performance. "
"Float value in the range [0, 1]. Default 0.5"
),
default="balanced",
default=0.5,
)
base_model: Optional[str] = Field(
title="base_model",
Expand Down

0 comments on commit bec4f0d

Please sign in to comment.