Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
robzor92 committed Dec 8, 2023
1 parent 793bc4f commit 175fa2e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions python/hsml/engine/model_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,14 @@ def _copy_or_move_hopsfs_model(

model_path_resp = self._dataset_api.get(from_hdfs_model_path)
model_path_attr = model_path_resp["attributes"]
if "datasetType" in model_path_resp and model_path_resp["datasetType"] == "DATASET": # This is needed to avoid a user exporting for example "Resources" from wiping the dataset
raise AssertionError("It is disallowed to export a root dataset path."
" Move the model to a sub-folder and try again.")
if (
"datasetType" in model_path_resp
and model_path_resp["datasetType"] == "DATASET"
): # This is needed to avoid a user exporting for example "Resources" from wiping the dataset
raise AssertionError(
"It is disallowed to export a root dataset path."
" Move the model to a sub-folder and try again."
)
elif model_path_attr.get("dir", False):
# if path is a directory, iterate of the directory content
for entry in self._dataset_api.list(
Expand Down

0 comments on commit 175fa2e

Please sign in to comment.