MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / _download_from_bundle_info

Function _download_from_bundle_info

monai/bundle/scripts.py:207–214  ·  view source on GitHub ↗
(download_path: Path, filename: str, version: str, progress: bool)

Source from the content-addressed store, hash-verified

205
206
207def _download_from_bundle_info(download_path: Path, filename: str, version: str, progress: bool) -> None:
208 bundle_info = get_bundle_info(bundle_name=filename, version=version)
209 if not bundle_info:
210 raise ValueError(f"Bundle info not found for {filename} v{version}.")
211 url = bundle_info["browser_download_url"]
212 filepath = download_path / f"{filename}_v{version}.zip"
213 download_url(url=url, filepath=filepath, hash_val=None, progress=progress)
214 extractall(filepath=filepath, output_dir=download_path, has_base=True)
215
216
217def _add_ngc_prefix(name: str, prefix: str = "monai_") -> str:

Callers 1

downloadFunction · 0.85

Calls 3

download_urlFunction · 0.90
extractallFunction · 0.90
get_bundle_infoFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…