-
Notifications
You must be signed in to change notification settings - Fork 89
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: set allow_lazy to True to avoid touching potential placeholders #3379
fix: set allow_lazy to True to avoid touching potential placeholders #3379
Conversation
(sorry for pinging the three of you, but I feel only partly convinced that this is the correct fix. Given that this has been fixed in #2524 I asked for a review from all participating parties of this PR.) |
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.
@pfackeldey - Thanks! I agree with your arguments. Also, if it fixes coffea, we shoud get it out asap. Thanks!
…ng_with_placeholders
The obvious consequence of this change is that operations that expect I don't think the performance for non-dask cases will be hugely affected, which is nice; we're already creating the index buffer that is being used, so it's not exactly more memory. It does mean that Jim will have thoughts; we have tweaked these defaults for other node types before. |
The application of @agoose77, I don't think that there's any code that expects the output of This is motivated by correctness, not performance, right? Getting these |
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.
Oh, the above was a review. I expressed a conditional, but I'm going to press "approve" here.
This PR is purely motivated by correctness. (I don't have a good feeling what implications this would have for performance.) |
As this PR touches a critical part of awkward's internals, I run in addition (locally) the test suites of
coffea needs #3383 and #3384 to go in, and then a little tweak in one of coffea's test to adopt to the new This PR is not responsible for the failing test in coffea, so I think we can go ahead and merge this one. |
…ng_with_placeholders
(Finally) fixes: scikit-hep/coffea#1231. This issue has causing me multiple headaches.
This PR is a follow-up of #2524 for
IndexedOptionArrays
. The problem here is that aRecordArray
may be wrapped in aIndexedOptionArray
after aak.with_field/__setitem__
operation. This has been fixed forIndexedArrays
in #2524, but not for option types.By setting
allow_lazy=True
in the_carry
function we don't apply a slice to each content of aRecordArray
, which causes errors forPlaceholderArrays
. Instead this wraps them in anIndexedArray
and thus follows the fix provided in #2524 by "pushing" theIndexedArray
down into each field of theRecordArray
in the next recursion during broadcasting.Adding the same "pushing" fix to
IndexedOptionArrays
led to multiple issues, which is why I gave up on it. If you have an idea how to implement this, I can give it another try. I'm not 100% sure if my/this solution is what we want.(PS: I think, setting
allow_lazy=True
here should also benefit in the scope of the currentVirtualArray
implementation (#3364) as it delays materialization of slicingRecordArrays
. The same is likely true forIndexedArrays
?)