Skip to content

Commit 39c56e3

Browse files
authored
[bugfix] enforce that all transformer deployement files are downloaded by pipeline (#1303)
1 parent d811296 commit 39c56e3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/deepsparse/transformers/helpers.py

+3
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ def get_deployment_path(model_path: str) -> Tuple[str, str]:
7474
elif model_path.startswith("zoo:"):
7575
zoo_model = Model(model_path)
7676
deployment_path = zoo_model.deployment.path
77+
for deployment_file in zoo_model.deployment.files:
78+
# force download of any missing files in deployment directory
79+
deployment_file.path
7780
return deployment_path, os.path.join(deployment_path, _MODEL_DIR_ONNX_NAME)
7881
elif model_path.startswith("hf:"):
7982
from huggingface_hub import snapshot_download

0 commit comments

Comments
 (0)