Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HWORKS-1737][Append] Download model files from version dir if Files dir not found #418

Merged
merged 1 commit into from
Nov 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading