osl_dynamics.config_api#

Config API.


Specify a pipeline using a config, e.g. to train a TDE-HMM:

config = ```
    load_data:
        inputs: training_data
        prepare:
            tde_pca: {n_embeddings: 15, n_pca_components: 80}
            standardize: {}
    train_hmm:
        config_kwargs:
            n_states: 8
            learn_means: False
            learn_covariances: True
```

and run with:

run_pipeline(config, output_dir="results")

See the toolbox paper examples for scripts that use the config API:


Note

The config API can be used via the command line with:

% osl-dynamics <config-file> <output-directory>

where

  • <config-file> is a yaml file containing the config.

  • <output-directory> is the output directory.

Optionally, you can specify a particular GPU to use with:

% osl-dynamics <config-file> <output-directory> --restrict <restrict>

where <restrict> is an integer specifying the GPU number. E.g. if you would just like to use the first GPU, you can pass:

% osl-dynamics <config-file> <output-directory> --restrict 0

Remember you need to activate the osld conda environment to use the command line interface.

Submodules#