[WIP] Prototype 1 for strict check_estimator mode#16882
[WIP] Prototype 1 for strict check_estimator mode#16882NicolasHug wants to merge 3 commits intoscikit-learn:masterfrom
Conversation
|
OK, test failure is normal (it's because we print in a test, which is going to be removed of course). @rth @jnothman @thomasjpfan WDYT, are you OK with this idea of marking strict checks with a decorator? I'm not a fan of the use of the global var, interested in your input Thanks |
|
Thanks for giving this a go @NicolasHug ! If we want to avoid global variable, I guess the other solution is to mark the checks to skip in a decorator in some way (e.g. set an attribute), def strict_check(check):
setattr(check, 'strict', True)
# do we actually need to use the wrapper in this case?
# the signature is preserved as far as I can tell
return checkthen pass Otherwise yes, why not for decorators. |
|
Although the other use case this doesn't address is to run the test but skip /modify some of it's parts when If we do that, calling some function |
Yeah if we want to allow this I think we need to pass a |
|
(Thanks for the feedback!) |
Closes #14929
Fixes #13969
Fixes #16241
See also alternative #16890 and #17252
Probably too hacky but why not...