Exemplo n.º 1
0
    def KVGet(self, request, context=None) -> ray_client_pb2.KVGetResponse:
        """Proxies internal_kv.get.

        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, "KVGet")

        with disable_client_hook():
            value = ray.experimental.internal_kv._internal_kv_get(request.key)
        return ray_client_pb2.KVGetResponse(value=value)
Exemplo n.º 2
0
 def KVGet(self, request, context=None) -> ray_client_pb2.KVGetResponse:
     with disable_client_hook():
         value = ray.experimental.internal_kv._internal_kv_get(request.key)
     return ray_client_pb2.KVGetResponse(value=value)