classmethod Trainable.default_resource_request(config: Dict[str, Any]) Optional[Union[ray.tune.resources.Resources, ray.tune.execution.placement_groups.PlacementGroupFactory]][source]#

Provides a static resource requirement for the given configuration.

This can be overridden by sub-classes to set the correct trial resource allocation, so the user does not need to.

def default_resource_request(cls, config):
    return PlacementGroupFactory([{"CPU": 1}, {"CPU": 1}]])
  • config[Dict[str – The Trainable’s config dict.

  • Any]] – The Trainable’s config dict.


A Resources object or

PlacementGroupFactory consumed by Tune for queueing.

Return type

Union[Resources, PlacementGroupFactory]