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

Drop Aesara support and fix PyTensor compatibility #44

Merged
merged 11 commits into from
Aug 21, 2023

Conversation

michaelosthege
Copy link
Member

This simplifies testing & upcoming fixes related to changes in shape handling in PyTensor.

This simplifies testing & upcoming fixes related to changes in shape handling in PyTensor.
@michaelosthege
Copy link
Member Author

@ricardoV94 @aseyboldt the tests here are failing with this:

E                           pytensor.graph.utils.MissingInputError: Input 0 (beta) of the graph (indices start from 0), used to compute Shape(beta), was not provided and not given a value. Use the PyTensor flag exception_verbosity='high', for more information on this error.

But the shape of beta should be trivial, and already known because it's scalar!

beta = pt.dscalar("beta")

Am I missing something?

@ricardoV94
Copy link
Member

ricardoV94 commented Aug 17, 2023

We keep the shape dependencies since pymc-devs/pytensor#280

This allows us to potentially clone_replace(..., strict=False), so you could change a scalar by a vector (clone_replace is a bit crude, but the idea is that).

As a solution you can use pymc.pytensorf.constant_fold to get rid of useless shape Ops if you don't want to those inputs to show up in the compiled graphs.

@michaelosthege
Copy link
Member Author

Oh, so already this no longer works:

pt.dscalar().shape.eval()

But now I'm maximally confused

grafik

@ricardoV94
Copy link
Member

ricardoV94 commented Aug 18, 2023

There's a distinction between x.shape (pytensor Op) and x.type.shape (python tuple). The "static shape" refers to the latter and that's what is being shown in the __repr__

@michaelosthege
Copy link
Member Author

The inspiration for the NumPy minimum version bumps came from conda/conda-build#4498 but it didn't help.

The successful 3.8 jobs were using an old PyTensor version.. Let's see what Python 3.11 brings

@michaelosthege michaelosthege changed the title Drop Aesara support Drop Aesara support and fix PyTensor compatibility Aug 21, 2023
@michaelosthege michaelosthege merged commit b83e662 into master Aug 21, 2023
6 checks passed
@michaelosthege michaelosthege deleted the august-fixes branch August 21, 2023 08:59
@maresb
Copy link
Contributor

maresb commented Aug 21, 2023

Ah, cool! I did that last night and didn't realize it succeeded! 🚀

Unless sunode has some explicit numpy version requirements then it's best to pin implicitly.

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

Successfully merging this pull request may close these issues.

3 participants