Skip to content

Rewrite optimize() to use ax.api.client.Client, remove OptimizationLoop (#5143)#5143

Open
saitcakmak wants to merge 1 commit intofacebook:mainfrom
saitcakmak:export-D99497269
Open

Rewrite optimize() to use ax.api.client.Client, remove OptimizationLoop (#5143)#5143
saitcakmak wants to merge 1 commit intofacebook:mainfrom
saitcakmak:export-D99497269

Conversation

@saitcakmak
Copy link
Copy Markdown
Contributor

@saitcakmak saitcakmak commented Apr 3, 2026

Summary:

Goal: Eliminate legacy code that keeps other legacy code alive. Even though managed loop is deprecated, it has internal use cases. It seemed easier to migrate it then to try to clean up every single use case.

The OptimizationLoop class in managed_loop.py was a legacy managed optimization loop that used choose_generation_strategy_legacy. This diff:

  • Rewrites the deprecated optimize() function to use the modern ax.api.client.Client API
  • Removes the OptimizationLoop class entirely (no external callers)
  • Splits managed_loop into its own BUCK target with minimal dependencies
  • Updates tests and LLM rules to reflect the changes

The optimize() function signature and return type are preserved for backward compatibility with existing callers.

Reviewed By: esantorella

Differential Revision: D99497269

@meta-cla meta-cla Bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Apr 3, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Apr 3, 2026

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

@meta-codesync meta-codesync Bot changed the title Rewrite optimize() to use ax.api.client.Client, remove OptimizationLoop Rewrite optimize() to use ax.api.client.Client, remove OptimizationLoop (#5143) Apr 6, 2026
saitcakmak added a commit to saitcakmak/Ax that referenced this pull request Apr 6, 2026
…op (facebook#5143)

Summary:

**Goal:** Eliminate legacy code that keeps other legacy code alive. Even though managed loop is deprecated, it has internal use cases. It seemed easier to migrate it then to try to clean up every single use case.

The `OptimizationLoop` class in `managed_loop.py` was a legacy managed optimization loop that used `choose_generation_strategy_legacy`. This diff:
- Rewrites the deprecated `optimize()` function to use the modern `ax.api.client.Client` API
- Removes the `OptimizationLoop` class entirely (no external callers)
- Splits `managed_loop` into its own BUCK target with minimal dependencies
- Updates tests and LLM rules to reflect the changes

The `optimize()` function signature and return type are preserved for backward compatibility with existing callers.

Differential Revision: D99497269
saitcakmak added a commit to saitcakmak/Ax that referenced this pull request Apr 7, 2026
…op (facebook#5143)

Summary:

**Goal:** Eliminate legacy code that keeps other legacy code alive. Even though managed loop is deprecated, it has internal use cases. It seemed easier to migrate it then to try to clean up every single use case.

The `OptimizationLoop` class in `managed_loop.py` was a legacy managed optimization loop that used `choose_generation_strategy_legacy`. This diff:
- Rewrites the deprecated `optimize()` function to use the modern `ax.api.client.Client` API
- Removes the `OptimizationLoop` class entirely (no external callers)
- Splits `managed_loop` into its own BUCK target with minimal dependencies
- Updates tests and LLM rules to reflect the changes

The `optimize()` function signature and return type are preserved for backward compatibility with existing callers.

Differential Revision: D99497269
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 7, 2026

Codecov Report

❌ Patch coverage is 85.89744% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.40%. Comparing base (8c8dc6c) to head (58c4d68).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
ax/service/managed_loop.py 79.62% 22 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5143      +/-   ##
==========================================
- Coverage   96.42%   96.40%   -0.03%     
==========================================
  Files         619      618       -1     
  Lines       69293    69214      -79     
==========================================
- Hits        66818    66723      -95     
- Misses       2475     2491      +16     

☔ 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.

saitcakmak added a commit to saitcakmak/Ax that referenced this pull request Apr 20, 2026
…op (facebook#5143)

Summary:

**Goal:** Eliminate legacy code that keeps other legacy code alive. Even though managed loop is deprecated, it has internal use cases. It seemed easier to migrate it then to try to clean up every single use case.

The `OptimizationLoop` class in `managed_loop.py` was a legacy managed optimization loop that used `choose_generation_strategy_legacy`. This diff:
- Rewrites the deprecated `optimize()` function to use the modern `ax.api.client.Client` API
- Removes the `OptimizationLoop` class entirely (no external callers)
- Splits `managed_loop` into its own BUCK target with minimal dependencies
- Updates tests and LLM rules to reflect the changes

The `optimize()` function signature and return type are preserved for backward compatibility with existing callers.

Differential Revision: D99497269
saitcakmak added a commit to saitcakmak/Ax that referenced this pull request Apr 20, 2026
…op (facebook#5143)

Summary:

**Goal:** Eliminate legacy code that keeps other legacy code alive. Even though managed loop is deprecated, it has internal use cases. It seemed easier to migrate it then to try to clean up every single use case.

The `OptimizationLoop` class in `managed_loop.py` was a legacy managed optimization loop that used `choose_generation_strategy_legacy`. This diff:
- Rewrites the deprecated `optimize()` function to use the modern `ax.api.client.Client` API
- Removes the `OptimizationLoop` class entirely (no external callers)
- Splits `managed_loop` into its own BUCK target with minimal dependencies
- Updates tests and LLM rules to reflect the changes

The `optimize()` function signature and return type are preserved for backward compatibility with existing callers.

Differential Revision: D99497269
saitcakmak added a commit to saitcakmak/Ax that referenced this pull request Apr 20, 2026
…op (facebook#5143)

Summary:
Pull Request resolved: facebook#5143

**Goal:** Eliminate legacy code that keeps other legacy code alive. Even though managed loop is deprecated, it has internal use cases. It seemed easier to migrate it then to try to clean up every single use case.

The `OptimizationLoop` class in `managed_loop.py` was a legacy managed optimization loop that used `choose_generation_strategy_legacy`. This diff:
- Rewrites the deprecated `optimize()` function to use the modern `ax.api.client.Client` API
- Removes the `OptimizationLoop` class entirely (no external callers)
- Splits `managed_loop` into its own BUCK target with minimal dependencies
- Updates tests and LLM rules to reflect the changes

The `optimize()` function signature and return type are preserved for backward compatibility with existing callers.

Differential Revision: D99497269
@saitcakmak saitcakmak force-pushed the export-D99497269 branch 2 times, most recently from 695e17f to 342a96c Compare April 21, 2026 21:19
saitcakmak added a commit to saitcakmak/Ax that referenced this pull request Apr 21, 2026
…op (facebook#5143)

Summary:

**Goal:** Eliminate legacy code that keeps other legacy code alive. Even though managed loop is deprecated, it has internal use cases. It seemed easier to migrate it then to try to clean up every single use case.

The `OptimizationLoop` class in `managed_loop.py` was a legacy managed optimization loop that used `choose_generation_strategy_legacy`. This diff:
- Rewrites the deprecated `optimize()` function to use the modern `ax.api.client.Client` API
- Removes the `OptimizationLoop` class entirely (no external callers)
- Splits `managed_loop` into its own BUCK target with minimal dependencies
- Updates tests and LLM rules to reflect the changes

The `optimize()` function signature and return type are preserved for backward compatibility with existing callers.

Reviewed By: esantorella

Differential Revision: D99497269
…op (facebook#5143)

Summary:
Pull Request resolved: facebook#5143

**Goal:** Eliminate legacy code that keeps other legacy code alive. Even though managed loop is deprecated, it has internal use cases. It seemed easier to migrate it then to try to clean up every single use case.

The `OptimizationLoop` class in `managed_loop.py` was a legacy managed optimization loop that used `choose_generation_strategy_legacy`. This diff:
- Rewrites the deprecated `optimize()` function to use the modern `ax.api.client.Client` API
- Removes the `OptimizationLoop` class entirely (no external callers)
- Splits `managed_loop` into its own BUCK target with minimal dependencies
- Updates tests and LLM rules to reflect the changes

The `optimize()` function signature and return type are preserved for backward compatibility with existing callers.

Reviewed By: esantorella

Differential Revision: D99497269
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