mirror of
https://github.com/wassname/ray.git
synced 2026-09-09 11:32:43 +08:00
Dynamic Custom Resources - create and delete resources (#3742)
This commit is contained in:
@@ -32,6 +32,7 @@ from ray.includes.libraylet cimport (
|
||||
from ray.includes.unique_ids cimport (
|
||||
CActorCheckpointID,
|
||||
CObjectID,
|
||||
CClientID,
|
||||
)
|
||||
from ray.includes.task cimport CTaskSpecification
|
||||
from ray.includes.ray_config cimport RayConfig
|
||||
@@ -368,6 +369,9 @@ cdef class RayletClient:
|
||||
check_status(self.client.get().NotifyActorResumedFromCheckpoint(
|
||||
actor_id.native(), checkpoint_id.native()))
|
||||
|
||||
def set_resource(self, basestring resource_name, double capacity, ClientID client_id):
|
||||
self.client.get().SetResource(resource_name.encode("ascii"), capacity, CClientID.from_binary(client_id.binary()))
|
||||
|
||||
@property
|
||||
def language(self):
|
||||
return Language.from_native(self.client.get().GetLanguage())
|
||||
|
||||
Reference in New Issue
Block a user