choose_trial_to_run#

TrialScheduler.choose_trial_to_run(tune_controller: TuneController) → Trial | None[source]#

Called to choose a new trial to run.

This should return one of the trials in tune_controller that is in the PENDING or PAUSED state. This function must be idempotent.

If no trial is ready, return None.

Parameters:

tune_controller (TuneController) – The controller running the experiment.

Returns:

The trial to run next, or None if no trial is ready.

Return type:

Trial | None