theislab / scgen

Single cell perturbation prediction
https://scgen.readthedocs.io
GNU General Public License v3.0
255 stars 51 forks source link

scgen Literal deprecation error #88

Open abuchin opened 9 months ago

abuchin commented 9 months ago

In the latest version it of scgen (2.1.0) it shows the following error when trying to import the module.

DeprecationWarning Traceback (most recent call last) Cell In [1], line 2 1 # scgen ----> 2 import scgen

File /opt/conda/lib/python3.9/site-packages/scgen/init.py:3 1 """ScGen - Predicting single cell perturbations""" ----> 3 from ._scgenvae import SCGENVAE 4 from ._scgen import SCGEN 6 import logging

File /opt/conda/lib/python3.9/site-packages/scgen/_scgenvae.py:4 2 import torch 3 from scvi import REGISTRY_KEYS ----> 4 from scvi._compat import Literal 5 from scvi.module.base import BaseModuleClass, LossRecorder, auto_move_data 6 from scvi.nn import Encoder

File /opt/conda/lib/python3.9/site-packages/scvi/_compat.py:1 ----> 1 class Literal: 2 """Shim Literal.""" 4 raise DeprecationWarning("This class is deprecated, please import from typing")

File /opt/conda/lib/python3.9/site-packages/scvi/_compat.py:4, in Literal() 1 class Literal: 2 """Shim Literal.""" ----> 4 raise DeprecationWarning("This class is deprecated, please import from typing")

DeprecationWarning: This class is deprecated, please import from typing

Testing if different versions do not have this error.

chAwater commented 9 months ago