Skip to content

Commit

Permalink
[HWORKS-1737][Append] Download model files from version dir if Files …
Browse files Browse the repository at this point in the history
…dir not found
  • Loading branch information
javierdlrm committed Nov 28, 2024
1 parent 7cc71ae commit 8d6d193
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/hsml/engine/model_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,11 @@ def update_download_progress(n_dirs, n_files, done=False):
projects_index = from_hdfs_model_path.find("/Projects", 0)
from_hdfs_model_path = from_hdfs_model_path[projects_index:]

if not self._dataset_api.path_exists(from_hdfs_model_path):
# if Files directory doesn't exist, download files from the model version
# directory for backwards compatibility with the old model file structure
from_hdfs_model_path = model_instance.version_path

self._download_model_from_hopsfs(
from_hdfs_model_path=from_hdfs_model_path,
to_local_path=local_path,
Expand Down

0 comments on commit 8d6d193

Please sign in to comment.