ClearML is an open-source MLOps platform that provides auto-magical experiment management, version control for data and models, and MLOps capabilities for AI workflows. It helps track, compare, and reproduce machine learning experiments. The library sees active development with frequent patch releases (multiple per month) and regular minor/major version updates, with the current version being 2.1.5.
pip install clearmlVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize a ClearML Task to start tracking an experiment. It sets up ClearML credentials via environment variables and then creates a `Task` object. Metrics are logged using the task's logger. It is crucial to call `Task.init()` early in your script to ensure comprehensive tracking. Replace 'YOUR_ACCESS_KEY' and 'YOUR_SECRET_KEY' with your actual ClearML credentials, or run `clearml-init` in your terminal to configure them interactively.
Ensure your Python environment is running Python 3.6 or a newer version.
Follow the ClearML Server upgrade guide, ensuring MongoDB is upgraded in stages if coming from older server versions. Refer to the ClearML Server documentation for detailed steps.
Place `task = Task.init(...)` as early as possible in your main script execution flow.
To ensure models are uploaded, set `output_uri='s3://your-bucket/clearml-models'` (or another supported URI) when calling `Task.init()`.
If these functionalities are needed, ensure they are called *before* `Task.init()` or consider alternative approaches if the goal is to modify an already initialized task.
Ensure `clearml-init` has been run and configured correctly with the right `api.web_server`, `api.api_server`, `api.files_server` addresses, and valid `api.access_key` and `api.secret_key`. Verify network connectivity to the ClearML server components (e.g., API server on port 8008, web on 8080, files on 8081 by default), and confirm the ClearML server is running and accessible.
If running `clearml-agent`, install it in your system Python environment (not inside a virtual environment), or ensure the `--docker` option is used to properly isolate task environments. Verify that your task's `requirements.txt` correctly lists `clearml` and its dependencies.
Upgrade the `clearml` Python package to the latest version (`pip install -U clearml`). For development or testing environments where security risks are understood, you can bypass certificate verification by adding `api { verify_certificate = False }` to your `~/clearml.conf` configuration file (or the equivalent path for your OS).Upgrade your `clearml` Python package (`pip install -U clearml`) to the latest version. If the issue persists, consult the ClearML release notes or GitHub issues for specific API changes related to the `Task` object or the `clearml.automation` module.