mirror of
https://github.com/wassname/ray.git
synced 2026-06-27 23:08:32 +08:00
[Hotfix] Fix python client lint error (#12783)
This commit is contained in:
@@ -133,8 +133,8 @@ class APIImpl(ABC):
|
||||
that should be canceled.
|
||||
force (boolean): Whether to force-kill a running task by killing
|
||||
the worker that is running the task.
|
||||
recursive (boolean): Whether to try to cancel tasks submitted by the
|
||||
task specified.
|
||||
recursive (boolean): Whether to try to cancel tasks submitted by
|
||||
the task specified.
|
||||
"""
|
||||
pass
|
||||
|
||||
@@ -207,8 +207,8 @@ class ClientAPI(APIImpl):
|
||||
def available_resources(self):
|
||||
"""Get the current available cluster resources.
|
||||
|
||||
This is different from `cluster_resources` in that this will return idle
|
||||
(available) resources rather than total 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.
|
||||
|
||||
|
||||
@@ -38,7 +38,8 @@ class RayletServicer(ray_client_pb2_grpc.RayletDriverServicer):
|
||||
resp.resource_table.CopyFrom(
|
||||
ray_client_pb2.ClusterInfoResponse.ResourceTable(
|
||||
table=float_resources))
|
||||
elif request.type == ray_client_pb2.ClusterInfoType.AVAILABLE_RESOURCES:
|
||||
elif request.type == \
|
||||
ray_client_pb2.ClusterInfoType.AVAILABLE_RESOURCES:
|
||||
resources = ray.available_resources()
|
||||
# Normalize resources into floats
|
||||
# (the function may return values that are ints)
|
||||
@@ -78,8 +79,8 @@ class RayletServicer(ray_client_pb2_grpc.RayletDriverServicer):
|
||||
return_exception_in_context(e, context)
|
||||
else:
|
||||
raise RuntimeError(
|
||||
"Client requested termination without providing a valid terminate_type"
|
||||
)
|
||||
"Client requested termination without providing a valid "
|
||||
"terminate_type")
|
||||
return ray_client_pb2.TerminateResponse(ok=True)
|
||||
|
||||
def GetObject(self, request, context=None):
|
||||
|
||||
Reference in New Issue
Block a user