Skip to content

Commit 9037c4b

Browse files
saitcakmakmeta-codesync[bot]
authored andcommitted
Rewrite optimize() to use ax.api.client.Client, remove OptimizationLoop (#5143)
Summary: Pull Request resolved: #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 fbshipit-source-id: dc27a30e0637f62baa05714e4ab4ef120295abea
1 parent b0e6ea4 commit 9037c4b

3 files changed

Lines changed: 360 additions & 612 deletions

File tree

ax/service/__init__.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,3 @@
55
# LICENSE file in the root directory of this source tree.
66

77
# pyre-strict
8-
9-
from ax.service.managed_loop import OptimizationLoop, optimize
10-
11-
12-
__all__ = ["OptimizationLoop", "optimize"]

0 commit comments

Comments
 (0)