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

WB-6749: sklearn plot_calibration_curve breaks the provided model #2791

Merged

Conversation

vwrj
Copy link
Contributor

@vwrj vwrj commented Oct 19, 2021

https://wandb.atlassian.net/browse/WB-6749

wandb.sklearn.plot_calibration_curve included a fake dataset generation step (with 20 features), and used the user's model in the calibration fitting step on this fake dataset. This caused the model to break when user tried to use it on their original dataset (with 11 features).

Description

Removed fake dataset generation and other unnecessary code including user's model used for calibration fitting & unused variables. Code also raises an error if plot_calibration_curve is used for multi-class datasets. Only binary classification is supported at this moment.

Testing

Tested manually.

Release Notes

Below, please enter user-facing release notes as one or more bullet points.
If your change is not user-visible, write NO RELEASE NOTES instead, with no bullet points.

------------- BEGIN RELEASE NOTES ------------------
NO RELEASE NOTES
------------- END RELEASE NOTES --------------------

…user's model used for calibration fitting & unused variables. Code also raises an error if plot_calibration_curve is used for multi-class datasets. Only binary classification is supported at this moment.
@codecov
Copy link

codecov bot commented Oct 19, 2021

Codecov Report

Merging #2791 (bc68763) into master (3efbeec) will increase coverage by 0.02%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2791      +/-   ##
==========================================
+ Coverage   76.22%   76.24%   +0.02%     
==========================================
  Files         178      178              
  Lines       26489    26487       -2     
==========================================
+ Hits        20190    20196       +6     
+ Misses       6299     6291       -8     
Flag Coverage Δ
functest 50.63% <0.00%> (+0.02%) ⬆️
unittest 70.42% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
wandb/sklearn/__init__.py 42.66% <0.00%> (+0.18%) ⬆️
wandb/sdk/lib/git.py 75.86% <0.00%> (ø)
wandb/sdk/lib/redirect.py 86.35% <0.00%> (+0.17%) ⬆️
wandb/sdk/internal/meta.py 90.18% <0.00%> (+3.06%) ⬆️

@vwrj vwrj requested a review from kptkin October 20, 2021 23:39
@vwrj vwrj merged commit dd68032 into master Oct 22, 2021
@vanpelt vanpelt deleted the WB-6749-sklearn-plot_calibration_curve-breaks-the-provided-model branch January 28, 2022 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants