Skip to content

Commit

Permalink
[bugfix] enforce that all transformer deployement files are downloade…
Browse files Browse the repository at this point in the history
…d by pipeline (#1303)
  • Loading branch information
bfineran committed Oct 10, 2023
1 parent d811296 commit 39c56e3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/deepsparse/transformers/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ def get_deployment_path(model_path: str) -> Tuple[str, str]:
elif model_path.startswith("zoo:"):
zoo_model = Model(model_path)
deployment_path = zoo_model.deployment.path
for deployment_file in zoo_model.deployment.files:
# force download of any missing files in deployment directory
deployment_file.path
return deployment_path, os.path.join(deployment_path, _MODEL_DIR_ONNX_NAME)
elif model_path.startswith("hf:"):
from huggingface_hub import snapshot_download
Expand Down

0 comments on commit 39c56e3

Please sign in to comment.