vak.config.eval.EvalConfig¶
- class vak.config.eval.EvalConfig(checkpoint_path, output_dir, model, batch_size, dataset: DatasetConfig, trainer: TrainerConfig, labelmap_path=None, frames_standardizer_path=None, post_tfm_kwargs: dict | None = None, num_workers=2)[source]¶
Bases:
object
Class that represents [vak.eval] table in configuration file.
- model¶
The model to use: its name, and the parameters to configure it. Must be an instance of
vak.config.ModelConfig
- Type:
vak.config.ModelConfig
- dataset¶
The dataset to use: the path to it, and optionally a path to a file representing splits, and the name, if it is a built-in dataset. Must be an instance of
vak.config.DatasetConfig
.- Type:
vak.config.DatasetConfig
- trainer¶
Configuration for
lightning.pytorch.Trainer
. Must be an instance ofvak.config.TrainerConfig
.- Type:
vak.config.TrainerConfig
- num_workers¶
Number of processes to use for parallel loading of data. Argument to torch.DataLoader. Default is 2.
- Type:
- frames_standardizer_path¶
path to a saved
vak.transforms.FramesStandardizer
object used to standardize (normalize) frames. If spectrograms were normalized and this is not provided, will give incorrect results.- Type:
- post_tfm_kwargs¶
Keyword arguments to post-processing transform. If None, then no additional clean-up is applied when transforming labeled timebins to segments, the default behavior. The transform used is
vak.transforms.frame_labels.PostProcess`. Valid keyword argument names are 'majority_vote' and 'min_segment_dur', and should be appropriate values for those arguments: Boolean for ``majority_vote
, a float value formin_segment_dur
. See the docstring of the transform for more details on these arguments and how they work.- Type:
- __init__(checkpoint_path, output_dir, model, batch_size, dataset: DatasetConfig, trainer: TrainerConfig, labelmap_path=None, frames_standardizer_path=None, post_tfm_kwargs: dict | None = None, num_workers=2) None ¶
Method generated by attrs for class EvalConfig.
Methods
__init__
(checkpoint_path, output_dir, model, ...)Method generated by attrs for class EvalConfig.
from_config_dict
(config_dict)Return
EvalConfig
instance from adict
.Attributes
- classmethod from_config_dict(config_dict: dict) EvalConfig [source]¶
Return
EvalConfig
instance from adict
.The
dict
passed in should be the one found by loading a valid configuration toml file withvak.config.parse.from_toml_path()
, and then using keyeval
, i.e.,EvalConfig.from_config_dict(config_dict['eval'])
.