Skip to content

Commit 150a60a

Browse files
committed
address comments
Signed-off-by: YunLiu <[email protected]>
1 parent 50b1a50 commit 150a60a

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

monai/bundle/workflows.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ def __init__(
121121
self.properties: dict = {}
122122
if workflow_type is not None and workflow_type in properties:
123123
self.properties = properties[workflow_type]
124+
if "meta" in properties:
125+
self.properties.update(properties["meta"])
124126
elif workflow_type is None:
125127
if "meta" in properties:
126128
self.properties = properties["meta"]

tests/test_bundle_workflow.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,13 @@ def test_pythonic_workflow(self):
172172
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
173173
config_file = {"roi_size": (64, 64, 32)}
174174
meta_file = os.path.join(os.path.dirname(__file__), "testing_data", "metadata.json")
175-
workflow = PythonicWorkflowImpl(workflow_type="infer", config_file=config_file, meta_file=meta_file)
175+
property_path = os.path.join(os.path.dirname(__file__), "testing_data", "python_workflow_properties.json")
176+
workflow = PythonicWorkflowImpl(
177+
workflow_type="infer",
178+
config_file=config_file,
179+
meta_file=meta_file,
180+
properties_path=property_path
181+
)
176182
workflow.initialize()
177183
# Load input data
178184
input_loader = LoadImaged(keys="image")

0 commit comments

Comments
 (0)