ray.available_resources#

ray.available_resources()[source]#

Get the current available cluster resources.

This is different from cluster_resources in that this will return idle (available) resources rather than total resources.

Note that this information can grow stale as tasks start and finish.

Returns:

A dictionary mapping resource name to the total quantity of that

resource in the cluster. Note that if a resource (e.g., “CPU”) is currently not available (i.e., quantity is 0), it will not be included in this dictionary.

DeveloperAPI: This API may change across minor Ray releases.