-
Notifications
You must be signed in to change notification settings - Fork 126
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
feat: New features to PackedSelection #797
Conversation
Small comment - for better granularity can you make the tests a bit shorter and more focused? Right now one test will fail and we won't know what's wrong without digging in! |
In bd37f9f, I split the tests into "basic", "nminusone" and "cutflow" tests. |
494cc3e
to
3d66ada
Compare
@iasonkrom just so the tests for your stuff are really exercising a realistic workflow (i.e. reading from a file), as we have found that to be a sticking point. Could you please add some tests that do so, so we aren't blindsided in the future? It's OK if the tests fail for, you can mark them with a pytest.xfail or test for the exception/failure to happen. |
@lgray the "nminusone" and "cutflow" tests do use the nano_dy samples which I read once at the top of the test file to avoid reading in every test function. However for the "dak" version of the tests I currently use |
Yes, please do - the |
@iasonkrom can you rebase this to master? |
9d8b14b
to
3aaddc5
Compare
You are having a bad problem and will not go to space today. |
@lgray Yeah I accidentally pressed "discard commits" on github and this closed the PR automatically because this synced my branch with master. Is it possible to reopen it? |
for more information, see https://pre-commit.ci
src/coffea/analysis_tools.py
Outdated
The bin labels of the y axis of the histograms. | ||
""" | ||
for name, var in vars.items(): | ||
if len(var) != len(self._masksonecut[0]): |
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.
ditto about partitions as opposed to checking length of arrays.
The tutorial notebook is comprehensive, nice! :-) |
@lgray Any idea how to get raising incompatible partitions to work since if self._delayed_mode:
for name, var in vars.items():
if not compatible_partitions(var, self._masks[0]):
raise IncompatiblePartitions("plot_vars", var, self._masks[0]) |
And I can't find I way to get rid of this last h.fill(
dask_awkward.from_awkward(awkward.Array([0]), 1),
weight=dask_awkward.from_awkward(awkward.Array([len(weight)]), 1),
) I basically just want to fill a delayed histogram with zeros, |
what's the error you get if you try to do |
Also why doesn't |
for incompatible partitions can you print out the dask arrays you're getting at that stage, since we know it fails later when trying to apply a mask for exactly the same reason. |
yup this works. I'm just stupid and forgot about it. |
not anymore, because this was just replaced by the |
oh, fun. |
that cannot possibly be that line does not fill anything with a mask? |
wait maybe I'm just missing something. It's just that the only test failure was "did not raise incmpatible error" after I changed this line. |
Honestly for this I'm willing to save it for a follow-up PR to give some time to think about it correctly. |
Oh, and I mean for the case that should raise, when it is testing for partition compatibility can you just print out the dask_awkward.Array's and we take a look at them? |
Oh you mean to find the bug? If yes then I'll create a reproducer. |
yeah just comment out that part of the test for now and let's take our time to do it the right way. |
I think I finalized this for now. I believe you can just check today's changes and just merge. |
Starting a pull request to merge the new features of
PackedSelection
intto the master branch.This isn't 100% complete yet as slightly more testing and actual writing of some more unittests is required