MCPcopy Index your code
hub / github.com/Project-MONAI/MONAI / run_workflow

Function run_workflow

monai/bundle/scripts.py:1016–1044  ·  view source on GitHub ↗

Specify `bundle workflow` to run monai bundle components and workflows. The workflow should be subclass of `BundleWorkflow` and be available to import. It can be MONAI existing bundle workflows or user customized workflows. Typical usage examples: .. code-block:: bash

(
    workflow_name: str | BundleWorkflow | None = None, args_file: str | None = None, **kwargs: Any
)

Source from the content-addressed store, hash-verified

1014
1015
1016def run_workflow(
1017 workflow_name: str | BundleWorkflow | None = None, args_file: str | None = None, **kwargs: Any
1018) -> None:
1019 """
1020 Specify `bundle workflow` to run monai bundle components and workflows.
1021 The workflow should be subclass of `BundleWorkflow` and be available to import.
1022 It can be MONAI existing bundle workflows or user customized workflows.
1023
1024 Typical usage examples:
1025
1026 .. code-block:: bash
1027
1028 # Execute this module as a CLI entry with default ConfigWorkflow:
1029 python -m monai.bundle run_workflow --meta_file <meta path> --config_file <config path>
1030
1031 # Set the workflow to other customized BundleWorkflow subclass:
1032 python -m monai.bundle run_workflow --workflow_name CustomizedWorkflow ...
1033
1034 Args:
1035 workflow_name: specified bundle workflow name, should be a string or class, default to "ConfigWorkflow".
1036 args_file: a JSON or YAML file to provide default values for this API.
1037 so that the command line inputs can be simplified.
1038 kwargs: arguments to instantiate the workflow class.
1039
1040 """
1041
1042 workflow_ = create_workflow(workflow_name=workflow_name, args_file=args_file, **kwargs)
1043 workflow_.run()
1044 workflow_.finalize()
1045
1046
1047def verify_metadata(

Callers

nothing calls this directly

Calls 3

create_workflowFunction · 0.85
runMethod · 0.45
finalizeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…