scverse / scvi-tools

Deep probabilistic analysis of single-cell and spatial omics data
http://scvi-tools.org/
BSD 3-Clause "New" or "Revised" License
1.25k stars 352 forks source link

PEAKVAE has unexpected keyword argument 'use_gpu' on initialization #982

Closed akmorrow13 closed 3 years ago

akmorrow13 commented 3 years ago

PEAKVAE has unexpected keyword argument 'use_gpu' on initialization


pvi_pbc = scvi.model.PEAKVI.load(<load_path>, adata, use_gpu=False)
TypeError                                 Traceback (most recent call last)
<ipython-input-12-148ac1bfb712> in <module>
----> 4 pvi_pbc = scvi.model.PEAKVI.load("pvi_vi_pbc",
      5                               adata_pbc)

scvi-tools/scvi/model/base/_base_model.py in load(cls, dir_path, adata, use_gpu)
    333         _validate_var_names(adata, var_names)
    334         transfer_anndata_setup(scvi_setup_dict, adata)
--> 335         model = _initialize_model(cls, adata, attr_dict)
    336 
    337         # set saved attrs for loaded model

scvi-tools/scvi/model/base/_utils.py in _initialize_model(cls, adata, attr_dict)
     71         non_kwargs.pop("use_cuda")
     72 
---> 73     model = cls(adata, **non_kwargs, **kwargs)
     74     return model
     75 

scvi-tools/scvi/model/_peakvi.py in __init__(self, adata, n_hidden, n_latent, n_layers_encoder, n_layers_decoder, dropout_rate, model_depth, region_factors, use_batch_norm, use_layer_norm, latent_distribution, deeply_inject_covariates, **model_kwargs)
     94         )
     95 
---> 96         self.module = PEAKVAE(
     97             n_input_regions=self.summary_stats["n_vars"],
     98             n_batch=self.summary_stats["n_batch"],

TypeError: __init__() got an unexpected keyword argument 'use_gpu'

Versions:

0.9.0 (dev)

adamgayoso commented 3 years ago

This was an issue with a beta/alpha save file and is resolved in the official release. Unfortunately beta/alpha save files won't load properly.