Files
coldWaterandGitHub 7b821836f4 Replace gRPC code generation tool from Znly/protoc to Buf (#2344)
* Replace gRPC code generation tool from Znly/protoc to Buf

Signed-off-by: forsaken628 <[email protected]>

* fix

Signed-off-by: forsaken628 <[email protected]>

* del build.sh

Signed-off-by: forsaken628 <[email protected]>

* cleanup

Signed-off-by: forsaken628 <[email protected]>

* fix test

Signed-off-by: forsaken628 <[email protected]>

* fix

Signed-off-by: forsaken628 <[email protected]>

* fix

Signed-off-by: forsaken628 <[email protected]>

* refine

Signed-off-by: forsaken628 <[email protected]>

* fix

Signed-off-by: forsaken628 <[email protected]>

* rm outter yaml

Signed-off-by: forsaken628 <[email protected]>

* fix

Signed-off-by: forsaken628 <[email protected]>

---------

Signed-off-by: forsaken628 <[email protected]>
2024-06-15 15:18:33 +00:00

464 lines
17 KiB
Python

# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
import api_pb2 as api__pb2
class DBManagerStub(object):
"""*
DBManager service defines APIs to manage Katib database.
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.ReportObservationLog = channel.unary_unary(
'/api.v1.beta1.DBManager/ReportObservationLog',
request_serializer=api__pb2.ReportObservationLogRequest.SerializeToString,
response_deserializer=api__pb2.ReportObservationLogReply.FromString,
_registered_method=True)
self.GetObservationLog = channel.unary_unary(
'/api.v1.beta1.DBManager/GetObservationLog',
request_serializer=api__pb2.GetObservationLogRequest.SerializeToString,
response_deserializer=api__pb2.GetObservationLogReply.FromString,
_registered_method=True)
self.DeleteObservationLog = channel.unary_unary(
'/api.v1.beta1.DBManager/DeleteObservationLog',
request_serializer=api__pb2.DeleteObservationLogRequest.SerializeToString,
response_deserializer=api__pb2.DeleteObservationLogReply.FromString,
_registered_method=True)
class DBManagerServicer(object):
"""*
DBManager service defines APIs to manage Katib database.
"""
def ReportObservationLog(self, request, context):
"""*
Report a log of Observations for a Trial.
The log consists of timestamp and value of metric.
Katib store every log of metrics.
You can see accuracy curve or other metric logs on UI.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetObservationLog(self, request, context):
"""*
Get all log of Observations for a Trial.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def DeleteObservationLog(self, request, context):
"""*
Delete all log of Observations for a Trial.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_DBManagerServicer_to_server(servicer, server):
rpc_method_handlers = {
'ReportObservationLog': grpc.unary_unary_rpc_method_handler(
servicer.ReportObservationLog,
request_deserializer=api__pb2.ReportObservationLogRequest.FromString,
response_serializer=api__pb2.ReportObservationLogReply.SerializeToString,
),
'GetObservationLog': grpc.unary_unary_rpc_method_handler(
servicer.GetObservationLog,
request_deserializer=api__pb2.GetObservationLogRequest.FromString,
response_serializer=api__pb2.GetObservationLogReply.SerializeToString,
),
'DeleteObservationLog': grpc.unary_unary_rpc_method_handler(
servicer.DeleteObservationLog,
request_deserializer=api__pb2.DeleteObservationLogRequest.FromString,
response_serializer=api__pb2.DeleteObservationLogReply.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'api.v1.beta1.DBManager', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
server.add_registered_method_handlers('api.v1.beta1.DBManager', rpc_method_handlers)
# This class is part of an EXPERIMENTAL API.
class DBManager(object):
"""*
DBManager service defines APIs to manage Katib database.
"""
@staticmethod
def ReportObservationLog(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,
'/api.v1.beta1.DBManager/ReportObservationLog',
api__pb2.ReportObservationLogRequest.SerializeToString,
api__pb2.ReportObservationLogReply.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def GetObservationLog(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,
'/api.v1.beta1.DBManager/GetObservationLog',
api__pb2.GetObservationLogRequest.SerializeToString,
api__pb2.GetObservationLogReply.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def DeleteObservationLog(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,
'/api.v1.beta1.DBManager/DeleteObservationLog',
api__pb2.DeleteObservationLogRequest.SerializeToString,
api__pb2.DeleteObservationLogReply.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
class SuggestionStub(object):
"""*
Suggestion service defines APIs to manage Katib Suggestion from HP or NAS algorithms
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.GetSuggestions = channel.unary_unary(
'/api.v1.beta1.Suggestion/GetSuggestions',
request_serializer=api__pb2.GetSuggestionsRequest.SerializeToString,
response_deserializer=api__pb2.GetSuggestionsReply.FromString,
_registered_method=True)
self.ValidateAlgorithmSettings = channel.unary_unary(
'/api.v1.beta1.Suggestion/ValidateAlgorithmSettings',
request_serializer=api__pb2.ValidateAlgorithmSettingsRequest.SerializeToString,
response_deserializer=api__pb2.ValidateAlgorithmSettingsReply.FromString,
_registered_method=True)
class SuggestionServicer(object):
"""*
Suggestion service defines APIs to manage Katib Suggestion from HP or NAS algorithms
"""
def GetSuggestions(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 ValidateAlgorithmSettings(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_SuggestionServicer_to_server(servicer, server):
rpc_method_handlers = {
'GetSuggestions': grpc.unary_unary_rpc_method_handler(
servicer.GetSuggestions,
request_deserializer=api__pb2.GetSuggestionsRequest.FromString,
response_serializer=api__pb2.GetSuggestionsReply.SerializeToString,
),
'ValidateAlgorithmSettings': grpc.unary_unary_rpc_method_handler(
servicer.ValidateAlgorithmSettings,
request_deserializer=api__pb2.ValidateAlgorithmSettingsRequest.FromString,
response_serializer=api__pb2.ValidateAlgorithmSettingsReply.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'api.v1.beta1.Suggestion', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
server.add_registered_method_handlers('api.v1.beta1.Suggestion', rpc_method_handlers)
# This class is part of an EXPERIMENTAL API.
class Suggestion(object):
"""*
Suggestion service defines APIs to manage Katib Suggestion from HP or NAS algorithms
"""
@staticmethod
def GetSuggestions(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,
'/api.v1.beta1.Suggestion/GetSuggestions',
api__pb2.GetSuggestionsRequest.SerializeToString,
api__pb2.GetSuggestionsReply.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def ValidateAlgorithmSettings(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,
'/api.v1.beta1.Suggestion/ValidateAlgorithmSettings',
api__pb2.ValidateAlgorithmSettingsRequest.SerializeToString,
api__pb2.ValidateAlgorithmSettingsReply.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
class EarlyStoppingStub(object):
"""*
EarlyStopping service defines APIs to manage Katib Early Stopping algorithms
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.GetEarlyStoppingRules = channel.unary_unary(
'/api.v1.beta1.EarlyStopping/GetEarlyStoppingRules',
request_serializer=api__pb2.GetEarlyStoppingRulesRequest.SerializeToString,
response_deserializer=api__pb2.GetEarlyStoppingRulesReply.FromString,
_registered_method=True)
self.SetTrialStatus = channel.unary_unary(
'/api.v1.beta1.EarlyStopping/SetTrialStatus',
request_serializer=api__pb2.SetTrialStatusRequest.SerializeToString,
response_deserializer=api__pb2.SetTrialStatusReply.FromString,
_registered_method=True)
self.ValidateEarlyStoppingSettings = channel.unary_unary(
'/api.v1.beta1.EarlyStopping/ValidateEarlyStoppingSettings',
request_serializer=api__pb2.ValidateEarlyStoppingSettingsRequest.SerializeToString,
response_deserializer=api__pb2.ValidateEarlyStoppingSettingsReply.FromString,
_registered_method=True)
class EarlyStoppingServicer(object):
"""*
EarlyStopping service defines APIs to manage Katib Early Stopping algorithms
"""
def GetEarlyStoppingRules(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 SetTrialStatus(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 ValidateEarlyStoppingSettings(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_EarlyStoppingServicer_to_server(servicer, server):
rpc_method_handlers = {
'GetEarlyStoppingRules': grpc.unary_unary_rpc_method_handler(
servicer.GetEarlyStoppingRules,
request_deserializer=api__pb2.GetEarlyStoppingRulesRequest.FromString,
response_serializer=api__pb2.GetEarlyStoppingRulesReply.SerializeToString,
),
'SetTrialStatus': grpc.unary_unary_rpc_method_handler(
servicer.SetTrialStatus,
request_deserializer=api__pb2.SetTrialStatusRequest.FromString,
response_serializer=api__pb2.SetTrialStatusReply.SerializeToString,
),
'ValidateEarlyStoppingSettings': grpc.unary_unary_rpc_method_handler(
servicer.ValidateEarlyStoppingSettings,
request_deserializer=api__pb2.ValidateEarlyStoppingSettingsRequest.FromString,
response_serializer=api__pb2.ValidateEarlyStoppingSettingsReply.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'api.v1.beta1.EarlyStopping', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
server.add_registered_method_handlers('api.v1.beta1.EarlyStopping', rpc_method_handlers)
# This class is part of an EXPERIMENTAL API.
class EarlyStopping(object):
"""*
EarlyStopping service defines APIs to manage Katib Early Stopping algorithms
"""
@staticmethod
def GetEarlyStoppingRules(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,
'/api.v1.beta1.EarlyStopping/GetEarlyStoppingRules',
api__pb2.GetEarlyStoppingRulesRequest.SerializeToString,
api__pb2.GetEarlyStoppingRulesReply.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def SetTrialStatus(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,
'/api.v1.beta1.EarlyStopping/SetTrialStatus',
api__pb2.SetTrialStatusRequest.SerializeToString,
api__pb2.SetTrialStatusReply.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def ValidateEarlyStoppingSettings(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,
'/api.v1.beta1.EarlyStopping/ValidateEarlyStoppingSettings',
api__pb2.ValidateEarlyStoppingSettingsRequest.SerializeToString,
api__pb2.ValidateEarlyStoppingSettingsReply.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)