Skip to main content

Recreating Experiment Environments


Sometimes, you may need to recreate your experiment environment on a different machine, but you haven't committed your code.

ClearML logs everything needed to reproduce your experiment and its environment (uncommitted changes, used packages, and more), making it easy to reproduce your experiment's execution environment using ClearML.

You can reproduce the execution environment of any experiment you've run with ClearML on any workload:

  1. Go to the experiment page of the task you want to reproduce in the ClearML WebApp,

    tip

    Use the UI's filtering and sorting to find the best performing experiments.

  2. Copy the desired experiment's ID

  3. Use the ClearML Agent's build command to rebuild the experiment's execution environment. Input the experiment's ID and the target local folder, where the environment will be created:

    clearml-agent build --id <task_id> --target <target_folder>

    After running this command, the target folder will contain that task's original code with uncommitted changes applied, as well as a complete recreated virtual environment

  4. Activate the virtual environment using the activation script. Once done, you'll find all of your environment's packages already installed in the environment

And that's it! Your experiment's environment and your code has been reproduced!