Getting Started
This guide provides step-by-step instructions for setting up CLArena, running your first experiment, and checking the results.
This quickstart focuses on the continual learning main experiment. For details on other pipelines, see Configure Pipelines.
1 Installation
Follow these steps to install CLArena in your Python environment:
# create a new conda environment (optional but recommended)
conda create -n clarena-env python=3.12
conda activate clarena-env
- Option 1, install from PyPI (recommended):
pip install clarena
- Option 2, install from source:
# clone the repository
git clone https://github.com/pengxiang-wang/continual-learning-arena
cd continual-learning-arena
pip install .
CLArena installs the CPU version of PyTorch by default. For GPU acceleration, install the appropriate PyTorch version for your CUDA setup in your environment by following the official PyTorch installation guide.
2 Run Default Experiment
This section walks you through running a default continual learning main experiment to verify your installation and familiarize yourself with CLArena’s workflow.
CLArena uses configuration files to define experiment parameters. Download the example configurations:
- Extract the downloaded zip file to your working directory;
- Rename the extracted folder to
configs/
.
Run the following command to start training with the default configuration:
clarena pipeline=CL_MAIN_EXPR experiment=example_cl_main_expr
This command will train a continual learning model using the default settings described below.
Default Experiment Settings (Click to expand)
The default experiment uses the following configuration:
Component | Setting | Description |
---|---|---|
CL Paradigm | Task-Incremental Learning (TIL) | Global seed: 1 |
CL Dataset | Permuted MNIST | Classification task with 10 tasks |
Backbone Network | Multi-Layer Perceptron (MLP) | Hidden layers: 256, 100, 64 with batch normalization |
CL Algorithm | Finetuning | Initializes from the last trained task |
Training | SGD Optimizer | Learning rate: 0.001, 2 epochs per task, batch size: 64, CPU training |
To run experiments with custom configurations, see Configure Pipelines.
3 Check the Results
After executing the training command, CLArena automatically creates an output directory containing all experiment data and results.
Results are saved in outputs/example_cl_main_expr/<timestamp>/
, where <timestamp>
represents the execution time. (This structure allows multiple experimental runs to be stored separately. )
You can monitor experiment progress and check intermediate results at any time during execution. The output directory is updated in real-time along with the progress.
The generated results are controlled by configuration settings. For detailed information, please refer to the Output Results (CL) section.