Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: module 'scvi' has no attribute 'autotune' #2784

Open
itamarb-cgen opened this issue May 9, 2024 · 3 comments
Open

AttributeError: module 'scvi' has no attribute 'autotune' #2784

itamarb-cgen opened this issue May 9, 2024 · 3 comments
Labels

Comments

@itamarb-cgen
Copy link

autotune fails with an error message no attribute 'autotune'.
I created a fresh conda environment with the latest scvi-tools on python 3.11.
Please advise,
Itamar

tuner = scvi.autotune.ModelTuner(model_cls)
tuner
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[15], line 1
----> 1 tuner = scvi.autotune.ModelTuner(model_cls)
      2 tuner

AttributeError: module 'scvi' has no attribute 'autotune'

Versions:

print (scvi.__version__)

1.1.2

sc.logging.print_header()

scanpy==1.10.1 anndata==0.10.7 umap==0.5.5 numpy==1.26.4 scipy==1.13.0 pandas==2.2.2 scikit-learn==1.4.2 statsmodels==0.14.1 igraph==0.11.5 pynndescent==0.5.12

@martinkim0
Copy link
Contributor

Hi, please try from scvi.autotune import ModelTuner

@itamarb-cgen
Copy link
Author

Thank you Martin!
This indeed helped proceed.
Note that a few more installations are needed:
conda install hyperopt pip install "ray[tune]"
with
from ray import tune

Unfortunately, I encounter another error later in tuner.fit:
'ValueError: Grid search parameters cannot be automatically converted to a HyperOpt search space.'
What can be the problem here?
Best regards,
Itamar

@martinkim0
Copy link
Contributor

Hi, sorry forgot to mention, you can install all autotune dependencies with

pip install -U "scvi-tools[autotune]"

For the error message, could you share the code you're running? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants