vak.config.eval.EvalConfig#

class vak.config.eval.EvalConfig(checkpoint_path, output_dir, model, batch_size, dataset_path=None, labelmap_path=None, spect_scaler_path=None, post_tfm_kwargs: dict | None = None, num_workers=2, device='cpu', transform_params=None, dataset_params=None)[source]#

Bases: object

class that represents [EVAL] section of config.toml file

dataset_path#

Path to dataset, e.g., a csv file generated by running vak prep.

Type:

str

checkpoint_path#

path to directory with checkpoint files saved by Torch, to reload model

Type:

str

output_dir#

Path to location where .csv files with evaluation metrics should be saved.

Type:

str

labelmap_path#

path to ‘labelmap.json’ file.

Type:

str

model#

Model name, e.g., model = "TweetyNet"

Type:

str

batch_size#

number of samples per batch presented to models during training.

Type:

int

num_workers#

Number of processes to use for parallel loading of data. Argument to torch.DataLoader. Default is 2.

Type:

int

device#

Device on which to work with model + data. Defaults to ‘cuda’ if torch.cuda.is_available is True.

Type:

str

spect_scaler_path#

path to a saved SpectScaler object used to normalize spectrograms. If spectrograms were normalized and this is not provided, will give incorrect results.

Type:

str

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 for min_segment_dur. See the docstring of the transform for more details on these arguments and how they work.

Type:

dict

transform_params#

Parameters for data transform. Passed as keyword arguments. Optional, default is None.

Type:

dict, optional

dataset_params#

Parameters for dataset. Passed as keyword arguments. Optional, default is None.

Type:

dict, optional

__init__(checkpoint_path, output_dir, model, batch_size, dataset_path=None, labelmap_path=None, spect_scaler_path=None, post_tfm_kwargs: dict | None = None, num_workers=2, device='cpu', transform_params=None, dataset_params=None) None#

Method generated by attrs for class EvalConfig.

Methods

__init__(checkpoint_path, output_dir, model, ...)

Method generated by attrs for class EvalConfig.