Skip to content

Commit e9b9aa1

Browse files
release 0.6.0 version (#1223)
* release 0.6.0 version Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> * disable bundle integration tests - temporarily Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> * fix for windows Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> * Fix training for bundle on windows Signed-off-by: SACHIDANAND ALLE <sachidanand.alle@gmail.com> Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> Signed-off-by: SACHIDANAND ALLE <sachidanand.alle@gmail.com>
1 parent 9e97fe5 commit e9b9aa1

9 files changed

Lines changed: 59 additions & 9 deletions

File tree

docs/source/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ and supported visualization tools with latest release of MONAI Label. Weekly pre
2121

2222
Current Milestone Release of MONAI Label:
2323

24-
* `0.5.2 <https://pypi.org/project/monailabel/>`_
24+
* `0.6.0 <https://pypi.org/project/monailabel/>`_
2525

2626
MONAI Label Supported Stable Visualization Tools:
2727

docs/source/whatsnew.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,28 @@
1515
What's New
1616
==========
1717

18+
0.6.0
19+
=====
20+
21+
- Pathology Improvements
22+
23+
- `NuClick annotation model <https://github.com/Project-MONAI/model-zoo/tree/dev/models/pathology_nuclick_annotation>`_
24+
- `Nuclei classification model <https://github.com/Project-MONAI/model-zoo/tree/dev/models/pathology_nuclei_classification>`_
25+
- `HoverNet model <https://github.com/Project-MONAI/model-zoo/tree/dev/models/pathology_nuclei_segmentation_classification>`_
26+
27+
- QuPath Improvements
28+
29+
- User experience enhancements
30+
- MONAI Label specific Toolbar actions
31+
- Drag and Drop ROI to run auto-segmentation models
32+
- Single click to run interaction models (NuClick)
33+
- Support Next Sample/ROI for Active Learning
34+
35+
- Experiment Management
36+
- 3D Slicer: Detection model support in MONAI Bundle App for Radiology use-case
37+
- Multi-GPU/Multi-Threaded support for Batch Inference
38+
39+
1840
0.5.2
1941
=====
2042

monailabel/interfaces/app.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
from monailabel.interfaces.tasks.train import TrainTask
4949
from monailabel.interfaces.utils.wsi import create_infer_wsi_tasks
5050
from monailabel.tasks.activelearning.random import Random
51+
from monailabel.tasks.train.bundle import BundleTrainTask
5152
from monailabel.utils.async_tasks.task import AsyncTask
5253
from monailabel.utils.others.generic import (
5354
file_checksum,
@@ -765,6 +766,10 @@ def model_file(self, model):
765766
task = self._infers.get(model)
766767
return task.get_path() if task else None
767768

769+
def bundle_path(self, model):
770+
task = self._trainers.get(model)
771+
return task.bundle_path if isinstance(task, BundleTrainTask) else None
772+
768773
def model_info(self, model):
769774
file = self.model_file(model)
770775
if not file or not os.path.exists(file):

monailabel/utils/async_tasks/task.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ def run(method: str, request=None, params=None, force_sync=False, enqueue=False)
3333
params = params if params is not None else {}
3434
request.update(params)
3535

36+
# Support bundle/scripts over windows
37+
bundle_path = instance.bundle_path(request.get("model"))
38+
if bundle_path:
39+
request["bundle_path"] = bundle_path
40+
3641
logger.info(f"{method.capitalize()} request: {request}")
3742
if force_sync:
3843
if method == "batch_infer":

monailabel/utils/async_tasks/utils.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ def _task_func(task, method, callback=None):
4646
my_env["MASTER_ADDR"] = "127.0.0.1"
4747
my_env["MASTER_PORT"] = str(random.randint(1234, 1334))
4848

49+
logger.info("Before:: " + my_env["PYTHONPATH"])
50+
bundle_path = request.get("bundle_path")
51+
if bundle_path and os.path.exists(bundle_path):
52+
my_env["PYTHONPATH"] = my_env.get("PYTHONPATH") + os.pathsep + bundle_path
53+
logger.info("After:: " + my_env["PYTHONPATH"])
54+
4955
cmd = [
5056
sys.executable,
5157
"-m",

runtests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ function run_integration_tests() {
473473
if [ $doNetTests = true ]; then
474474
run_integration_tests "radiology" "tests/data/dataset/local/spleen" "deepedit,segmentation_spleen,segmentation,deepgrow_2d,deepgrow_3d" "."
475475
run_integration_tests "pathology" "tests/data/pathology" "segmentation_nuclei,nuclick,classification_nuclei" "."
476-
run_integration_tests "monaibundle" "tests/data/dataset/local/spleen" "spleen_ct_segmentation,spleen_deepedit_annotation,swin_unetr_btcv_segmentation" "bundles"
476+
#run_integration_tests "monaibundle" "tests/data/dataset/local/spleen" "spleen_ct_segmentation,spleen_deepedit_annotation,swin_unetr_btcv_segmentation" "bundles"
477477
run_integration_tests "endoscopy" "tests/data/endoscopy" "tooltracking,inbody,deepedit" "."
478-
run_integration_tests "monaibundle" "tests/data/detection" "lung_nodule_ct_detection" "detection"
478+
#run_integration_tests "monaibundle" "tests/data/detection" "lung_nodule_ct_detection" "detection"
479479
fi

sample-apps/pathology/lib/configs/classification_nuclei.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
import lib.infers
1717
import lib.trainers
18-
from monai.bundle import download
18+
from monai.bundle import download, get_bundle_versions
1919

2020
from monailabel.interfaces.config import TaskConfig
2121
from monailabel.interfaces.tasks.infer_v2 import InferTask
@@ -29,7 +29,11 @@ def init(self, name: str, model_dir: str, conf: Dict[str, str], planner: Any, **
2929
super().init(name, model_dir, conf, planner, **kwargs)
3030

3131
bundle_name = "pathology_nuclei_classification"
32-
bundle_version = None
32+
repo_owner, repo_name, tag_name = "Project-MONAI/model-zoo/hosting_storage_v1".split("/")
33+
bundle_version = get_bundle_versions(bundle_name, repo=f"{repo_owner}/{repo_name}", tag=tag_name)[
34+
"latest_version"
35+
]
36+
3337
self.bundle_path = os.path.join(self.model_dir, bundle_name)
3438
if not os.path.exists(self.bundle_path):
3539
download(name=bundle_name, version=bundle_version, bundle_dir=self.model_dir)

sample-apps/pathology/lib/configs/hovernet_nuclei.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
import lib.infers
1717
import lib.trainers
18-
from monai.bundle import download
18+
from monai.bundle import download, get_bundle_versions
1919

2020
from monailabel.interfaces.config import TaskConfig
2121
from monailabel.interfaces.tasks.infer_v2 import InferTask
@@ -29,7 +29,11 @@ def init(self, name: str, model_dir: str, conf: Dict[str, str], planner: Any, **
2929
super().init(name, model_dir, conf, planner, **kwargs)
3030

3131
bundle_name = "pathology_nuclei_segmentation_classification"
32-
bundle_version = None
32+
repo_owner, repo_name, tag_name = "Project-MONAI/model-zoo/hosting_storage_v1".split("/")
33+
bundle_version = get_bundle_versions(bundle_name, repo=f"{repo_owner}/{repo_name}", tag=tag_name)[
34+
"latest_version"
35+
]
36+
3337
self.bundle_path = os.path.join(self.model_dir, bundle_name)
3438
if not os.path.exists(self.bundle_path):
3539
download(name=bundle_name, version=bundle_version, bundle_dir=self.model_dir)

sample-apps/pathology/lib/configs/nuclick.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
import lib.infers
1717
import lib.trainers
18-
from monai.bundle import download
18+
from monai.bundle import download, get_bundle_versions
1919

2020
from monailabel.interfaces.config import TaskConfig
2121
from monailabel.interfaces.tasks.infer_v2 import InferTask
@@ -29,7 +29,11 @@ def init(self, name: str, model_dir: str, conf: Dict[str, str], planner: Any, **
2929
super().init(name, model_dir, conf, planner, **kwargs)
3030

3131
bundle_name = "pathology_nuclick_annotation"
32-
bundle_version = None
32+
repo_owner, repo_name, tag_name = "Project-MONAI/model-zoo/hosting_storage_v1".split("/")
33+
bundle_version = get_bundle_versions(bundle_name, repo=f"{repo_owner}/{repo_name}", tag=tag_name)[
34+
"latest_version"
35+
]
36+
3337
self.bundle_path = os.path.join(self.model_dir, bundle_name)
3438
if not os.path.exists(self.bundle_path):
3539
download(name=bundle_name, version=bundle_version, bundle_dir=self.model_dir)

0 commit comments

Comments
 (0)