Repository navigation
Compare integer parameters exactly in enqueue_trial - #6889
Merged
gen740 merged 2 commits intoOct 10, 2026
Merged
Conversation
Member
gen740
requested changes
Oct 9, 2026
Contributor
Author
|
Removed those test cases. Thanks! |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
enqueue_trial(skip_if_exists=True)treats 100000 and 100001 as duplicates because it converts integers to float and appliesnp.isclose. This silently removes a requested discrete configuration from the queue.Discovered through code inspection and reproduced with the public API:
Description of the changes
Use exact equality for integral values. Preserve the existing approximate comparison for other real values, including its NaN handling. The original review introduced tolerance for floating-point representation errors.
Extend the existing parameterized test with positive/negative neighboring integers, float-conversion precision boundaries, an exact duplicate and a close-float control. The large integer cases test queue identity, not arbitrary-width integer sampling.
Validation:
pytest tests/study_tests/test_study.py -q -k 'enqueue and not grpc': 136 passed.git diff --checkpasses.The storage tests cover in-memory, SQLite, cached SQLite, journal files and the repository's fake-Redis backend. gRPC, live Redis and the full package suite were not run.
Checklist