Skip to content
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

fix future warning by avoiding importing private modules #200

Merged
merged 4 commits into from
May 5, 2020

Conversation

StrikerRUS
Copy link
Member

Prepare for next scikit-learn version.

E:\Miniconda3\lib\site-packages\sklearn\utils\deprecation.py:144: FutureWarning: The sklearn.ensemble.forest module is  deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.ensemble. Anything that cannot be imported from sklearn.ensemble is now part of the private API.
  warnings.warn(message, FutureWarning)
E:\Miniconda3\lib\site-packages\sklearn\utils\deprecation.py:144: FutureWarning: The sklearn.linear_model.base module is  deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.linear_model. Anything that cannot be imported from sklearn.linear_model is now part of the private API.
  warnings.warn(message, FutureWarning)

@coveralls
Copy link

coveralls commented May 4, 2020

Coverage Status

Coverage remained the same at 95.858% when pulling f085588 on future_warnings into d73048e on master.

@izeigerman
Copy link
Member

Hey @StrikerRUS, thanks for this PR! Why didn't we limit the area of impact to those modules mentioned in the warning? Eg I don't consider sklearn.linear_model or sklearn.ensemble to be private. Please note that initially we were trying to follow the Google style guide on imports - http://google.github.io/styleguide/pyguide.html#22-imports

@StrikerRUS
Copy link
Member Author

Now Powershell job is failing. Refer to #193 (comment) and #199 (comment).

=================================== FAILURES ===================================
_ test_e2e[xgboost_XGBClassifier - powershell - train_model_classification_binary2] _
estimator = XGBClassifier(base_score=0.6, booster='gblinear', colsample_bylevel=None,
              colsample_bynode=None, colsamp...ambda=0, scale_pos_weight=1, subsample=None,
              tree_method=None, validate_parameters=False, verbosity=None)
executor_cls = <class 'tests.e2e.executors.powershell.PowershellExecutor'>

...

expected=[0.04921597 0.950784  ], actual=[0.0492156801663393, 0.950784319833661]
expected=[0.06305683 0.9369432 ], actual=[0.0630565194153174, 0.936943480584683]
expected=[0.1270023 0.8729977], actual=[0.127001843824201, 0.872998156175799]
expected=[0.0785104 0.9214896], actual=[0.0785098971788289, 0.921490102821171]
expected=[0.8055698  0.19443017], actual=[0.805566852256706, 0.194433147743294]

@StrikerRUS
Copy link
Member Author

Interestingly that expected output sometimes doesn't equal to 1.0 while actual one does.

I'm afraid that the root cause is #188 because I don't remember this error happened before that PR.

@StrikerRUS
Copy link
Member Author

Thanks for the review!
I removed all additional changes in imports. Now this PR only directly addresses FutureWarning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants