reallocate_trial_resources_if_needed#

ResourceChangingScheduler.reallocate_trial_resources_if_needed(tune_controller: TuneController, trial: Trial, result: Dict) → dict | PlacementGroupFactory | None[source]#

Calls user defined resources_allocation_function. If the returned resources are not none and not the same as currently present, returns them. Otherwise, returns None.

Parameters:
  • tune_controller (TuneController) – The controller running the experiment.

  • trial (Trial) – The trial that reported the result.

  • result (Dict) – The result the trial reported.

Returns:

The new resources for the trial, or None if they don’t change.

Return type:

dict | PlacementGroupFactory | None