Repository: Project-MONAI/MONAI
File: monai/handlers/clearml_handlers.py (Python)

Code before:

        ClearMLHandler.__init__(
            self,
            project_name=project_name,
            task_name=task_name,
            output_uri=output_uri,
            tags=tags,
            reuse_last_task_id=reuse_last_task_id,
            continue_last_task=continue_last_task,
            auto_connect_frameworks=auto_connect_frameworks,
        )
        TensorBoardStatsHandler.__init__(self, *args, **kwargs)


class ClearMLImageHandler(ClearMLHandler, TensorBoardImageHandler):
    """

    This class inherits all functionality from TensorBoardImageHandler class.
    Everything from Tensorboard is logged automatically to ClearML WebUI.

    """

    def __init__(
        self,
        project_name: str | None = "MONAI",
        task_name: str | None = "Default Task",
        output_uri: str | bool = True,
        tags: Sequence[str] | None = None,
        reuse_last_task_id: bool = True,
        continue_last_task: bool = False,
        auto_connect_frameworks: bool | Mapping[str, bool | str | list] = True,
        *args,
        **kwargs,
    ):
        """
        Args:
            project_name:               ClearML project name.
            task_name:                  ClearML task name.
            output_uri:                 The default location for output models and other artifacts.
            tags:                       A list of tags (str) to the created Task.
            reuse_last_task_id:         Force a new Task (experiment) with a previously used Task ID.
            continue_last_task:         Continue the execution of a previously executed Task (experiment).
            auto_connect_frameworks:    Automatically connect frameworks.

        """

        ClearMLHandler.__init__(
            self,
            project_name=project_name,
            task_name=task_name,
            output_uri=output_uri,

Review comment (suggestion):
Please refer to `MLFlowHandler` for the default names:
https://github.com/Project-MONAI/MONAI/blob/dev/monai/handlers/mlflow_handler.py#L114

Thanks.


Code after:
        *args: Any,
        **kwargs: Any,
    ) -> None:
        """
        Args:
            project_name: ClearML project name, default to 'MONAI'.
            task_name: ClearML task name, default to 'monai_experiment'.
            output_uri: The default location for output models and other artifacts, default to 'True'.
            tags: A list of tags (str) to the created Task, default to 'None'.
            reuse_last_task_id: Force a new Task (experiment) with a previously used Task ID, default to 'True'.
            continue_last_task: Continue the execution of a previously executed Task (experiment), default to 'False'.
            auto_connect_frameworks: Automatically connect frameworks, default to 'True'.
            auto_connect_arg_parser: Automatically connect an argparse object to the Task, default to 'True'.

        """

        ClearMLHandler.__init__(
            self,
            project_name=project_name,
            task_name=task_name,
            output_uri=output_uri,
            tags=tags,
            reuse_last_task_id=reuse_last_task_id,
            continue_last_task=continue_last_task,
            auto_connect_frameworks=auto_connect_frameworks,
            auto_connect_arg_parser=auto_connect_arg_parser,
        )
        TensorBoardStatsHandler.__init__(self, *args, **kwargs)


class ClearMLImageHandler(ClearMLHandler, TensorBoardImageHandler):
    """

    This class inherits all functionality from TensorBoardImageHandler class.
    Everything from Tensorboard is logged automatically to ClearML.

    Usage example is available in the tutorial:
    https://github.com/Project-MONAI/tutorials/blob/master/3d_segmentation/unet_segmentation_3d_ignite.ipynb.

    """

    def __init__(
        self,
        project_name: str | None = "MONAI",
        task_name: str | None = "monai_experiment",
        output_uri: str | bool = True,
        tags: Sequence[str] | None = None,
        reuse_last_task_id: bool = True,
        continue_last_task: bool = False,
        auto_connect_frameworks: bool | Mapping[str, bool | str | list] = True,
        auto_connect_arg_parser: bool | Mapping[str, bool] = True,