Fix minor bugs across api, benchmark, generators, metrics, runners, and other modules#4899
Closed
saitcakmak wants to merge 1 commit intofacebook:mainfrom
Closed
Fix minor bugs across api, benchmark, generators, metrics, runners, and other modules#4899saitcakmak wants to merge 1 commit intofacebook:mainfrom
saitcakmak wants to merge 1 commit intofacebook:mainfrom
Conversation
|
@saitcakmak has exported this pull request. If you are a Meta employee, you can view the originating Diff in D92879402. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4899 +/- ##
==========================================
- Coverage 96.84% 96.83% -0.01%
==========================================
Files 596 596
Lines 63480 63478 -2
==========================================
- Hits 61478 61472 -6
- Misses 2002 2006 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…nd other modules (facebook#4899) Summary: Fix bugs in smaller modules with 1-2 files each: - Client JSON snapshot crash when no GenerationStrategy exists: `"generation_strategy" in snapshot` is True for the key with a None value, causing a decode crash. Changed to `snapshot.get("generation_strategy") is not None` (api/client.py:1351) - Benchmark ternary discarding input in both branches: `{} if target_fidelity_and_task is None else {}` always produces an empty dict regardless of input (benchmark/benchmark.py:701) - String `"False"` default (truthy) preventing trials from being marked CANDIDATE: `t.run_metadata.get(STARTED_KEY, "False")` returns the string `"False"` which is truthy, so `not "False"` is always False (runners/map_replay.py:44) - Operator precedence making `noisy=False` set all means to 0.0: `item["mean"] + noise if noisy else 0.0` parses as `(item["mean"] + noise) if noisy else 0.0`, replacing the entire mean with 0.0 when `noisy=False` (metrics/noisy_function_map.py:86, metrics/branin_map.py:119) - Misleading "total number of trials" vs actual trial index (global_stopping/strategies/improvement.py:132) + test update - Typos: "trial rial" → "trial" (fb/tutorials/auto_tuning.py), "prefererd" → "preferred" and stray `f` in f-string (fb/utils/preference/preference.py), "acquistion" → "acquisition" (generators/torch/botorch_modular/utils.py + test) Reviewed By: ItsMrLin Differential Revision: D92879402
e6bf117 to
3aa7602
Compare
|
This pull request has been merged in 2c8dbe5. |
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.
Summary:
Fix bugs in smaller modules with 1-2 files each:
"generation_strategy" in snapshotis True for the key with a None value, causing a decode crash. Changed tosnapshot.get("generation_strategy") is not None(api/client.py:1351){} if target_fidelity_and_task is None else {}always produces an empty dict regardless of input (benchmark/benchmark.py:701)"False"default (truthy) preventing trials from being marked CANDIDATE:t.run_metadata.get(STARTED_KEY, "False")returns the string"False"which is truthy, sonot "False"is always False (runners/map_replay.py:44)noisy=Falseset all means to 0.0:item["mean"] + noise if noisy else 0.0parses as(item["mean"] + noise) if noisy else 0.0, replacing the entire mean with 0.0 whennoisy=False(metrics/noisy_function_map.py:86, metrics/branin_map.py:119)fin f-string (fb/utils/preference/preference.py), "acquistion" → "acquisition" (generators/torch/botorch_modular/utils.py + test)Differential Revision: D92879402