vak.predict.parametric_umap.predict_with_parametric_umap_model#
- vak.predict.parametric_umap.predict_with_parametric_umap_model(model_name: str, model_config: dict, dataset_path, checkpoint_path, num_workers=2, transform_params: dict | None = None, dataset_params: dict | None = None, timebins_key='t', device=None, output_dir=None)[source]#
Make predictions on a dataset with a trained model.
- model_namestr
Model name, must be one of vak.models.registry.MODEL_NAMES.
- model_configdict
Model configuration in a
dict
, as loaded from a .toml file, and used by the model methodfrom_config
.- dataset_pathstr
Path to dataset, e.g., a csv file generated by running
vak prep
.- checkpoint_pathstr
path to directory with checkpoint files saved by Torch, to reload model
- num_workersint
Number of processes to use for parallel loading of data. Argument to torch.DataLoader. Default is 2.
- transform_params: dict, optional
Parameters for data transform. Passed as keyword arguments. Optional, default is None.
- dataset_params: dict, optional
Parameters for dataset. Passed as keyword arguments. Optional, default is None.
- timebins_keystr
key for accessing vector of time bins in files. Default is ‘t’.
- devicestr
Device on which to work with model + data. Defaults to ‘cuda’ if torch.cuda.is_available is True.
- annot_csv_filenamestr
name of .csv file containing predicted annotations. Default is None, in which case the name of the dataset .csv is used, with ‘.annot.csv’ appended to it.
- output_dirstr, Path
path to location where .csv containing predicted annotation should be saved. Defaults to current working directory.