Skip to content

Commit

Permalink
Fix incorrect repo name during bundle download (#7929)
Browse files Browse the repository at this point in the history
Fixes #7928

### Description

Only use env var when source is `ngc_private`.

### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] 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: YunLiu <55491388+KumoLiu@users.noreply.github.com>
  • Loading branch information
KumoLiu authored Jul 18, 2024
1 parent 85ab9f4 commit 7e4f141
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion monai/bundle/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ def download(
if repo_ is None:
org_ = os.getenv("NGC_ORG", None)
team_ = os.getenv("NGC_TEAM", None)
if org_ is not None:
if org_ is not None and source_ == "ngc_private":
repo_ = f"org/{org_}/team/{team_}" if team_ is not None else f"org/{org_}"
else:
repo_ = "Project-MONAI/model-zoo/hosting_storage_v1"
Expand Down

0 comments on commit 7e4f141

Please sign in to comment.