Skip to content

A programming framework for agentic AI

update

Anonymous-submission-repo02d643bc8037
diff --git a/flaml/tune/searcher/blendsearch.py b/flaml/tune/searcher/blendsearch.py
index e33152f06..2e9e65dd7 100644
--- a/flaml/tune/searcher/blendsearch.py
+++ b/flaml/tune/searcher/blendsearch.py
@@ -126,10 +126,14 @@ class BlendSearch(Searcher):
- "tolerances"(optional): a dictionary to specify the optimality tolerances on objectives. The keys are the
metric names (provided in "metrics"), and the values are the numerical tolerances values.
E.g.,
- ```python
- lexico_objectives = {"metrics":["error_rate","pred_time"], "modes":["min","min"],
- "tolerances":{"error_rate":0.01,"pred_time":0.0}, "targets":{"error_rate":0.0}}
- ```
+ ```python
+ lexico_objectives = {
+ "metrics": ["error_rate", "pred_time"],
+ "modes": ["min", "min"],
+ "tolerances": {"error_rate": 0.01, "pred_time": 0.0},
+ "targets": {"error_rate": 0.0},
+ }
+ ```
experimental: A bool of whether to use experimental features.
"""
self._eps = SEARCH_THREAD_EPS
@@ -145,7 +149,7 @@ class BlendSearch(Searcher):
self.penalty = PENALTY # penalty term for constraints
self._metric, self._mode = metric, mode
self._use_incumbent_result_in_evaluation = use_incumbent_result_in_evaluation
- self.lexico_objectives = lexico_objectives
+ self.lexico_objectives =
init_config = low_cost_partial_config or {}
if not init_config:
logger.info(
diff --git a/flaml/tune/searcher/flow2.py b/flaml/tune/searcher/flow2.py
index 4ceef135d..ec98acbe3 100644
--- a/flaml/tune/searcher/flow2.py
+++ b/flaml/tune/searcher/flow2.py
@@ -83,10 +83,14 @@ class FLOW2(Searcher):
- "tolerances"(optional): a dictionary to specify the optimality tolerances on objectives. The keys are the
metric names (provided in "metrics"), and the values are the numerical tolerances values.
E.g.,
- ```python
- lexico_objectives = {"metrics":["error_rate","pred_time"], "modes":["min","min"],
- "tolerances":{"error_rate":0.01,"pred_time":0.0}, "targets":{"error_rate":0.0}}
- ```
+ ```python
+ lexico_objectives = {
+ "metrics": ["error_rate", "pred_time"],
+ "modes": ["min", "min"],
+ "tolerances": {"error_rate": 0.01, "pred_time": 0.0},
+ "targets": {"error_rate": 0.0},
+ }
+ ```
"""
if mode:
assert mode in ["min", "max"], "`mode` must be 'min' or 'max'."
diff --git a/flaml/tune/tune.py b/flaml/tune/tune.py
index d0ca234c4..0e3236784 100644
--- a/flaml/tune/tune.py
+++ b/flaml/tune/tune.py
@@ -400,10 +400,14 @@ def run(
- "tolerances"(optional): a dictionary to specify the optimality tolerances on objectives. The keys are the
metric names (provided in "metrics"), and the values are the numerical tolerances values.
E.g.,
- ```python
- lexico_objectives = {"metrics":["error_rate","pred_time"], "modes":["min","min"],
- "tolerances":{"error_rate":0.01,"pred_time":0.0}, "targets":{"error_rate":0.0}}
- ```
+ ```python
+ lexico_objectives = {
+ "metrics": ["error_rate", "pred_time"],
+ "modes": ["min", "min"],
+ "tolerances": {"error_rate": 0.01, "pred_time": 0.0},
+ "targets": {"error_rate": 0.0},
+ }
+ ```
**ray_args: keyword arguments to pass to ray.tune.run().
Only valid when use_ray=True.
"""