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

Fix broadcastables inference for Alloc and an as_tensor_variable bug when all ndim=0 and all dimensions are broadcastable #694

Conversation

brandonwillard
Copy link
Member

@brandonwillard brandonwillard commented Dec 9, 2021

This PR closes #692.

It generalizes the broadcastables inference used by RandomVariable, which performs constant folding and shape simplification rewrites instead of using get_scalar_constant_value.

@brandonwillard brandonwillard added the bug Something isn't working label Dec 9, 2021
@brandonwillard brandonwillard self-assigned this Dec 9, 2021
@codecov
Copy link

codecov bot commented Dec 9, 2021

Codecov Report

Merging #694 (c67e71b) into main (4e10772) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #694      +/-   ##
==========================================
+ Coverage   77.59%   77.61%   +0.02%     
==========================================
  Files         152      152              
  Lines       46926    46915      -11     
  Branches    10885    10883       -2     
==========================================
+ Hits        36412    36413       +1     
+ Misses       7904     7895       -9     
+ Partials     2610     2607       -3     
Impacted Files Coverage Δ
aesara/tensor/basic.py 86.17% <100.00%> (+0.58%) ⬆️
aesara/tensor/extra_ops.py 88.46% <100.00%> (ø)
aesara/tensor/random/op.py 98.57% <100.00%> (-0.07%) ⬇️
aesara/tensor/basic_opt.py 83.91% <0.00%> (+0.12%) ⬆️

@brandonwillard brandonwillard merged commit 34375f4 into aesara-devs:main Dec 9, 2021
@brandonwillard brandonwillard deleted the fix-alloc-broadcastable-inference branch December 9, 2021 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong broadcastable output of Alloc when using SpecifyShape
1 participant