osl_dynamics.config_api.pipeline
#
Functions for running full pipelines via the config API.
See the documentation here for example usage.
Module Contents#
Functions#
|
Load config. |
|
Find a function to execute via the config API. |
|
Run a full pipeline. |
|
Run a pipeline from a config file. |
Command line interface function for running a pipeline from a config |
Attributes#
- osl_dynamics.config_api.pipeline.load_config(config)[source]#
Load config.
- Parameters:
config (str or dict) – Path to yaml file,
str
to convert todict
, ordict
containing the config.- Returns:
config – Config for a full pipeline.
- Return type:
dict
- osl_dynamics.config_api.pipeline.find_function(name, extra_funcs=None)[source]#
Find a function to execute via the config API.
- Parameters:
name (str) – Function name.
extra_funcs (list of functions, optional) – Custom functions passed by the user.
- Returns:
func – Function to execute.
- Return type:
function
- osl_dynamics.config_api.pipeline.run_pipeline(config, output_dir, data=None, extra_funcs=None)[source]#
Run a full pipeline.
- Parameters:
config (str or dict) – Path to yaml file,
str
to convert todict
, ordict
containing the config.output_dir (str) – Path to output directory.
data (osl_dynamics.data.Data, optional) – Data object.
extra_funcs (list of functions, optional) – User-defined functions referenced in the config.
- osl_dynamics.config_api.pipeline.run_pipeline_from_file(config_file, output_directory, restrict=None)[source]#
Run a pipeline from a config file.
- Parameters:
config_file (str) – Path to the config file.
output_directory (str) – Path to the output directory.
restrict (int or str, optional) – GPU to use. If a str is passed it will be cast to an int.