-
Notifications
You must be signed in to change notification settings - Fork 357
Fix bugs in generation strategy modules #4894
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
Open
saitcakmak
wants to merge
3
commits into
facebook:main
Choose a base branch
from
saitcakmak:export-D92879532
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+64
−46
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
Summary: Fix multiple bugs in ax/core and ax/orchestration: - `Arm.md5hash` hashes unconverted parameters instead of the numpy-type-converted `new_parameters` (core/arm.py:94) - `GeneratorRun.clone()` doesn't copy `gen_metadata` or `candidate_metadata_by_arm_signature`, causing mutations on the clone to affect the original (core/generator_run.py:304-346) - Module-level dict mutation in `OutcomeConstraint`: writing `fmt_data["name"] = ...` mutates the shared module-level dicts `UPPER_BOUND_MISMATCH` / `LOWER_BOUND_THRESHOLD` etc. (core/outcome_constraint.py:123,159) - Typo in method name: `is_reconverable_fetch_e` → `is_recoverable_fetch_e` (core/metric.py:168, orchestration/orchestrator.py:2098) - `force_refit` parameter hardcoded to True instead of using the passed argument (orchestration/orchestrator.py:1230) - Grammar fix: "values is better" → "values are better" (core/outcome_constraint.py) - Missing spaces between concatenated strings (core/parameter.py, core/parameter_constraint.py, core/experiment.py) Differential Revision: D92879435
Summary: Fix multiple bugs in ax/storage: - Missing `raise` before `SQADecodeError` silently ignores JSON mismatches during `copy_db_ids` (sqa_store/utils.py:114) - `int(None)` crash in SQA encoder: `metric_registry.get()` can return None, but the result was immediately passed to `int()` before the None check could run (sqa_store/encoder.py:393) - `AttributeError` on None kwargs in JSON decoder: `kwargs.pop()` was called before the `if kwargs is not None` guard (json_store/decoder.py:1092) - `decode_args_list` length mismatch in SQA save: used `len(trials)` instead of `len(trials_to_reduce_state)` and `[...] * len(trials)` instead of a single-element list (sqa_store/save.py:245,254) - SQLAlchemy filter no-op: `SQAExperiment.id is not None` uses Python identity check instead of SQLAlchemy's `.isnot(None)` (sqa_store/load.py:760) - Inconsistent threshold in error message: says "> 10" but the actual check is `> 15` (sqa_store/utils.py:77) - Garbled error message in with_db_settings_base.py: sentence fragments in wrong order (sqa_store/with_db_settings_base.py:106) - Doubled path `ax/ax/storage` in error message (sqa_store/encoder.py:131) - Backslash line-continuation inside string literal causes 16 extra spaces in error message (sqa_store/encoder.py:654) - Missing space between concatenated strings (sqa_store/db.py) - Typo "SCalarized" → "Scalarized" (sqa_store/encoder.py) - Missing space in SKIP_ATTRS_ERROR_SUFFIX (sqa_store/utils.py) Differential Revision: D92879499
Summary: Fix multiple bugs in ax/generation_strategy: - `min_trials_observed or ceil(...)` fails when `min_trials_observed=0` is explicitly passed: Python truthiness treats 0 as falsy, so the explicit value is discarded in favor of the default. Changed to `is None` check (dispatch_utils.py:61,127) - `max_parallelism_override and max_parallelism_cap` truthiness check misses explicit 0 values for the same reason. Changed to `is not None` checks (dispatch_utils.py:441) - Wrong variable in dedup check: `ObservationFeatures` object compared against list of `TParameterization` dicts instead of comparing `o.parameters` (external_generation_node.py:199) - Generation node setting wrong `_previous_node_name`: was setting it to the node being transitioned *to* instead of the node being transitioned *from* (generation_strategy.py:546) - Grammar fixes: "you are should" → "you should", "more is are available" → "more data is available" (generation_strategy.py, transition_criterion.py) Differential Revision: D92879532
|
@saitcakmak has exported this pull request. If you are a Meta employee, you can view the originating Diff in D92879532. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4894 +/- ##
==========================================
- Coverage 96.76% 96.76% -0.01%
==========================================
Files 593 593
Lines 62035 62038 +3
==========================================
+ Hits 60030 60031 +1
- Misses 2005 2007 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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:
Fix multiple bugs in ax/generation_strategy:
min_trials_observed or ceil(...)fails whenmin_trials_observed=0is explicitly passed: Python truthiness treats 0 as falsy, so the explicit value is discarded in favor of the default. Changed tois Nonecheck (dispatch_utils.py:61,127)max_parallelism_override and max_parallelism_captruthiness check misses explicit 0 values for the same reason. Changed tois not Nonechecks (dispatch_utils.py:441)ObservationFeaturesobject compared against list ofTParameterizationdicts instead of comparingo.parameters(external_generation_node.py:199)_previous_node_name: was setting it to the node being transitioned to instead of the node being transitioned from (generation_strategy.py:546)Differential Revision: D92879532