Configure STL Algorithm (STL)
Single-task learning algorithm is the core part of single-task learning, determining how the task are learned.
STL algorithm is a sub-config under the experiment index config (STL). To configure a custom STL algorithm, you need to create a YAML file in stl_algorithm/
folder. Below shows an example of the STL algorithm config.
Example
configs
βββ __init__.py
βββ entrance.yaml
βββ experiment
β βββ example_stl_train.yaml
β βββ ...
βββ stl_algorithm
β βββ single_learning.yaml
...
configs/experiment/example_stl_train.yaml
defaults:
...
- /stl_algorithm: single_learning.yaml
...
configs/stl_algorithm/single_learning.yaml
_target_: clarena.stl_algorithms.SingleLearning
Supported STL algorithms & Required Config Fields
In CLArena, we implemented many STL algorithms as Python classes in clarena.stl_algorithms
module that you can use for your experiment.
To choose a STL algorithm, assign the _target_
field to the class name of the STL algorithm. For example, to use the SingleLearning
algorithm, set _target_
field to clarena.stl_algorithms.SingleLearning
. Each STL algorithm has its own hyperparameters and configurations, which means it has its own required fields. The required fields are the same as the arguments of the class specified by _target_
(excluding backbone
and heads
). The arguments of each MTL algorithm class can be found in API documentation.
Below is the full list of supported STL algorithms. Note that the βSTL algorithmβ is exactly the class name that the _target_
field is assigned.
STL algorithm | Description | Required Config Fields |
---|---|---|
SingleLearning | The most naive way for single-task learning. It directly trains the task. | Same as SingleLearning class arguments (excluding backbone and heads ) |
Make sure the algorithm is compatible with the STL dataset and backbone.