pipeline.utils.scriptutils package#
A package that defines common utilies used in the scripts.
- pipeline.utils.scriptutils.configure_logger(level=20, format='%(levelname)s:%(message)s', **kwargs)[source]#
Configure the logger with the basic logging.
All the arguments are passed to
logging.basicConfig()
.
- pipeline.utils.scriptutils.parse_args(**kwargs)[source]#
Parse the arguments of a parser with a single argument
config
, that allows to specify the configuration.- Parameters:
**kwargs – passed to the
argparse.ArgumentParser
- Return type:
str
- Returns:
Path to the configuration file
pipeline.utils.scriptutils.convenience_utils module#
- pipeline.utils.scriptutils.convenience_utils.get_training_metrics(trainer)[source]#
Get the dataframe of the training metrics.
- Parameters:
trainer (Trainer | str) – either a PyTorch Lighting Trainer object, or the path to the metric file to load directly.
- Return type:
pd.DataFrame
- Returns:
Dataframe of the training metrics (one row / epoch).
pipeline.utils.scriptutils.loghandler module#
A module to handle the log.
pipeline.utils.scriptutils.parser module#
This module define the default parser used in all the scripts.
- pipeline.utils.scriptutils.parser.add_predefined_arguments(parser, arguments, **kwargs)[source]#
Add predefined arguments defined by the
predefined_arguments
dictionary.- Parameters:
parser (
ArgumentParser
) – Argument parser which to add the predefined arguments toarguments (
Iterable
[str
]) – names of predefined arguments to add