Configure STL Algorithm
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 under the index config of:
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
βββ index
β βββ example_stl_expr.yaml
β βββ ...
βββ stl_algorithm
β βββ single_learning.yaml
...
example_configs/index/example_stl_expr.yaml
defaults:
...
- /stl_algorithm: single_learning.yaml
...
example_configs/stl_algorithm/single_learning.yaml
_target_: clarena.stl_algorithms.SingleLearning
Supported STL algorithms & Required Config Fields
In CLArena, we have implemented many STL algorithms as Python classes in clarena.stl_algorithms
module that you can use for your experiments.
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
, heads
and non_algorithmic_hparams
). The arguments of each STL 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 , heads and non_algorithmic_hparams ) |
Make sure the algorithm is compatible with the STL dataset and backbone.