Repository navigation
Treat a config constraint equal to the threshold as violating strict "<" - #1668
Open
Mohammad Sohail Shaikh (sohailshk) wants to merge 1 commit into
Conversation
BlendSearch._violate_config_constriants() flagged '<' constraints only when value > threshold, so a config whose constraint value equals the threshold was evaluated although value < threshold is false (the other three signs were already strict in the right direction).
This branch has not been deployed
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.
Why are these changes needed?
BlendSearch._violate_config_constriants()flagssign == "<"only whenvalue > threshold; equality also violates a strict<. The docs (website/docs/Use-Cases/Tune-User-Defined-Function.md, "More constraints on the tuning") list "<=", ">=", "<" and ">" separately; ">" was already strict. Withconfig_constraints=[(lambda c: c["n"], "<", 5)]ontune.randint(0, 11),n == 5was still evaluated. The existing test uses threshold 0.5 on a 0/1 value, so equality never occurs.Change:
>to>=for the<case. Test: a CFO run withpoints_to_evaluate=[{"n": 5}]must never evaluaten >= 5; fails on main (assert 5 < 5), passes now.Related issue number
None.
Checks
Checks run: black (line length 120) and ruff on the changed files. The pinned pre-commit hook versions were not run. No doc changes are needed.