Skip to content

Commit 667dee4

Browse files
authored
Merge branch 'dev' into inverse_threading_fix
2 parents 3479f04 + 8f3d8e8 commit 667dee4

File tree

3 files changed

+4
-16
lines changed

3 files changed

+4
-16
lines changed

monai/bundle/scripts.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -312,21 +312,6 @@ def _get_ngc_token(api_key, retry=0):
312312
return token
313313

314314

315-
def _get_latest_bundle_version_monaihosting(name):
316-
full_url = f"{MONAI_HOSTING_BASE_URL}/{name.lower()}"
317-
if has_requests:
318-
resp = requests.get(full_url)
319-
try:
320-
resp.raise_for_status()
321-
model_info = json.loads(resp.text)
322-
return model_info["model"]["latestVersionIdStr"]
323-
except requests.exceptions.HTTPError:
324-
# for monaihosting bundles, if cannot find the version, get from model zoo model_info.json
325-
return get_bundle_versions(name)["latest_version"]
326-
327-
raise ValueError("NGC API requires requests package. Please install it.")
328-
329-
330315
def _examine_monai_version(monai_version: str) -> tuple[bool, str]:
331316
"""Examine if the package version is compatible with the MONAI version in the metadata."""
332317
version_dict = get_versions()
@@ -430,7 +415,7 @@ def _get_latest_bundle_version(
430415
name = _add_ngc_prefix(name)
431416
return _get_latest_bundle_version_ngc(name)
432417
elif source == "monaihosting":
433-
return _get_latest_bundle_version_monaihosting(name)
418+
return get_bundle_versions(name, repo="Project-MONAI/model-zoo", tag="dev")["latest_version"]
434419
elif source == "ngc_private":
435420
headers = kwargs.pop("headers", {})
436421
name = _add_ngc_prefix(name)

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ torchvision
2929
psutil
3030
cucim-cu12; platform_system == "Linux" and python_version >= "3.9" and python_version <= "3.10"
3131
openslide-python
32+
openslide-bin
3233
imagecodecs; platform_system == "Linux" or platform_system == "Darwin"
3334
tifffile; platform_system == "Linux" or platform_system == "Darwin"
3435
pandas

setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ all =
6464
psutil
6565
cucim-cu12; platform_system == "Linux" and python_version >= '3.9' and python_version <= '3.10'
6666
openslide-python
67+
openslide-bin
6768
tifffile; platform_system == "Linux" or platform_system == "Darwin"
6869
imagecodecs; platform_system == "Linux" or platform_system == "Darwin"
6970
pandas
@@ -120,6 +121,7 @@ cucim =
120121
cucim-cu12; platform_system == "Linux" and python_version >= '3.9' and python_version <= '3.10'
121122
openslide =
122123
openslide-python
124+
openslide-bin
123125
tifffile =
124126
tifffile; platform_system == "Linux" or platform_system == "Darwin"
125127
imagecodecs =

0 commit comments

Comments
 (0)