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

Made Broken Pipe Error more verbose #3292

Merged
merged 11 commits into from
Dec 22, 2018

Conversation

lucianopaz
Copy link
Contributor

Sampling with more than 1 core on Windows os uses process spawning instead of forking. While the processes are being spawned, they are completely independent from the main process (the parent) and are unaware of how to communicate any error with the parent. This means that errors raised during the spawning, such as unpickling errors, lack of if __name__ == "__main__" statements and potentially other problems are not informed to the main process, which can only see that the communication pipe with its children is broken. This PR ONLY changes the main process' error message because there is no way that it can know what happened to the errored spawn.

@twiecki
Copy link
Member

twiecki commented Dec 8, 2018

This is great! Needs a rebase.

RELEASE-NOTES.md Outdated
@@ -34,6 +34,7 @@
- Fixed `Rice` distribution, which inconsistently mixed two parametrizations (#3286).
- `Rice` distribution now accepts multiple parameters and observations and is usable with NUTS (#3289).
- `sample_posterior_predictive` no longer calls `draw_values` to initialize the shape of the ppc trace. This called could lead to `ValueError`'s when sampling the ppc from a model with `Flat` or `HalfFlat` prior distributions (Fix issue #3294).
- Made `BrokenPipeError` for parallel sampling more verbose on Windows.
Copy link
Member

Choose a reason for hiding this comment

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

Can you move this to 3.7?

@twiecki twiecki merged commit 98fd63e into pymc-devs:master Dec 22, 2018
@lucianopaz lucianopaz deleted the windows_parallel_sampling branch February 24, 2019 07:46
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.

2 participants