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

Method __init__

monai/bundle/workflows.py:281–304  ·  view source on GitHub ↗
(
        self,
        workflow_type: str | None = None,
        properties_path: PathLike | None = None,
        config_file: str | Sequence[str] | None = None,
        meta_file: str | Sequence[str] | None = None,
        logging_file: str | None = None,
        **override: Any,
    )

Source from the content-addressed store, hash-verified

279 supported_infer_type: tuple = ("infer", "inference", "eval", "evaluation")
280
281 def __init__(
282 self,
283 workflow_type: str | None = None,
284 properties_path: PathLike | None = None,
285 config_file: str | Sequence[str] | None = None,
286 meta_file: str | Sequence[str] | None = None,
287 logging_file: str | None = None,
288 **override: Any,
289 ):
290 meta_file = str(Path(os.getcwd()) / "metadata.json") if meta_file is None else meta_file
291 super().__init__(
292 workflow_type=workflow_type, properties_path=properties_path, meta_file=meta_file, logging_file=logging_file
293 )
294 self._props_vals: dict = {}
295 self._set_props_vals: dict = {}
296 self.parser = ConfigParser()
297 if config_file is not None:
298 self.parser.read_config(f=config_file)
299 if self.meta_file is not None:
300 self.parser.read_meta(f=self.meta_file)
301
302 # the rest key-values in the _args are to override config content
303 self.parser.update(pairs=override)
304 self._is_initialized: bool = False
305
306 def initialize(self, *args: Any, **kwargs: Any) -> Any:
307 """

Callers

nothing calls this directly

Calls 5

ConfigParserClass · 0.90
read_configMethod · 0.80
read_metaMethod · 0.80
__init__Method · 0.45
updateMethod · 0.45

Tested by

no test coverage detected