<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Sun, Jun 3, 2018 at 10:27 PM <<a href="mailto:josef.pktd@gmail.com" target="_blank">josef.pktd@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 4, 2018 at 12:53 AM, Stephan Hoyer <span dir="ltr"><<a href="mailto:shoyer@gmail.com" target="_blank">shoyer@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><span><div dir="ltr">On Sun, Jun 3, 2018 at 8:22 PM Ralf Gommers <<a href="mailto:ralf.gommers@gmail.com" target="_blank">ralf.gommers@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">It may be worth having a look at test suites for scipy, statsmodels, scikit-learn, etc. and estimate how much work this NEP causes those projects. If the devs of those packages are forced to do large scale migrations from RandomState to StableState, then why not instead keep RandomState and just add a new API next to it?</div></div></div></blockquote><div><br></div></span><div>Tests that explicitly create RandomState objects would not be difficult to migrate. The goal of "StableState" is that it could be used directly in cases where RandomState is current used in tests, so I would guess that "RandomState" could be almost mechanistically replaced by "StableState".<br></div><div><br></div><div>The challenging case are calls to np.random.seed(). If no replacement API is planned, then these would need to be manually converted to use StableState instead. This is probably not too onerous (and is a good cleanup to do anyways) but it would be a bit of work.</div></div></div></blockquote><div><br></div><div>I agree with this. Statsmodels uses mostly np.random.seed. That cleanup is planned, but postponed so far as not high priority. We will have to do it eventually.</div><div><br></div><div>The main work will come when StableState doesn't include specific distribution, Poisson, NegativeBinomial, Gamma, ... and distributions that we don't even use yet, like Beta.</div></div></div></div></blockquote><div><br></div><div>I would posit that it is probably very rare that one uses the full breadth of distributions in unit tests. You may be the only one. :-)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>I don't want to migrate random number generation for the distributions abandoned by numpy Stable to statsmodels.</div></div></div></div></blockquote><div><br></div><div>What if we followed Kevin's suggestion and forked off RandomState into its own forever-frozen package sooner rather than later? It's intended use would be for people with legacy packages that cannot upgrade (other than changing some imports) and for unit tests that require precise streams for a full breadth of distributions. We would still leave it in numpy.random for a deprecation period, but maybe we would be noisy about it sooner and remove it sooner than my NEP planned for.</div><div><br></div><div>Would that work? I'd be happy to maintain that forked-RandomState for you.</div><div><br></div><div>I would probably still encourage most people to continue to use StableRandom for most unit testing.</div><div> </div></div>-- <br><div dir="ltr" class="m_1392708077971474019gmail_signature" data-smartmail="gmail_signature">Robert Kern</div></div>