Пример #1
0
 def KVExists(self,
              request,
              context=None) -> ray_client_pb2.KVExistsResponse:
     with disable_client_hook():
         exists = ray.experimental.internal_kv._internal_kv_exists(
             request.key)
     return ray_client_pb2.KVExistsResponse(exists=exists)
Пример #2
0
    def KVExists(self, request, context=None) -> ray_client_pb2.KVExistsResponse:
        """Proxies internal_kv.exists.

        This is used by the working_dir code to upload to the GCS before
        ray.init is called. In that case (if we don't have a server yet)
        we directly make the internal KV call from the proxier.

        Otherwise, we proxy the call to the downstream server as usual.
        """
        if self._has_channel_for_request(context):
            return self._call_inner_function(request, context, "KVExists")

        with disable_client_hook():
            exists = ray.experimental.internal_kv._internal_kv_exists(request.key)
        return ray_client_pb2.KVExistsResponse(exists=exists)