Repository navigation
Prepare for 1.6.0 release - #200
Conversation
antonwolfy
left a comment
There was a problem hiding this comment.
The version bumps look good. My comments are on the release notes. The three below are inaccuracies worth fixing before the release; they're about lines outside the diff, so I couldn't leave them inline. The inline comments are suggestions.
This entry and the geometric one (line 34) both end with "All other streams are unaffected", but the same release also changes the array-parameter streams (gh-171, line 19), the power-of-two randint streams (gh-172) and geometric (gh-196). Each sentence was true in its own PR, but together in the 1.6.0 notes they contradict each other.
Could we drop "All other streams are unaffected" from both entries, or replace it with one line listing every seeded stream that changes in 1.6.0?
"One larger for every p" isn't quite right: irk_geometric_vec only adds 1 when 0 <= out[i] < INT_MAX (mkl_distributions.cpp). Values that overflow int, which MKL writes as negative, are kept as is. So for a tiny p (e.g. 1e-12) the result is the same as before, and geometric(p) - 1 wraps to INT_MAX instead of giving back the old value.
Maybe say "one larger for every p whose result fits in int32", and note (here or in the Fixed entry on line 61) that results are still int32 and can overflow for very small p, unlike NumPy's int64?
gh-159 also fixed several concurrency bugs that aren't listed anywhere: a get_state heap overflow when racing a BRNG change, re-entrancy deadlocks, and MKL stream access outside the per-instance lock in size=None draws, multinomial, multinormal_cholesky, shuffle, seed and the randint helpers.
Since the smaller set_state fix from the same PR is added to Fixed in this PR, it'd be worth adding these too, so users sharing a generator across threads know that 1.5.0 and earlier have these races.
| copyright = "2017-2026, Intel Corp." | ||
| author = "Intel Corp." | ||
| release = "1.6.0dev0" | ||
| release = "1.6.0" |
There was a problem hiding this comment.
Nit, could be a follow-up: the version is kept by hand both here and in mkl_random/_version.py. meson.build already reads _version.py; conf.py could do the same, so future version bumps only touch one file.
There was a problem hiding this comment.
Added a Fixed entry for the two gh-159 bugs that also affect GIL-enabled builds: the get_state buffer overflow when racing a reseed with another brng, and the re-entrancy deadlocks in seed/shuffle. The lock serialization of size=None draws, multinomial, multinormal_cholesky etc. only matters on free-threaded builds: 1.5.0 always ran with the GIL, so those calls were already serialized, and that part is covered by the free-threading entry.
Your nit will be done in the follow-up PR after the release
antonwolfy
left a comment
There was a problem hiding this comment.
Thank you @vlad-perevezentsev
The PR updates
__version__,docs/source/conf.pyand CHANGELOG.md to publish the new 1.6.0 release