Error loading someone else's SCVI model: no such file (attr.pkl)

Hello,
I am trying to load a model created by a labmate. I have both the .h5ad file and the model folder:

dir_path = “Models/Example_model/”
adata = sc.read_h5ad(‘Data/Example.h5ad’)
vae = scvi.model.SCVI.load(dir_path, data)

However, I get the following errors:
FileNotFoundError: [Errno 2] No such file or directory: ‘Models/Exmaple_model/var_names.csv’
FileNotFoundError: [Errno 2] No such file or directory: ‘Models/Example_model/attr.pkl’

When I examine previous SCVI models that I have generated, the model folders have three files (model_params.pt, attr.pkl, var_names.csv). However, the models that my labmates generate only have model_params.pt. The only difference we can think of is that they use Mac OS while I use Windows. Is there any way we can resolve this discrepancy?

Thanks in advance.

Hi, I would recommend to create a new environment with an updated version of scvi-tools. The version you are using is several years old, while your colleague uses a more recent version.

1 Like