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

problem with aesara when importing bambi #737

Closed
ChristophBg opened this issue Oct 16, 2023 · 2 comments
Closed

problem with aesara when importing bambi #737

ChristophBg opened this issue Oct 16, 2023 · 2 comments

Comments

@ChristophBg
Copy link

Hello Bambi team,
I have following issue:
When I import bambi, I get following error:

import bambi
Traceback (most recent call last):
File "", line 1, in
File "/Applications/miniconda3/envs/science/lib/python3.9/site-packages/bambi/init.py", line 7, in
from .models import Model
File "/Applications/miniconda3/envs/science/lib/python3.9/site-packages/bambi/models.py", line 16, in
from .backend import PyMCModel
File "/Applications/miniconda3/envs/science/lib/python3.9/site-packages/bambi/backend/init.py", line 1, in
from .pymc import PyMCModel
File "/Applications/miniconda3/envs/science/lib/python3.9/site-packages/bambi/backend/pymc.py", line 19, in
class PyMCModel:
File "/Applications/miniconda3/envs/science/lib/python3.9/site-packages/bambi/backend/pymc.py", line 31, in PyMCModel
"softmax": at.nnet.softmax,
File "/Applications/miniconda3/envs/science/lib/python3.9/site-packages/aesara/tensor/init.py", line 175, in getattr
raise AttributeError(f"module {name} has no attribute {name}")
AttributeError: module aesara.tensor has no attribute nnet


The package versions I use are:
aesara 2.8.12 py39hb4c90a2_2 conda-forge
aesara-base 2.8.12 py39h6e9494a_2 conda-forge
aesara-nightly 2.9.1.post9 pypi_0 pypi
bambi 0.10.0 pypi_0 pypi
pymc 5.0.2 hd8ed1ab_0 conda-forge
pymc-base 5.0.2 pyhd8ed1ab_0 conda-forge

(I tried using aesara-nightly instead but got the same error).

on a Mac OS 12.7

I read that nnet is/ should be deprecated in apsara (aesara-devs/aesara#674), so I am not sure why I am getting this error.
Your help is much appreciated!

@ChristophBg ChristophBg changed the title problem with apsara when importing bambi problem with aesara when importing bambi Oct 16, 2023
@ColCarroll
Copy link
Collaborator

Unfortunately I think your installs are a little messed up: pymc no longer depends on aesara (It uses pytensor), and bambi 0.9.3 was the last version to use the aesara version of pymc.

Can you double check that the bambi version where you get that error is actually 0.10.0? Or perhaps create a new environment with upgraded versions of everything?

@ChristophBg
Copy link
Author

thanks for the quick reply! That was indeed my problem, I updated pymc and pytensor based on the dependencies list (https://github.com/bambinos/bambi/blob/main/pyproject.toml) and now I can import bambi without issues.
Many thanks!

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

No branches or pull requests

2 participants