forked from huggingface/nanotron
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
245 additions
and
3 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,183 @@ | ||
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! | ||
"""Client and server classes corresponding to protobuf-defined services.""" | ||
import grpc | ||
import warnings | ||
|
||
import orchestration_pb2 as orchestration__pb2 | ||
|
||
GRPC_GENERATED_VERSION = '1.66.0' | ||
GRPC_VERSION = grpc.__version__ | ||
_version_not_supported = False | ||
|
||
try: | ||
from grpc._utilities import first_version_is_lower | ||
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) | ||
except ImportError: | ||
_version_not_supported = True | ||
|
||
if _version_not_supported: | ||
raise RuntimeError( | ||
f'The grpc package installed is at version {GRPC_VERSION},' | ||
+ f' but the generated code in orchestration_pb2_grpc.py depends on' | ||
+ f' grpcio>={GRPC_GENERATED_VERSION}.' | ||
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' | ||
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' | ||
) | ||
|
||
|
||
class WorkerAgentStub(object): | ||
"""Missing associated documentation comment in .proto file.""" | ||
|
||
def __init__(self, channel): | ||
"""Constructor. | ||
Args: | ||
channel: A grpc.Channel. | ||
""" | ||
self.ConfigurationChange = channel.unary_unary( | ||
'/WorkerAgent/ConfigurationChange', | ||
request_serializer=orchestration__pb2.WorkerConfigurationRequest.SerializeToString, | ||
response_deserializer=orchestration__pb2.WorkerConfigurationResponse.FromString, | ||
_registered_method=True) | ||
self.CheckReady = channel.unary_unary( | ||
'/WorkerAgent/CheckReady', | ||
request_serializer=orchestration__pb2.CheckReadyRequest.SerializeToString, | ||
response_deserializer=orchestration__pb2.CheckReadyResponse.FromString, | ||
_registered_method=True) | ||
self.Kill = channel.unary_unary( | ||
'/WorkerAgent/Kill', | ||
request_serializer=orchestration__pb2.KillRequest.SerializeToString, | ||
response_deserializer=orchestration__pb2.KillResponse.FromString, | ||
_registered_method=True) | ||
|
||
|
||
class WorkerAgentServicer(object): | ||
"""Missing associated documentation comment in .proto file.""" | ||
|
||
def ConfigurationChange(self, request, context): | ||
"""Missing associated documentation comment in .proto file.""" | ||
context.set_code(grpc.StatusCode.UNIMPLEMENTED) | ||
context.set_details('Method not implemented!') | ||
raise NotImplementedError('Method not implemented!') | ||
|
||
def CheckReady(self, request, context): | ||
"""Missing associated documentation comment in .proto file.""" | ||
context.set_code(grpc.StatusCode.UNIMPLEMENTED) | ||
context.set_details('Method not implemented!') | ||
raise NotImplementedError('Method not implemented!') | ||
|
||
def Kill(self, request, context): | ||
"""Missing associated documentation comment in .proto file.""" | ||
context.set_code(grpc.StatusCode.UNIMPLEMENTED) | ||
context.set_details('Method not implemented!') | ||
raise NotImplementedError('Method not implemented!') | ||
|
||
|
||
def add_WorkerAgentServicer_to_server(servicer, server): | ||
rpc_method_handlers = { | ||
'ConfigurationChange': grpc.unary_unary_rpc_method_handler( | ||
servicer.ConfigurationChange, | ||
request_deserializer=orchestration__pb2.WorkerConfigurationRequest.FromString, | ||
response_serializer=orchestration__pb2.WorkerConfigurationResponse.SerializeToString, | ||
), | ||
'CheckReady': grpc.unary_unary_rpc_method_handler( | ||
servicer.CheckReady, | ||
request_deserializer=orchestration__pb2.CheckReadyRequest.FromString, | ||
response_serializer=orchestration__pb2.CheckReadyResponse.SerializeToString, | ||
), | ||
'Kill': grpc.unary_unary_rpc_method_handler( | ||
servicer.Kill, | ||
request_deserializer=orchestration__pb2.KillRequest.FromString, | ||
response_serializer=orchestration__pb2.KillResponse.SerializeToString, | ||
), | ||
} | ||
generic_handler = grpc.method_handlers_generic_handler( | ||
'WorkerAgent', rpc_method_handlers) | ||
server.add_generic_rpc_handlers((generic_handler,)) | ||
server.add_registered_method_handlers('WorkerAgent', rpc_method_handlers) | ||
|
||
|
||
# This class is part of an EXPERIMENTAL API. | ||
class WorkerAgent(object): | ||
"""Missing associated documentation comment in .proto file.""" | ||
|
||
@staticmethod | ||
def ConfigurationChange(request, | ||
target, | ||
options=(), | ||
channel_credentials=None, | ||
call_credentials=None, | ||
insecure=False, | ||
compression=None, | ||
wait_for_ready=None, | ||
timeout=None, | ||
metadata=None): | ||
return grpc.experimental.unary_unary( | ||
request, | ||
target, | ||
'/WorkerAgent/ConfigurationChange', | ||
orchestration__pb2.WorkerConfigurationRequest.SerializeToString, | ||
orchestration__pb2.WorkerConfigurationResponse.FromString, | ||
options, | ||
channel_credentials, | ||
insecure, | ||
call_credentials, | ||
compression, | ||
wait_for_ready, | ||
timeout, | ||
metadata, | ||
_registered_method=True) | ||
|
||
@staticmethod | ||
def CheckReady(request, | ||
target, | ||
options=(), | ||
channel_credentials=None, | ||
call_credentials=None, | ||
insecure=False, | ||
compression=None, | ||
wait_for_ready=None, | ||
timeout=None, | ||
metadata=None): | ||
return grpc.experimental.unary_unary( | ||
request, | ||
target, | ||
'/WorkerAgent/CheckReady', | ||
orchestration__pb2.CheckReadyRequest.SerializeToString, | ||
orchestration__pb2.CheckReadyResponse.FromString, | ||
options, | ||
channel_credentials, | ||
insecure, | ||
call_credentials, | ||
compression, | ||
wait_for_ready, | ||
timeout, | ||
metadata, | ||
_registered_method=True) | ||
|
||
@staticmethod | ||
def Kill(request, | ||
target, | ||
options=(), | ||
channel_credentials=None, | ||
call_credentials=None, | ||
insecure=False, | ||
compression=None, | ||
wait_for_ready=None, | ||
timeout=None, | ||
metadata=None): | ||
return grpc.experimental.unary_unary( | ||
request, | ||
target, | ||
'/WorkerAgent/Kill', | ||
orchestration__pb2.KillRequest.SerializeToString, | ||
orchestration__pb2.KillResponse.FromString, | ||
options, | ||
channel_credentials, | ||
insecure, | ||
call_credentials, | ||
compression, | ||
wait_for_ready, | ||
timeout, | ||
metadata, | ||
_registered_method=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters