-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix test failures due to old change_flags API #7475
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Breakage was caused by this: <pymc-devs/pytensor@936554c> Fix is to unpack the dict into kwargs.
The other failing test may be something that @jessegrabowski knows about |
Is there an issue or PR tracking this other failing test? AILED tests/distributions/test_multivariate.py::TestMatchesScipy::test_kroneckernormal[None-3-2] - ValueError: shape mismatch: value array of shape (2,) could not be broadcast to indexing result of shape (3,)
Apply node that caused the error: AdvancedSetSubtensor(Alloc.0, *0-<Vector(float64, shape=(3,))>, [0 1 2], [0 1 2])
Toposort index: 1
Inputs types: [TensorType(float64, shape=(3, 3)), TensorType(float64, shape=(3,)), TensorType(uint8, shape=(3,)), TensorType(uint8, shape=(3,))]
Inputs shapes: [(3, 3), (2,), (3,), (3,)]
Inputs strides: [(24, 8), (8,), (1,), (1,)]
Inputs values: ['not shown', array([2.00033806, 3.69369647]), array([0, 1, 2], dtype=uint8), array([0, 1, 2], dtype=uint8)]
Inputs type_num: [12, 12, 2, 2]
Outputs clients: [[output[0](AdvancedSetSubtensor.0)]]
Backtrace when the node is created (use PyTensor flag traceback__limit=N to make it longer):
File "/usr/share/miniconda3/envs/pymc-test/lib/python3.12/site-packages/pluggy/_hooks.py", line 513, in __call__
return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
File "/usr/share/miniconda3/envs/pymc-test/lib/python3.12/site-packages/pluggy/_manager.py", line 120, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/usr/share/miniconda3/envs/pymc-test/lib/python3.12/site-packages/pluggy/_callers.py", line 103, in _multicall
res = hook_impl.function(*args)
File "/usr/share/miniconda3/envs/pymc-test/lib/python3.12/site-packages/_pytest/python.py", line 159, in pytest_pyfunc_call
result = testfunction(**testargs)
File "/home/runner/work/pymc/pymc/tests/distributions/test_multivariate.py", line 460, in test_kroneckernormal
check_logp(
File "/home/runner/work/pymc/pymc/pymc/testing.py", line 356, in check_logp
dist = create_dist_from_paramdomains(pymc_dist, paramdomains, extra_args)
File "/home/runner/work/pymc/pymc/pymc/testing.py", line 271, in create_dist_from_paramdomains
return pymc_dist.dist(**param_vars, **extra_args)
File "/home/runner/work/pymc/pymc/pymc/distributions/multivariate.py", line 2087, in dist
cov_i = pt.dot(Q, pt.dot(pt.diag(eig), Q.T))
Debug print of the apply node:
AdvancedSetSubtensor [id A] <Matrix(float64, shape=(?, ?))>
├─ Alloc [id B] <Matrix(float64, shape=(3, 3))>
│ ├─ 0.0 [id C] <Scalar(float64, shape=())>
│ ├─ 3 [id D] <Scalar(int64, shape=())>
│ └─ 3 [id D] <Scalar(int64, shape=())>
├─ *0-<Vector(float64, shape=(3,))> [id E] <Vector(float64, shape=(3,))>
├─ [0 1 2] [id F] <Vector(uint8, shape=(3,))>
└─ [0 1 2] [id F] <Vector(uint8, shape=(3,))>
Storage map footprint:
- Alloc.0, Shape: (3, 3), ElemSize: 8 Byte(s), TotalSize: 72 Byte(s)
- AdvancedSetSubtensor.0, Shape: (3, 3), ElemSize: 8 Byte(s), TotalSize: 72 Byte(s)
- *0-<Vector(float64, shape=(3,))>, Input, Shape: (2,), ElemSize: 8 Byte(s), TotalSize: 16 Byte(s)
- 0.0, Shape: (), ElemSize: 8 Byte(s), TotalSize: 8.0 Byte(s)
- 3, Shape: (), ElemSize: 8 Byte(s), TotalSize: 8.0 Byte(s)
- [0 1 2], Shape: (3,), ElemSize: 1 Byte(s), TotalSize: 3 Byte(s)
TotalSize: 107.0 Byte(s) 0.000 GB
TotalSize inputs: 35.0 Byte(s) 0.000 GB |
It will be solved by pymc-devs/pytensor#981 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Breakage was caused by this:
pymc-devs/pytensor@936554c Fix is to unpack the dict into kwargs.
Description
Related Issue
Checklist
Type of change
📚 Documentation preview 📚: https://pymc--7475.org.readthedocs.build/en/7475/