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.

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.

…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
@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
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.

1 participant