-
Notifications
You must be signed in to change notification settings - Fork 108
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
Vectorize make_vector
#889
Conversation
ea5fe1c
to
4a9077b
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #889 +/- ##
=======================================
Coverage 81.21% 81.21%
=======================================
Files 170 170
Lines 47020 47028 +8
Branches 11523 11525 +2
=======================================
+ Hits 38188 38196 +8
Misses 6621 6621
Partials 2211 2211
|
I should test it doesn't fail when all inputs are still scalars |
new_out = join( | ||
-1, *[expand_dims(batch_inputs, axis=-1) for batch_inputs in batch_inputs] | ||
) | ||
return new_out.owner |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why .owner
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vectorize_node
returns a node. No idea why, could probably have made it like rewrites and return the output variables
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it's right there in the name eh?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's silly and potentially too restrictive, opened an issue: #902
4a9077b
to
7f19764
Compare
Description
Showed up in some vectorized logps in pymc-devs/pymc-experimental#353
We can always convert a vectorized MakeVector (stack of scalars) into a join (concatenate) of tensors. May just need to explicitly broadcast them first. No good reason not to do it eagerly
Related Issue
Checklist
Type of change