A programming framework for agentic AI
Format errors on the web. (#855)
Shaokun4140fc902258
diff --git a/flaml/automl/automl.py b/flaml/automl/automl.pyindex db092b524..d8c376c68 100644--- a/flaml/automl/automl.py+++ b/flaml/automl/automl.py@@ -2817,7 +2817,7 @@ class AutoML(BaseEstimator):logger.warning("No search budget is provided via time_budget or max_iter."" Training only one model per estimator."- " Zero-shot AutoML is used for certain tasks and estimators."+ " Zero-shot AutoML is used for certain tasks and estimators."" To tune hyperparameters for each estimator,"" please provide budget either via time_budget or max_iter.")diff --git a/flaml/tune/searcher/blendsearch.py b/flaml/tune/searcher/blendsearch.pyindex 25f91a675..f23d35c22 100644--- a/flaml/tune/searcher/blendsearch.py+++ b/flaml/tune/searcher/blendsearch.py@@ -124,7 +124,7 @@ class BlendSearch(Searcher):objectives in the metric list. If not provided, we use "min" as the default mode for all the objectives.- "targets" (optional): a dictionary to specify the optimization targets on the objectives. The keys are themetric names (provided in "metric"), and the values are the numerical target values.- - "tolerances"(optional): a dictionary to specify the optimality tolerances on objectives. The keys are the+ - "tolerances" (optional): a dictionary to specify the optimality tolerances on objectives. The keys are themetric names (provided in "metrics"), and the values are the numerical tolerances values.E.g.,```pythondiff --git a/flaml/tune/searcher/flow2.py b/flaml/tune/searcher/flow2.pyindex 799660e63..ce097ba0b 100644--- a/flaml/tune/searcher/flow2.py+++ b/flaml/tune/searcher/flow2.py@@ -80,7 +80,7 @@ class FLOW2(Searcher):objectives in the metric list. If not provided, we use "min" as the default mode for all the objectives- "targets" (optional): a dictionary to specify the optimization targets on the objectives. The keys are themetric names (provided in "metric"), and the values are the numerical target values.- - "tolerances"(optional): a dictionary to specify the optimality tolerances on objectives. The keys are the+ - "tolerances" (optional): a dictionary to specify the optimality tolerances on objectives. The keys are themetric names (provided in "metrics"), and the values are the numerical tolerances values.E.g.,```pythondiff --git a/flaml/tune/tune.py b/flaml/tune/tune.pyindex bc2e11ada..8af41885b 100644--- a/flaml/tune/tune.py+++ b/flaml/tune/tune.py@@ -396,17 +396,17 @@ def run(objectives in the metric list. If not provided, we use "min" as the default mode for all the objectives.- "targets" (optional): a dictionary to specify the optimization targets on the objectives. The keys are themetric names (provided in "metric"), and the values are the numerical target values.- - "tolerances"(optional): a dictionary to specify the optimality tolerances on objectives. The keys are the+ - "tolerances" (optional): a dictionary to specify the optimality tolerances on objectives. The keys are themetric 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."""diff --git a/website/docs/Use-Cases/Tune-User-Defined-Function.md b/website/docs/Use-Cases/Tune-User-Defined-Function.mdindex 39f04eb86..0346d03b0 100644--- a/website/docs/Use-Cases/Tune-User-Defined-Function.md+++ b/website/docs/Use-Cases/Tune-User-Defined-Function.md@@ -100,14 +100,14 @@ If it is a numerical hyperparameter, you need to know whether it takes integer v```python{-"learning_rate": tune.loguniform(lower=1 / 1024, upper=1.0),+ "learning_rate": tune.loguniform(lower=1 / 1024, upper=1.0),}```When the search range of learning rate is small, it is more common to sample in the linear scale as shown in the following example,```python{-"learning_rate": tune.uniform(lower=0.1, upper=0.2),+ "learning_rate": tune.uniform(lower=0.1, upper=0.2),}```@@ -117,7 +117,7 @@ When the search range of learning rate is small, it is more common to sample inWhen you have a desired quantization granularity for the hyperparameter change, you can use `tune.qlograndint` or `tune.qloguniform` to realize the quantization requirement. The following code example helps you realize the need for sampling uniformly in the range of 0.1 and 0.2 with increments of 0.02, i.e., the sampled learning rate can only take values in {0.1, 0.12, 0.14, 0.16, ..., 0.2},```python{-"learning_rate": tune.uniform(lower=0.1, upper=0.2, q=0.02),+ "learning_rate": tune.quniform(lower=0.1, upper=0.2, q=0.02),}```@@ -529,7 +529,7 @@ In the following example, we want to minimize `val_loss` and `pred_time` of the```pythonlexico_objectives = {}lexico_objectives["metrics"] = ["val_loss", "pred_time"]-lexico_objectives["pred_time"] = ["min", "min"]+lexico_objectives["modes"] = ["min", "min"]lexico_objectives["tolerances"] = {"val_loss": 0.02, "pred_time": 0.0}lexico_objectives["targets"] = {"val_loss": -float('inf'), "pred_time": -float('inf')}