-
Notifications
You must be signed in to change notification settings - Fork 4
metrics.py: add unit tests that check that mutable input arguments are left unchanged 4/n #42
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
facebook-github-bot
pushed a commit
that referenced
this pull request
Dec 10, 2025
…e left unchanged 4/n (#42) Summary: Testing that metrics are not modifying inputs Differential Revision: D88746354
ba59916 to
46f496f
Compare
46f496f to
6acf693
Compare
facebook-github-bot
pushed a commit
that referenced
this pull request
Dec 19, 2025
…e left unchanged 4/n (#42) Summary: Testing that metrics are not modifying inputs Reviewed By: flinder Differential Revision: D88746354
Summary: Some of our methods using `predicted_labels` (for discrete predictions): - recall - precision - dcg_score - ndcg_score etc. Other methods used `predicted_scores` (for continuous functions): - expected_calibration_error - proportional_expected_calibration_error - adaptive_calibration_error - proportional_adaptive_calibration_error - calibration_ratio - kuiper_calibration However, `normalized_entropy` and `calibration_free_normalized_entropy` used `predictions`, which is inconsistent. Let's switch to `predicted_scores` like the rest. Differential Revision: D88746323
…e left unchanged 4/n (#42) Summary: Testing that metrics are not modifying inputs Reviewed By: flinder Differential Revision: D88746354
6acf693 to
5f1aee7
Compare
facebook-github-bot
pushed a commit
that referenced
this pull request
Dec 19, 2025
…e left unchanged 4/n (#42) Summary: Testing that metrics are not modifying inputs Reviewed By: flinder Differential Revision: D88746354
|
This pull request has been merged in d12af84. |
facebook-github-bot
pushed a commit
that referenced
this pull request
Jan 5, 2026
…e left unchanged Summary: In #42 we added tests that check that metrics.py methods do not alter input dataframes. Here we add similar tests for methods.py (fit and predict methods). Differential Revision: D90116623
facebook-github-bot
pushed a commit
that referenced
this pull request
Jan 5, 2026
…e input arguments are left unchanged Summary: In #42 we added tests that check that metrics.py methods do not alter input dataframes. Here we add similar tests for utils.py. Differential Revision: D90117080
facebook-github-bot
pushed a commit
that referenced
this pull request
Jan 5, 2026
…ts are left unchanged Summary: In #42 we added tests that check that metrics.py methods do not alter input dataframes. Here we add similar tests for segmentation.py. Differential Revision: D90117308
facebook-github-bot
pushed a commit
that referenced
this pull request
Jan 5, 2026
… left unchanged Summary: In #42 we added tests that check that metrics.py methods do not alter input dataframes. Here we add similar tests for tuning.py. Differential Revision: D90117657
facebook-github-bot
pushed a commit
that referenced
this pull request
Jan 5, 2026
…re left unchanged Summary: In #42 we added tests that check that metrics.py methods do not alter input dataframes. Here we add similar tests for tuning.py. Differential Revision: D90117860
meta-codesync bot
pushed a commit
that referenced
this pull request
Jan 5, 2026
…e left unchanged (#77) Summary: Pull Request resolved: #77 In #42 we added tests that check that metrics.py methods do not alter input dataframes. Here we add similar tests for methods.py (fit and predict methods). Reviewed By: Lorenzo-Perini Differential Revision: D90116623 fbshipit-source-id: 54e5a375797e52990455e4c3b717bd41801e69da
meta-codesync bot
pushed a commit
that referenced
this pull request
Jan 5, 2026
…left unchanged (#78) Summary: Pull Request resolved: #78 In #42 we added tests that check that metrics.py methods do not alter input dataframes. Here we add similar tests for utils.py. Reviewed By: Lorenzo-Perini Differential Revision: D90117080 fbshipit-source-id: 9a03c289f0c61cfb2e72bd332f41ceb86845e5fc
meta-codesync bot
pushed a commit
that referenced
this pull request
Jan 5, 2026
…ts are left unchanged (#79) Summary: Pull Request resolved: #79 In #42 we added tests that check that metrics.py methods do not alter input dataframes. Here we add similar tests for segmentation.py. Reviewed By: Lorenzo-Perini Differential Revision: D90117308 fbshipit-source-id: 39a04a3a57bf5c7770d2f783d1eb98e12ae3ac71
meta-codesync bot
pushed a commit
that referenced
this pull request
Jan 5, 2026
… left unchanged (#80) Summary: Pull Request resolved: #80 In #42 we added tests that check that metrics.py methods do not alter input dataframes. Here we add similar tests for tuning.py. Reviewed By: Lorenzo-Perini Differential Revision: D90117657 fbshipit-source-id: ce99065c8bac5b6f00b3122d836bea3cef94c0de
meta-codesync bot
pushed a commit
that referenced
this pull request
Jan 5, 2026
…re left unchanged (#81) Summary: Pull Request resolved: #81 In #42 we added tests that check that metrics.py methods do not alter input dataframes. Here we add similar tests for tuning.py. Reviewed By: Lorenzo-Perini Differential Revision: D90117860 fbshipit-source-id: a1133c72ce12251c999512314aa5786f96a3ad44
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary: Testing that metrics are not modifying inputs
Differential Revision: D88746354