ray.tune.Trainable.default_resource_request#

classmethod Trainable.default_resource_request(config: Dict[str, Any]) PlacementGroupFactory | None[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.

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

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

Returns:

A PlacementGroupFactory consumed by Tune

for queueing.

Return type:

PlacementGroupFactory