mypackage.MyPyroModel.save

MyPyroModel.save(dir_path, overwrite=False, save_anndata=False, **anndata_write_kwargs)

Save the state of the model.

Neither the trainer optimizer state nor the trainer history are saved. Model files are not expected to be reproducibly saved and loaded across versions until we reach version 1.0.

Parameters
dir_path : strstr

Path to a directory.

overwrite : boolbool (default: False)

Overwrite existing data or not. If False and directory already exists at dir_path, error will be raised.

save_anndata : boolbool (default: False)

If True, also saves the anndata

anndata_write_kwargs

Kwargs for write()