ray.tune.schedulers.create_scheduler#

ray.tune.schedulers.create_scheduler(scheduler, **kwargs)[source]#

Instantiate a scheduler based on the given string.

This is useful for swapping between different schedulers.

Parameters:
  • scheduler – The scheduler to use.

  • **kwargs – Scheduler parameters. These keyword arguments will be passed to the initialization function of the chosen scheduler.

Returns:

The scheduler.

Return type:

ray.tune.schedulers.trial_scheduler.TrialScheduler

Example

>>> from ray import tune
>>> pbt_kwargs = {}
>>> scheduler = tune.create_scheduler('pbt', **pbt_kwargs) 

PublicAPI (beta): This API is in beta and may change before becoming stable.