Skip to content

Commit 1ce127d

Browse files
committed
fix comment 3
Signed-off-by: Mingxin Zheng <[email protected]>
1 parent cbfd184 commit 1ce127d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

monai/bundle/scripts.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,8 @@ def _get_latest_bundle_version_ngc(name: str, repo: str | None = None, headers:
372372
# if the package version is not available or the model is compatible with the package version
373373
is_compatible, _ = _examine_monai_version(metadata["monai_version"])
374374
if is_compatible:
375+
if version != latest_versions[0]:
376+
logger.info(f"Latest version is {latest_versions[0]}, but the compatible version is {version}.")
375377
return version
376378

377379
# if no compatible version is found, return the latest version
@@ -552,8 +554,8 @@ def download(
552554
version_ = _get_latest_bundle_version(source=source_, name=name_, repo=repo_, headers=headers)
553555
if source_ == "github":
554556
if version_ is not None:
555-
name_ = "_v".join([name_, version_])
556-
_download_from_github(repo=repo_, download_path=bundle_dir_, filename=name_, progress=progress_)
557+
name_ver = "_v".join([name_, version_])
558+
_download_from_github(repo=repo_, download_path=bundle_dir_, filename=name_ver, progress=progress_)
557559
elif source_ == "monaihosting":
558560
_download_from_monaihosting(download_path=bundle_dir_, filename=name_, version=version_, progress=progress_)
559561
elif source_ == "ngc":

0 commit comments

Comments
 (0)