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

UserWarnings about variable replacements #5

Open
rodluger opened this issue Mar 12, 2021 · 4 comments
Open

UserWarnings about variable replacements #5

rodluger opened this issue Mar 12, 2021 · 4 comments

Comments

@rodluger
Copy link
Collaborator

The newest version of aesara is raising thousands of user warnings that look like

/.../aesara/graph/fg.py:500: UserWarning: Variable Elemwise{...}.0 cannot be replaced; it isn't in the FunctionGraph

See here for instance.

@dfm Have you seen this, and any idea what's going on? If not, I'll dig into it.

@rodluger
Copy link
Collaborator Author

rodluger commented Mar 12, 2021

Oh-oh, they're thinking of making this an actual exception:

https://github.com/pymc-devs/aesara/blob/37444647688741d925dd299cb81a443e8ceb7c60/aesara/graph/fg.py#L493

Previously this just failed silently:

https://github.com/Theano/Theano/blob/8e9611715b33672d4b65b3fe232988c4adac970a/theano/gof/fg.py#L488

I'm getting this error whenever I call .eval() on a starry tensor. I don't have a proper MWE example yet but the following code

python -c "import starry; starry.Map().flux().eval()" 

warns me

/.../aesara/graph/fg.py:500: UserWarning: Variable argmax cannot be replaced; it isn't in the FunctionGraph
/.../aesara/graph/fg.py:500: UserWarning: Variable LimbDarkOp.1 cannot be replaced; it isn't in the FunctionGraph
/.../aesara/graph/fg.py:500: UserWarning: Variable LimbDarkOp.2 cannot be replaced; it isn't in the FunctionGraph
/.../aesara/graph/fg.py:500: UserWarning: Variable LimbDarkOp.3 cannot be replaced; it isn't in the FunctionGraph

I bet you're going to get these a lot with exoplanet.

@dfm
Copy link
Member

dfm commented Mar 13, 2021

Yeah I'm seeing some of these too. I'm not sure what the story is there! Let me know when you find the MWE.

@rodluger
Copy link
Collaborator Author

Ok the MWE is trivial:

import aesara.tensor as tt

y = [0.0, 1.0]
print(tt.max(y).eval())

outputs

/.../aesara/graph/fg.py:500: UserWarning: Variable argmax cannot be replaced; it isn't in the FunctionGraph
1.0

@rodluger
Copy link
Collaborator Author

rodluger commented Mar 15, 2021

This certainly seems like a bug in aesara. I filed an issue here: pymc-devs/pytensor#338

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