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
Warning messages in unit test: "invalid value encountered in double_scalars" and others #311
Comments
invalid value encountered in double_scalars
and others
@jeremyliweishih hm, weird! Yeah I don't see that particular warning about I do see this in the circleci job you linked to:
Let's get rid of those, yeah? Could be covering up bugs. Suggestion for the first: add "try except RuntimeWarning as e: assert False, e" in |
@dsherry @jeremyliweishih I talked to Jeremy about this but I think the PR I'm currently doing takes care of the second warning! :) (#638) |
Problem
Running locally, (on python 3.8, but I've seen similar on other python versions):
Three warnings coming from sklearn and one coming from our code. I seem to get a slightly different combination/order of warnings every time I run the test.
More info
Here's the line the last warning is coming from, in
AutoBase._add_result
:high_variance_cv = (scores.std() / scores.mean()) > .2
I suspect
scores
is all empty or all 0. But why? This is the next thing to look into. Perhaps empty test data when we're scoring the model?My suspicion is that this dataset is too small or too uniform, and that the models trained on it are predicting all the same value or something like that. If I'm right, this reinforces that we need guard rails to detect this problem when the user uploads their data, and that mocking in the unit tests to avoid actual fitting (#275 ) is important (even if this particular test isn't mockable).
I encountered these warnings while debugging bug #167 , so it's possible this is related to that.
Next steps
We should determine why these warnings are showing up. If it's a problem with the test setup, let's change the test to fix or avoid it. Otherwise, it could be a bug. We shouldn't be printing out warnings like this under normal use anyways.
The text was updated successfully, but these errors were encountered: