clearml-docs/docs/integrations/openmmv.md
2023-06-22 16:08:26 +03:00

1.7 KiB

title
OpenMMLab

OpenMMLab is a computer vision framework. You can integrate ClearML into your code using the mmcv package's ClearMLLoggerHook class. This class is used to create a ClearML Task and to automatically log metrics.

For example, the following code sets up the configuration for logging metrics periodically to ClearML, and then registers the ClearML hook to a runner, which manages training in mmcv:

log_config = dict(
    interval=100,
    hooks=[
        dict(
            type='ClearMLLoggerHook',
            init_kwargs=dict(
                project_name='examples',
                task_name='OpenMMLab cifar10',
                output_uri=True
            )
        ),
    ]
)

# register hooks to runner and those hooks will be invoked automatically
runner.register_training_hooks(
    lr_config=lr_config,
    optimizer_config=optimizer_config,
    checkpoint_config=checkpoint_config,
    log_config=log_config # ClearMLLogger hook
)

The init_kwargs dictionary can include any parameter from Task.init().

This creates a ClearML Task OpenMMLab cifar10 in the examples project. You can view the captured metrics in the experiment's Scalars tab in the WebApp.

OpenMMLab scalars

See OpenMMLab code example here.