NKI-CCB / sobolev_alignment

Sobolev alignment of deep probabilistic models for comparing single cell profiles
MIT License
5 stars 2 forks source link

sobolev_alignment_clf.fit - AttributeError: module 'scvi' has no attribute '__version__' #24

Closed LabDancer closed 1 year ago

LabDancer commented 1 year ago

Report

Dear,

I am following the sobolev tutorial with standard settings and am encountering an issue with sobolev_alignment_clf.fit where I get the error message that "AttributeError: module 'scvi' has no attribute 'version'." Reinstalling or updating scvi-tools (as suggested online for similar problems, eg https://github.com/scverse/scvi-tools/issues/824) does not resolve the problem. The output of import scvi; print(scvi.version) is 1.0.3 pip list shows me scvi-tools 1.0.3 Do you have an idea about how I can solve this? Thanks for your time!

Julie

Version information


anndata 0.9.2 numpy 1.24.4 scanpy 1.9.4 scvi 1.0.3 session_info 1.0.0 sobolev_alignment 0.4.1

Cython 3.0.2 PIL 10.0.0 absl NA aiohttp 3.8.5 aiosignal 1.3.1 annotated_types 0.5.0 anyio NA asttokens NA async_timeout 4.0.3 attr 23.1.0 babel 2.12.1 backcall 0.2.0 backoff 2.2.1 brotli 1.0.9 bs4 4.12.2 certifi 2023.07.22 cffi 1.15.1 charset_normalizer 3.2.0 chex 0.1.7 click 8.1.7 cloudpickle 2.2.1 comm 0.1.4 contextlib2 NA croniter NA cycler 0.10.0 cython 3.0.2 cython_runtime NA dateutil 2.8.2 debugpy 1.6.7 decorator 5.1.1 deepdiff 6.4.1 defusedxml 0.7.1 docrep 0.3.2 etils 1.4.1 exceptiongroup 1.1.3 executing 1.2.0 fastapi 0.103.1 fastjsonschema NA flax 0.7.2 frozenlist 1.4.0 fsspec 2023.9.0 future 0.18.3 h5py 3.9.0 hyperopt 0.2.7 idna 3.4 importlib_metadata NA importlib_resources NA ipykernel 6.25.1 jax 0.4.14 jaxlib 0.4.14 jedi 0.19.0 jinja2 3.1.2 joblib 1.3.2 json5 NA jsonschema 4.17.3 jupyter_events 0.6.3 jupyter_server 2.7.3 jupyterlab_server 2.24.0 kiwisolver 1.4.5 lightning 2.0.8 lightning_cloud NA lightning_fabric 2.0.8 lightning_utilities 0.9.0 llvmlite 0.40.1 markupsafe 2.1.1 matplotlib 3.7.2 ml_collections NA ml_dtypes 0.2.0 mpl_toolkits NA mpmath 1.3.0 msgpack 1.0.5 mudata 0.2.3 multidict 6.0.4 multipart 0.0.6 multipledispatch 0.6.0 natsort 8.4.0 nbformat 5.9.2 networkx 3.1 numba 0.57.1 numpyro 0.13.0 nvfuser NA opt_einsum v3.3.0 optax 0.1.7 ordered_set 4.1.0 overrides NA packaging 23.1 pandas 2.1.0 parso 0.8.3 past 0.18.3 patsy 0.5.3 pexpect 4.8.0 pickleshare 0.7.5 pkg_resources NA platformdirs 3.10.0 prometheus_client NA prompt_toolkit 3.0.39 psutil 5.9.0 ptyprocess 0.7.0 pure_eval 0.2.2 pvectorc NA py4j 0.10.9.7 pycparser 2.21 pydantic 2.1.1 pydantic_core 2.4.0 pydev_ipython NA pydevconsole NA pydevd 2.9.5 pydevd_file_utils NA pydevd_plugins NA pydevd_tracing NA pygments 2.16.1 pyparsing 3.0.9 pyro 1.8.6 pyrsistent NA pythonjsonlogger NA pytorch_lightning 2.0.8 pytz 2023.3 requests 2.31.0 rfc3339_validator 0.1.4 rfc3986_validator 0.1.1 rich NA scipy 1.11.2 seaborn 0.12.2 send2trash NA setuptools 68.1.2 six 1.16.0 sklearn 1.3.0 skmisc 0.3.0 sniffio 1.3.0 socks 1.7.1 soupsieve 2.5 sparse 0.14.0 stack_data 0.6.2 starlette 0.27.0 statsmodels 0.14.0 sympy 1.12 threadpoolctl 3.2.0 tomli 2.0.1 toolz 0.12.0 torch 2.0.1+cu117 torchmetrics 1.1.1 tornado 6.3.2 tqdm 4.66.1 traitlets 5.9.0 tree 0.1.8 typing_extensions NA urllib3 2.0.4 uvicorn 0.23.2 wcwidth 0.2.6 websocket 1.6.2 websockets 11.0.3 xarray 2023.8.0 yaml 6.0 yarl 1.9.2 zipp NA zmq 25.1.0 zoneinfo NA

IPython 8.15.0 jupyter_client 8.3.1 jupyter_core 5.3.0 jupyterlab 4.0.5 notebook 7.0.3

Python 3.9.18 | packaged by conda-forge | (main, Aug 30 2023, 03:49:32) [GCC 12.3.0] Linux-4.18.0-477.21.1.el8_8.x86_64-x86_64-with-glibc2.28

Session information updated at 2023-09-05 16:25

saroudant commented 1 year ago

Hello Julie,

Thank you very much for raising this issue, and for your interest in the package. It seems that you are using PyTorch 2.0 or higher, and a higher version than scvi-tools than v1. These tools evolve very fast, and Sobolev Alignment was designed to run on scvi-tools==0.20.0 and torch==1.13.0. You can check the versions on the setup.py: https://github.com/NKI-CCB/sobolev_alignment/blob/main/setup.py

Have you tried re-installing the package with these exact versions? If so, could you please share the complete error, so that I can try to reproduce it?

Best regards, Soufiane

LabDancer commented 1 year ago

Hi Soufiane,

Thanks for your reply! I tried what you suggested but then got errors about other packages so I just made a new environment and it works now!

Best,

Julie

saroudant commented 1 year ago

Hi Julie,

Perfect, happy to hear. I am closing this ticket, please feel free to open another one if another issue arises :)

Have a nice week-end. Soufiane