Skip to content

Commit

Permalink
[cherry-pick][model.download] fix function returning nothing (#420) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dsikka authored Feb 1, 2024
1 parent c9c22e2 commit d332f67
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/sparsezoo/model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,23 +705,23 @@ def _download(
)
):
file.download(destination_path=directory_path)
return True
validations = True
else:
_LOGGER.warning(
f"Failed to download file {file.name}. The url of the file is None."
)
return False
validations = False

elif isinstance(file, Recipes):
validations = (
validations = all(
self._download(_file, directory_path) for _file in file.recipes
)

else:
validations = (
validations = all(
self._download(_file, directory_path) for _file in file.values()
)
return all(validations)
return validations

def _sample_outputs_list_to_dict(
self,
Expand Down

0 comments on commit d332f67

Please sign in to comment.