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 key error for non rr multiprocess #376

Merged
merged 2 commits into from Jan 5, 2021

Conversation

JoranAngevaare
Copy link
Member

What is the problem / what does the code in this PR do
See issue #372 for the problem.

Can you briefly describe how it works?
When we create a ParallelSourcePlugin, there is some error in finding the dtype for a requested data type. This yields the error as in #372.

Usually this is not much of a problem but if we already have raw_records registered, this becomes a mess. I now just iterate over the known plugins to the ParallelSourcePlugin to find the right dtype. Given that we have been running like this for a long time illustrates that there are probably few people actually using strax to it's max performance and few will notice.

Can you give a minimal working example (or illustrate with a figure)?
I'll upload a multiprocess problem.ipynb to the StraxTests on the analysiscode repo.

Tests?
Nah don't think such a think is likely to occur again any time soon.

Copy link
Collaborator

@WenzDaniel WenzDaniel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine, thanks

if d in sp.provides:
log.debug(f'{sp} provides {d}')
p.dtype[d] = sp.dtype_for(d)
break
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you checked what happens if you cannot find d in sp.provides.values()? Is the traceback already enough or shall we just add a small raise condition after the for-loop?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that happens, there is some deeper bug in strax because it asks you to produce a datatype that is not provided by any of the multi-process plugins, that is troublesome.

@JoranAngevaare JoranAngevaare merged commit 2f1fa66 into master Jan 5, 2021
@JoranAngevaare JoranAngevaare deleted the fix_multioutput_multiprocess branch January 29, 2021 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Key error for multiprocessing if not making raw_records
2 participants