Skip to content

Commit

Permalink
support relative paths in sparseml.tarnsformers.export_onnx (#1699)
Browse files Browse the repository at this point in the history
  • Loading branch information
bfineran committed Aug 10, 2023
1 parent 8e4dc20 commit 45f051a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sparseml/transformers/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,9 @@ def export(
data_args: Optional[str] = None,
one_shot: Optional[str] = None,
):
if os.path.exists(model_path):
# expand to absolute path to support downstream logic
model_path = os.path.abspath(model_path)
export_transformer_to_onnx(
task=task,
model_path=model_path,
Expand Down

0 comments on commit 45f051a

Please sign in to comment.