Skip to content

Commit

Permalink
Fixed bug. Changed default value
Browse files Browse the repository at this point in the history
  • Loading branch information
franalgaba committed Dec 12, 2023
1 parent 27a3445 commit 86fc31b
Show file tree
Hide file tree
Showing 3 changed files with 569 additions and 4 deletions.
5 changes: 2 additions & 3 deletions giza/commands/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def download_original(
model_id: int = typer.Option(None, help="The ID of the model"),
version_id: int = typer.Option(None, help="The ID of the version"),
output_path: str = typer.Option(
"onnx_model", "--output-path", "-o", help="Path to output the ONNX model"
"model.onnx", "--output-path", "-o", help="Path to output the ONNX model"
),
debug: Optional[bool] = DEBUG_OPTION,
) -> None:
Expand All @@ -318,9 +318,8 @@ def download_original(
raise ValueError(f"Model version status is not completed {version.status}")

echo("ONNX model is ready, downloading! ✅")
onnx_model = client.download(model_id, version.version)
onnx_model = client.download_original(model_id, version.version)

os.makedirs(os.path.dirname(output_path), exist_ok=True)
with open(output_path, 'wb') as f:
f.write(onnx_model)

Expand Down
Loading

0 comments on commit 86fc31b

Please sign in to comment.