From 51a0294ca987dabffb6d109178e0f69a90f9c24f Mon Sep 17 00:00:00 2001 From: Koncopd Date: Fri, 1 Mar 2024 00:06:03 +0100 Subject: [PATCH] Bugfix release 0.6.1 --- scarches/__init__.py | 2 +- scarches/models/base/_base.py | 5 +++-- setup.py | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/scarches/__init__.py b/scarches/__init__.py index d8fc756b..d9ed9f9c 100755 --- a/scarches/__init__.py +++ b/scarches/__init__.py @@ -12,4 +12,4 @@ 'sergei.rybakov@helmholtz-muenchen.de' ]) -__version__ = '0.6.0' +__version__ = '0.6.1' diff --git a/scarches/models/base/_base.py b/scarches/models/base/_base.py index 8a6aa8c3..df5fdf7a 100644 --- a/scarches/models/base/_base.py +++ b/scarches/models/base/_base.py @@ -6,6 +6,7 @@ import numpy as np import torch +from torch.distributions import Normal from anndata import AnnData, read from scipy.sparse import issparse @@ -132,12 +133,12 @@ def _load_params(cls, dir_path: str, map_location: Optional[str] = None): # This catches the following error: # RuntimeError: Attempting to deserialize object on a CUDA device # but torch.cuda.is_available() is False. - # If you are running on a CPU-only machine, please use torch.load with + # If you are running on a CPU-only machine, please use torch.load with # map_location=torch.device('cpu') to map your storages to the CPU. except RuntimeError: with open(setup_dict_path, "rb") as handle: attr_dict = UnpicklerCpu(handle).load() - + model_state_dict = torch.load(model_path, map_location=map_location) diff --git a/setup.py b/setup.py index d4c886ce..67bcadb0 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ from scarches import __author__, __email__, __version__ except ImportError: # Deps not yet installed __author__ = __email__ = '' - __version__ = '0.6.0' + __version__ = '0.6.1' # otherwise readthedocs fails # because somewhere in the dependency tree there is the sklearn deprecated package