public interface RuntimeContext
| Modifier and Type | Method and Description |
|---|---|
List<NodeInfo> |
getAllNodeInfo()
Get all node information in Ray cluster.
|
<T extends BaseActorHandle> |
getCurrentActorHandle()
Get the handle to the current actor itself.
|
ActorId |
getCurrentActorId()
Get the current actor ID.
|
JobId |
getCurrentJobId()
Get the current Job ID.
|
UniqueId |
getCurrentNodeId()
Get the node id of this worker.
|
RuntimeEnv |
getCurrentRuntimeEnv()
Get the runtime env of this worker.
|
TaskId |
getCurrentTaskId()
Get current task ID.
|
List<Long> |
getGpuIds()
Get available GPU(deviceIds) for this worker.
|
String |
getNamespace()
Get the namespace of this job.
|
boolean |
isLocalMode()
Returns true if Ray is running in local mode, false if Ray is running in cluster mode.
|
boolean |
wasCurrentActorRestarted()
Returns true if the current actor was restarted, otherwise false.
|
JobId getCurrentJobId()
TaskId getCurrentTaskId()
ActorId getCurrentActorId()
Note, this can only be called in actors.
boolean wasCurrentActorRestarted()
boolean isLocalMode()
<T extends BaseActorHandle> T getCurrentActorHandle()
String getNamespace()
UniqueId getCurrentNodeId()
RuntimeEnv getCurrentRuntimeEnv()
Copyright © 2023. All rights reserved.