Skip to content

Commit

Permalink
Add documentation for warm-start (#255)
Browse files Browse the repository at this point in the history
* add documentation for warm-start

* fix typo

* fix typo

* Update flaml/tune/tune.py

Co-authored-by: Chi Wang <[email protected]>

* Update automl.py

Co-authored-by: Qingyun Wu <[email protected]>
Co-authored-by: Chi Wang <[email protected]>
  • Loading branch information
3 people authored Oct 19, 2021
1 parent 7809ec1 commit 94a81a9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
14 changes: 14 additions & 0 deletions flaml/automl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1402,6 +1402,20 @@ def custom_metric(
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
Expand Down
12 changes: 12 additions & 0 deletions flaml/tune/tune.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,18 @@ def compute_with_config(config):
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.,
Expand Down

0 comments on commit 94a81a9

Please sign in to comment.