[MRG] add random_state in tests estimators#8563
[MRG] add random_state in tests estimators#8563kkatrio wants to merge 5 commits intoscikit-learn:mainfrom
Conversation
|
this has lots of conflicts :-/ |
|
I remember at some point a couple of senior devs (I can't find now exactly where, at an email probably) agreeing that random state should not be passed at tests. That's why I left it as it is. In hindsight, my personal --inexperienced-- opinion is that it is not always the best idea. Perhaps each test has different value if it is deterministic or not. If you want I could try to quickly resolve those conflicts but I cannot look into each test and understand if it's the best thing to do. |
|
Sorry I don't understand you comment. I thought we agreed we wanted to add the random state. What does that have to do with the conflicts? |
|
If we want to add the random state at almost all tests, then I will resolve the conflicts. If it is going to be integrated in the master then great. I think there was a discussion here #8194 |
|
ping @lesteve @agramfort @ogrisel @GaelVaroquaux So what's the consensus? I think we should set them. |
|
ping @lesteve @agramfort @ogrisel @GaelVaroquaux So what's the consensus? I
think we should set them.
I am clearly convinced that we should set them. How bad would be the
conflict situation with other PRs?
|
|
Seems like a lot of conflicts.. Would monkeypatching |
|
Just for the record, I am not really convinced that this is worth the pain as I tried to explain in #8194 (comment). |
|
This is quite outdated based on our recent changes, and we mostly set random state when needed in common tests and otherwise these days. So I think we can close this one. |
Reference Issue
Fix #8194
What does this implement/fix? Explain your changes.
Pass random_state in all test cases where it was missing in the estimator's invocation.
Any other comments?
Added only in a few tests yet, nosetests ran OK. If it is correct and there are no further problems, I will add all the rest. Also, should I add in the contributing docs that when possible all estimators in new tests must be invoked with random_state set?