ray.runtime_context.RuntimeContext.get_accelerator_ids#

RuntimeContext.get_accelerator_ids() Dict[str, List[str]][source]#

Get the current worker’s visible accelerator ids.

Returns:

A dictionary keyed by the accelerator resource name. The values are a list of ids {'GPU': ['0', '1'], 'neuron_cores': ['0', '1'], 'TPU': ['0', '1']}.