Skip to content

Commit

Permalink
feat: call download on bmz resources for url compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
melisande-c committed Nov 13, 2024
1 parent 7893788 commit c726111
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/careamics/model_io/bioimage/model_description.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,14 +302,14 @@ def extract_model_path(model_desc: ModelDescr) -> Tuple[Path, Path]:
Tuple[Path, Path]
Weights and configuration paths.
"""
weights_path = model_desc.weights.pytorch_state_dict.source.path
weights_path = model_desc.weights.pytorch_state_dict.download().path

if len(model_desc.attachments) == 1:
config_path = model_desc.attachments[0].source.path
config_path = model_desc.attachments[0].download().path
else:
for file in model_desc.attachments:
if file.source.path.suffix == ".yml":
config_path = file.source.path
config_path = file.download().path
break

if config_path is None:
Expand Down

0 comments on commit c726111

Please sign in to comment.