diff --git a/python/ray/experimental/client/api.py b/python/ray/experimental/client/api.py index 13443149c..304cc4467 100644 --- a/python/ray/experimental/client/api.py +++ b/python/ray/experimental/client/api.py @@ -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. diff --git a/python/ray/experimental/client/server/server.py b/python/ray/experimental/client/server/server.py index 4db4cd22a..616e6e60d 100644 --- a/python/ray/experimental/client/server/server.py +++ b/python/ray/experimental/client/server/server.py @@ -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):