Skip to content

A programming framework for agentic AI

Add documentation for warm-start (#255)

Qingyun Wu94a81a95adf0
diff --git a/flaml/automl.py b/flaml/automl.py
index 5a1f4885b..6e992b1a6 100644
--- a/flaml/automl.py
+++ b/flaml/automl.py
@@ -1402,6 +1402,20 @@ class AutoML:
hyperparamter configurations for the corresponding estimators.
The value can be a single hyperparamter configuration dict or a list
of hyperparamter configuration dicts.
+ In the following code example, we get starting_points from the
+ automl_experiment and use them in the new_automl_experiment.
+ e.g.,
+ .. code-block:: python
+ from flaml import AutoML
+ automl_experiment = AutoML()
+ X_train, y_train = load_iris(return_X_y=True)
+ automl_experiment.fit(X_train, y_train)
+ starting_points = automl_experiment.best_config_per_estimator
+
+ new_automl_experiment = AutoML()
+ new_automl_experiment.fit(X_train, y_train,
+ starting_points=starting_points)
+
seed: int or None, default=None | The random seed for np.random.
n_concurrent_trials: [Experimental] int, default=1 | The number of
concurrent trials. For n_concurrent_trials > 1, installation of
diff --git a/flaml/tune/tune.py b/flaml/tune/tune.py
index 22a7cbd11..d2c28f040 100644
--- a/flaml/tune/tune.py
+++ b/flaml/tune/tune.py
@@ -194,6 +194,18 @@ def run(
as a list so the optimiser can be told the results without
needing to re-compute the trial. Must be the same length as
points_to_evaluate.
+ e.g.,
+ .. code-block:: python
+ points_to_evaluate = [
+ {"b": .99, "cost_related": {"a": 3}},
+ {"b": .99, "cost_related": {"a": 2}},
+ ]
+ evaluated_rewards=[3.0, 1.0]
+
+ means that you know the reward for the two configs in
+ points_to_evaluate are 3.0 and 1.0 respectively and want to
+ inform run()
+
prune_attr: A string of the attribute used for pruning.
Not necessarily in space.
When prune_attr is in space, it is a hyperparameter, e.g.,