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

Update monaihosting download method #8364

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

yiheng-wang-nv
Copy link
Contributor

Related to Project-MONAI/model-zoo#723.

Description

Currently, bundle download on source "monaihosting" uses fixed download url according to the function _get_monaihosting_bundle_url.
A possible enhancement if to support on bundles that are hosted in different places.

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests --disttests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

Signed-off-by: Yiheng Wang <[email protected]>
@yiheng-wang-nv
Copy link
Contributor Author

Hi @ericspod @KumoLiu , with this PR, if a bundle in model zoo is not saved in default host, it can still be downloaded according to the model_info.json file.

For example:

root@sys:/workspace/ngc_bundles# python -m monai.bundle download "mednist_ddpm" --bundle_dir "bundles/"
2025-02-24 06:41:16,443 - INFO - --- input summary of monai.bundle.scripts.download ---
2025-02-24 06:41:16,443 - INFO - > name: 'mednist_ddpm'
2025-02-24 06:41:16,443 - INFO - > bundle_dir: 'bundles/'
2025-02-24 06:41:16,443 - INFO - > source: 'monaihosting'
2025-02-24 06:41:16,443 - INFO - > remove_prefix: 'monai_'
2025-02-24 06:41:16,443 - INFO - > progress: True
2025-02-24 06:41:16,443 - INFO - ---


mednist_ddpm_v1.0.0.zip: 0.00B [00:00, ?B/s]
2025-02-24 06:41:18,000 - ERROR - Download failed from https://api.ngc.nvidia.com/v2/models/nvidia/monaihosting/mednist_ddpm/versions/1.0.0/files/mednist_ddpm_v1.0.0.zip to /tmp/tmpqe34ul1g/mednist_ddpm_v1.0.0.zip.
mednist_ddpm_v1.0.0.zip: 16.4MB [00:02, 5.93MB/s]                                                                              
2025-02-24 06:41:21,207 - INFO - Downloaded: bundles/mednist_ddpm_v1.0.0.zip
2025-02-24 06:41:21,207 - INFO - Expected md5 is None, skip md5 check for file bundles/mednist_ddpm_v1.0.0.zip.
2025-02-24 06:41:21,207 - INFO - Writing into directory: bundles.
2025-02-24 06:41:21,296 - WARNING - Package version is not available. Skipping version check.

@KumoLiu
Copy link
Contributor

KumoLiu commented Feb 24, 2025

/build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants