2727from monai .bundle .properties import InferProperties , MetaProperties , TrainProperties
2828from monai .bundle .utils import DEFAULT_EXP_MGMT_SETTINGS , EXPR_KEY , ID_REF_KEY , ID_SEP_KEY
2929from monai .config import PathLike
30- from monai .utils import BundleProperty , BundlePropertyConfig , deprecated_arg , ensure_tuple
30+ from monai .utils import BundleProperty , BundlePropertyConfig , ensure_tuple
3131
3232__all__ = ["BundleWorkflow" , "ConfigWorkflow" ]
3333
@@ -45,10 +45,6 @@ class BundleWorkflow(ABC):
4545 or "infer", "inference", "eval", "evaluation" for a inference workflow,
4646 other unsupported string will raise a ValueError.
4747 default to `None` for only using meta properties.
48- workflow: specifies the workflow type: "train" or "training" for a training workflow,
49- or "infer", "inference", "eval", "evaluation" for a inference workflow,
50- other unsupported string will raise a ValueError.
51- default to `None` for common workflow.
5248 properties_path: the path to the JSON file of properties. If `workflow_type` is specified, properties will be
5349 loaded from the file based on the provided `workflow_type` and meta. If no `workflow_type` is specified,
5450 properties will default to loading from "meta". If `properties_path` is None, default properties
@@ -65,17 +61,9 @@ class BundleWorkflow(ABC):
6561 supported_train_type : tuple = ("train" , "training" )
6662 supported_infer_type : tuple = ("infer" , "inference" , "eval" , "evaluation" )
6763
68- @deprecated_arg (
69- "workflow" ,
70- since = "1.2" ,
71- removed = "1.5" ,
72- new_name = "workflow_type" ,
73- msg_suffix = "please use `workflow_type` instead." ,
74- )
7564 def __init__ (
7665 self ,
7766 workflow_type : str | None = None ,
78- workflow : str | None = None ,
7967 properties_path : PathLike | None = None ,
8068 meta_file : str | Sequence [str ] | None = None ,
8169 logging_file : str | None = None ,
@@ -102,7 +90,6 @@ def __init__(
10290 )
10391 meta_file = None
10492
105- workflow_type = workflow if workflow is not None else workflow_type
10693 if workflow_type is not None :
10794 if workflow_type .lower () in self .supported_train_type :
10895 workflow_type = "train"
@@ -403,10 +390,6 @@ class ConfigWorkflow(BundleWorkflow):
403390 or "infer", "inference", "eval", "evaluation" for a inference workflow,
404391 other unsupported string will raise a ValueError.
405392 default to `None` for common workflow.
406- workflow: specifies the workflow type: "train" or "training" for a training workflow,
407- or "infer", "inference", "eval", "evaluation" for a inference workflow,
408- other unsupported string will raise a ValueError.
409- default to `None` for common workflow.
410393 properties_path: the path to the JSON file of properties. If `workflow_type` is specified, properties will be
411394 loaded from the file based on the provided `workflow_type` and meta. If no `workflow_type` is specified,
412395 properties will default to loading from "train". If `properties_path` is None, default properties
@@ -419,13 +402,6 @@ class ConfigWorkflow(BundleWorkflow):
419402
420403 """
421404
422- @deprecated_arg (
423- "workflow" ,
424- since = "1.2" ,
425- removed = "1.5" ,
426- new_name = "workflow_type" ,
427- msg_suffix = "please use `workflow_type` instead." ,
428- )
429405 def __init__ (
430406 self ,
431407 config_file : str | Sequence [str ],
@@ -436,11 +412,9 @@ def __init__(
436412 final_id : str = "finalize" ,
437413 tracking : str | dict | None = None ,
438414 workflow_type : str | None = "train" ,
439- workflow : str | None = None ,
440415 properties_path : PathLike | None = None ,
441416 ** override : Any ,
442417 ) -> None :
443- workflow_type = workflow if workflow is not None else workflow_type
444418 if config_file is not None :
445419 _config_files = ensure_tuple (config_file )
446420 config_root_path = Path (_config_files [0 ]).parent
0 commit comments