ray.tune.search.ConcurrencyLimiter#
- class ray.tune.search.ConcurrencyLimiter(searcher: Searcher, max_concurrent: int, batch: bool = False)[source]#
Bases:
Searcher
A wrapper algorithm for limiting the number of concurrent trials.
Certain Searchers have their own internal logic for limiting the number of concurrent trials. If such a Searcher is passed to a
ConcurrencyLimiter
, themax_concurrent
of theConcurrencyLimiter
will override themax_concurrent
value of the Searcher. TheConcurrencyLimiter
will then let the Searcher’s internal logic take over.- Parameters:
searcher – Searcher object that the ConcurrencyLimiter will manage.
max_concurrent – Maximum concurrent samples from the underlying searcher.
batch – Whether to wait for all concurrent samples to finish before updating the underlying searcher.
Example:
from ray.tune.search import ConcurrencyLimiter search_alg = HyperOptSearch(metric="accuracy") search_alg = ConcurrencyLimiter(search_alg, max_concurrent=2) tuner = tune.Tuner( trainable, tune_config=tune.TuneConfig( search_alg=search_alg ), ) tuner.fit()
Methods
Pass results from trials that have been evaluated separately.
Restores the state of a searcher from a given checkpoint_dir.
Automatically saves the given searcher to the checkpoint_dir.
Attributes
The training result objective value attribute.
Specifies if minimizing or maximizing the metric.