Skip to content

Conversation

@saitcakmak
Copy link
Contributor

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

saitcakmak and others added 2 commits February 10, 2026 15:07
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
@meta-cla meta-cla bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Feb 11, 2026
@meta-codesync
Copy link

meta-codesync bot commented Feb 11, 2026

@saitcakmak has exported this pull request. If you are a Meta employee, you can view the originating Diff in D92879499.

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 85.71429% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.76%. Comparing base (98b0e66) to head (14f89cb).

Files with missing lines Patch % Lines
ax/storage/sqa_store/utils.py 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4893      +/-   ##
==========================================
- Coverage   96.76%   96.76%   -0.01%     
==========================================
  Files         593      593              
  Lines       62035    62038       +3     
==========================================
+ Hits        60030    60032       +2     
- Misses       2005     2006       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants