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, the- max_concurrentof the- ConcurrencyLimiterwill override the- max_concurrentvalue of the Searcher. The- ConcurrencyLimiterwill 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.