-
Notifications
You must be signed in to change notification settings - Fork 4
Fix a few code quality issues in metrics 2/n #40
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
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 9, 2025
Summary: Changes: - Fixed typo min_segmens_size -> min_segments_size - One of the tests missed the `test_` prefix and therefore never ran. It was actually a test to check that a mutable input argument was never modified, so given recent SEV, it is an important type of test - In one unit test, I switched to using an RNG seed, to prevent that this test might potentially be flaky / non-deterministic - List comprehension was unnecessarily complex with brackets and parantheses Differential Revision: D88744756
8c3d763 to
9c665f3
Compare
facebook-github-bot
pushed a commit
that referenced
this pull request
Dec 9, 2025
Summary: Changes: - Fixed typo min_segmens_size -> min_segments_size - One of the tests missed the `test_` prefix and therefore never ran. It was actually a test to check that a mutable input argument was never modified, so given recent SEV, it is an important type of test - In one unit test, I switched to using an RNG seed, to prevent that this test might potentially be flaky / non-deterministic - List comprehension was unnecessarily complex with brackets and parantheses Differential Revision: D88744756
facebook-github-bot
pushed a commit
that referenced
this pull request
Dec 9, 2025
Summary: Changes: - Fixed typo min_segmens_size -> min_segments_size - One of the tests missed the `test_` prefix and therefore never ran. It was actually a test to check that a mutable input argument was never modified, so given recent SEV, it is an important type of test - In one unit test, I switched to using an RNG seed, to prevent that this test might potentially be flaky / non-deterministic - List comprehension was unnecessarily complex with brackets and parantheses Differential Revision: D88744756
facebook-github-bot
pushed a commit
that referenced
this pull request
Dec 10, 2025
Summary: Changes: - Fixed typo min_segmens_size -> min_segments_size - One of the tests missed the `test_` prefix and therefore never ran. It was actually a test to check that a mutable input argument was never modified, so given recent SEV, it is an important type of test - In one unit test, I switched to using an RNG seed, to prevent that this test might potentially be flaky / non-deterministic - List comprehension was unnecessarily complex with brackets and parantheses Reviewed By: Lorenzo-Perini Differential Revision: D88744756
facebook-github-bot
pushed a commit
that referenced
this pull request
Dec 10, 2025
Summary: Changes: - Fixed typo min_segmens_size -> min_segments_size - One of the tests missed the `test_` prefix and therefore never ran. It was actually a test to check that a mutable input argument was never modified, so given recent SEV, it is an important type of test - In one unit test, I switched to using an RNG seed, to prevent that this test might potentially be flaky / non-deterministic - List comprehension was unnecessarily complex with brackets and parantheses Reviewed By: Lorenzo-Perini Differential Revision: D88744756
facebook-github-bot
pushed a commit
that referenced
this pull request
Dec 10, 2025
Summary: Changes: - Fixed typo min_segmens_size -> min_segments_size - One of the tests missed the `test_` prefix and therefore never ran. It was actually a test to check that a mutable input argument was never modified, so given recent SEV, it is an important type of test - In one unit test, I switched to using an RNG seed, to prevent that this test might potentially be flaky / non-deterministic - List comprehension was unnecessarily complex with brackets and parantheses Reviewed By: Lorenzo-Perini Differential Revision: D88744756
9c665f3 to
fcd6da0
Compare
facebook-github-bot
pushed a commit
that referenced
this pull request
Dec 10, 2025
Summary: Changes: - Fixed typo min_segmens_size -> min_segments_size - One of the tests missed the `test_` prefix and therefore never ran. It was actually a test to check that a mutable input argument was never modified, so given recent SEV, it is an important type of test - In one unit test, I switched to using an RNG seed, to prevent that this test might potentially be flaky / non-deterministic - List comprehension was unnecessarily complex with brackets and parantheses Reviewed By: Lorenzo-Perini Differential Revision: D88744756
fcd6da0 to
9435d0f
Compare
facebook-github-bot
pushed a commit
that referenced
this pull request
Dec 10, 2025
Summary: Changes: - Fixed typo min_segmens_size -> min_segments_size - One of the tests missed the `test_` prefix and therefore never ran. It was actually a test to check that a mutable input argument was never modified, so given recent SEV, it is an important type of test - In one unit test, I switched to using an RNG seed, to prevent that this test might potentially be flaky / non-deterministic - List comprehension was unnecessarily complex with brackets and parantheses Reviewed By: Lorenzo-Perini Differential Revision: D88744756
9435d0f to
bdf95ee
Compare
Summary: Latest sklearn version no longer accepts empty input, and raises an error. This breaks our unit test, and our Github CI. This change keeps our behavior the same as it was. See error: https://github.com/facebookincubator/MCGrad/actions/runs/20099929745/job/57667810962 Reviewed By: Lorenzo-Perini Differential Revision: D88847925
Summary: This diff just does the low-hanging fruit: removing references to internal wikis, documentation, code, etc # Discussion point - There are still a bunch of metrics that have `adjust_unjoined` argument, and a description of what unjoined data is. It will be somewhat non-trivial to fully disentangle this from the main metrics. Do want to: 1) Fully remove all mentions of `adjust_unjoined`, disentangle all unjoined versions of the metrics from the main metric implementation, and move those to the `internal` folder, or 2) Simply just remove the references of where unjoined data is used (previously one comment said that it is used a lot in the Ads or), and be OK with `adjust_unjoined` existing in the codebase. My feeling is that this will come across at worst as "a bit silly" to outsiders, and they will wonder "why the hell would anyone ever have data in that format", but as I foresee, the harm of leaving it in won't really go beyond that. Reviewed By: Lorenzo-Perini Differential Revision: D88739146
Summary: Changes: - Fixed typo min_segmens_size -> min_segments_size - One of the tests missed the `test_` prefix and therefore never ran. It was actually a test to check that a mutable input argument was never modified, so given recent SEV, it is an important type of test - In one unit test, I switched to using an RNG seed, to prevent that this test might potentially be flaky / non-deterministic - List comprehension was unnecessarily complex with brackets and parantheses Reviewed By: Lorenzo-Perini Differential Revision: D88744756
bdf95ee to
38cbb26
Compare
|
This pull request has been merged in a853552. |
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:
Changes:
test_prefix and therefore never ran. It was actually a test to check that a mutable input argument was never modified, so given recent SEV, it is an important type of testDifferential Revision: D88744756