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

DOC: Best randomness with Parallel generators #1490

Merged
merged 3 commits into from
Nov 15, 2023
Merged

Conversation

paquiteau
Copy link
Contributor

Hi,

I found a small imprecision in the parallel random state example 1, as using iterative seed is not recommended as per 2. This PR update the example to the best practice, and add a reference to the Numpy documentation for the curious reader.

Footnotes

  1. https://joblib.readthedocs.io/en/latest/auto_examples/parallel_random_state.html#sphx-glr-auto-examples-parallel-random-state-py

  2. https://numpy.org/doc/stable/reference/random/parallel.html#sequence-of-integer-seeds

@codecov
Copy link

codecov bot commented Aug 5, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0c57c18) 94.82% compared to head (c0bb184) 94.84%.
Report is 17 commits behind head on master.

❗ Current head c0bb184 differs from pull request most recent head 32f3ea7. Consider uploading reports for the commit 32f3ea7 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1490      +/-   ##
==========================================
+ Coverage   94.82%   94.84%   +0.02%     
==========================================
  Files          45       45              
  Lines        7491     7491              
==========================================
+ Hits         7103     7105       +2     
+ Misses        388      386       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

examples/parallel_random_state.py Outdated Show resolved Hide resolved
examples/parallel_random_state.py Outdated Show resolved Hide resolved
@ogrisel
Copy link
Contributor

ogrisel commented Nov 15, 2023

The deadlock in the shutdown of the linux_py310_distributed tests is unrelated.

The read the docs failure seems unrelated as well:

Problem in your project's configuration. Invalid configuration option "build.os": build not found.

but it's unfortunate because I would have liked the updated example in this PR to be executed on readthedocs before merging.

Copy link
Contributor

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

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

It did run successfully in the previous iteration though:

https://readthedocs.org/projects/joblib/builds/22563643/

Let's merge.

@ogrisel ogrisel merged commit 6a5f1b9 into joblib:master Nov 15, 2023
11 of 14 checks passed
@ogrisel
Copy link
Contributor

ogrisel commented Nov 15, 2023

Thanks @paquiteau!

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.

None yet

2 participants