当前位置: 首页>>代码示例>>Python>>正文


Python grpc.beta方法代码示例

本文整理汇总了Python中grpc.beta方法的典型用法代码示例。如果您正苦于以下问题:Python grpc.beta方法的具体用法?Python grpc.beta怎么用?Python grpc.beta使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在grpc的用法示例。


在下文中一共展示了grpc.beta方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: beta_create_PredictionService_server

# 需要导入模块: import grpc [as 别名]
# 或者: from grpc import beta [as 别名]
def beta_create_PredictionService_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_deserializers = {
      ('tensorflow.serving.PredictionService', 'Predict'): PredictRequest.FromString,
    }
    response_serializers = {
      ('tensorflow.serving.PredictionService', 'Predict'): PredictResponse.SerializeToString,
    }
    method_implementations = {
      ('tensorflow.serving.PredictionService', 'Predict'): face_utilities.unary_unary_inline(servicer.Predict),
    }
    server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations, options=server_options) 
开发者ID:llSourcell,项目名称:Make_Money_with_Tensorflow,代码行数:19,代码来源:prediction_service_pb2.py

示例2: beta_create_PredictionService_stub

# 需要导入模块: import grpc [as 别名]
# 或者: from grpc import beta [as 别名]
def beta_create_PredictionService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_serializers = {
      ('tensorflow.serving.PredictionService', 'Predict'): PredictRequest.SerializeToString,
    }
    response_deserializers = {
      ('tensorflow.serving.PredictionService', 'Predict'): PredictResponse.FromString,
    }
    cardinalities = {
      'Predict': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel, 'tensorflow.serving.PredictionService', cardinalities, options=stub_options) 
开发者ID:llSourcell,项目名称:Make_Money_with_Tensorflow,代码行数:19,代码来源:prediction_service_pb2.py

示例3: beta_create_Greeter_server

# 需要导入模块: import grpc [as 别名]
# 或者: from grpc import beta [as 别名]
def beta_create_Greeter_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_deserializers = {
      ('worldhello.Greeter', 'SayHello'): HelloRequest.FromString,
      ('worldhello.Greeter', 'SayHelloAgain'): HelloRequest.FromString,
    }
    response_serializers = {
      ('worldhello.Greeter', 'SayHello'): HelloReply.SerializeToString,
      ('worldhello.Greeter', 'SayHelloAgain'): HelloReply.SerializeToString,
    }
    method_implementations = {
      ('worldhello.Greeter', 'SayHello'): face_utilities.unary_unary_inline(servicer.SayHello),
      ('worldhello.Greeter', 'SayHelloAgain'): face_utilities.unary_unary_inline(servicer.SayHelloAgain),
    }
    server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations, options=server_options) 
开发者ID:shanbay,项目名称:sea,代码行数:22,代码来源:worldhello_pb2.py

示例4: beta_create_Greeter_stub

# 需要导入模块: import grpc [as 别名]
# 或者: from grpc import beta [as 别名]
def beta_create_Greeter_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_serializers = {
      ('worldhello.Greeter', 'SayHello'): HelloRequest.SerializeToString,
      ('worldhello.Greeter', 'SayHelloAgain'): HelloRequest.SerializeToString,
    }
    response_deserializers = {
      ('worldhello.Greeter', 'SayHello'): HelloReply.FromString,
      ('worldhello.Greeter', 'SayHelloAgain'): HelloReply.FromString,
    }
    cardinalities = {
      'SayHello': cardinality.Cardinality.UNARY_UNARY,
      'SayHelloAgain': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel, 'worldhello.Greeter', cardinalities, options=stub_options) 
开发者ID:shanbay,项目名称:sea,代码行数:22,代码来源:worldhello_pb2.py

示例5: beta_create_Greeter_server

# 需要导入模块: import grpc [as 别名]
# 或者: from grpc import beta [as 别名]
def beta_create_Greeter_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_deserializers = {
      ('helloworld.Greeter', 'SayHello'): HelloRequest.FromString,
    }
    response_serializers = {
      ('helloworld.Greeter', 'SayHello'): HelloReply.SerializeToString,
    }
    method_implementations = {
      ('helloworld.Greeter', 'SayHello'): face_utilities.unary_unary_inline(servicer.SayHello),
    }
    server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations, options=server_options) 
开发者ID:shanbay,项目名称:sea,代码行数:19,代码来源:helloworld_pb2.py

示例6: beta_create_Greeter_stub

# 需要导入模块: import grpc [as 别名]
# 或者: from grpc import beta [as 别名]
def beta_create_Greeter_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_serializers = {
      ('helloworld.Greeter', 'SayHello'): HelloRequest.SerializeToString,
    }
    response_deserializers = {
      ('helloworld.Greeter', 'SayHello'): HelloReply.FromString,
    }
    cardinalities = {
      'SayHello': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel, 'helloworld.Greeter', cardinalities, options=stub_options) 
开发者ID:shanbay,项目名称:sea,代码行数:19,代码来源:helloworld_pb2.py

示例7: beta_create_PredictionService_server

# 需要导入模块: import grpc [as 别名]
# 或者: from grpc import beta [as 别名]
def beta_create_PredictionService_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_deserializers = {
      ('tensorflow.serving.PredictionService', 'Predict'): predict__pb2.PredictRequest.FromString,
    }
    response_serializers = {
      ('tensorflow.serving.PredictionService', 'Predict'): predict__pb2.PredictResponse.SerializeToString,
    }
    method_implementations = {
      ('tensorflow.serving.PredictionService', 'Predict'): face_utilities.unary_unary_inline(servicer.Predict),
    }
    server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations, options=server_options) 
开发者ID:tensorlayer,项目名称:text-antispam,代码行数:19,代码来源:prediction_service_pb2.py

示例8: beta_create_PredictionService_stub

# 需要导入模块: import grpc [as 别名]
# 或者: from grpc import beta [as 别名]
def beta_create_PredictionService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_serializers = {
      ('tensorflow.serving.PredictionService', 'Predict'): predict__pb2.PredictRequest.SerializeToString,
    }
    response_deserializers = {
      ('tensorflow.serving.PredictionService', 'Predict'): predict__pb2.PredictResponse.FromString,
    }
    cardinalities = {
      'Predict': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel, 'tensorflow.serving.PredictionService', cardinalities, options=stub_options) 
开发者ID:tensorlayer,项目名称:text-antispam,代码行数:19,代码来源:prediction_service_pb2.py

示例9: beta_create_OnlineActionHandler_server

# 需要导入模块: import grpc [as 别名]
# 或者: from grpc import beta [as 别名]
def beta_create_OnlineActionHandler_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_deserializers = {
      ('OnlineActionHandler', '_health_check'): HealthCheckRequest.FromString,
      ('OnlineActionHandler', '_remote_execute'): OnlineActionRequest.FromString,
      ('OnlineActionHandler', '_remote_reload'): ReloadRequest.FromString,
    }
    response_serializers = {
      ('OnlineActionHandler', '_health_check'): HealthCheckResponse.SerializeToString,
      ('OnlineActionHandler', '_remote_execute'): OnlineActionResponse.SerializeToString,
      ('OnlineActionHandler', '_remote_reload'): ReloadResponse.SerializeToString,
    }
    method_implementations = {
      ('OnlineActionHandler', '_health_check'): face_utilities.unary_unary_inline(servicer._health_check),
      ('OnlineActionHandler', '_remote_execute'): face_utilities.unary_unary_inline(servicer._remote_execute),
      ('OnlineActionHandler', '_remote_reload'): face_utilities.unary_unary_inline(servicer._remote_reload),
    }
    server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations, options=server_options) 
开发者ID:marvin-ai,项目名称:marvin-python-toolbox,代码行数:25,代码来源:actions_pb2.py

示例10: beta_create_OnlineActionHandler_stub

# 需要导入模块: import grpc [as 别名]
# 或者: from grpc import beta [as 别名]
def beta_create_OnlineActionHandler_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_serializers = {
      ('OnlineActionHandler', '_health_check'): HealthCheckRequest.SerializeToString,
      ('OnlineActionHandler', '_remote_execute'): OnlineActionRequest.SerializeToString,
      ('OnlineActionHandler', '_remote_reload'): ReloadRequest.SerializeToString,
    }
    response_deserializers = {
      ('OnlineActionHandler', '_health_check'): HealthCheckResponse.FromString,
      ('OnlineActionHandler', '_remote_execute'): OnlineActionResponse.FromString,
      ('OnlineActionHandler', '_remote_reload'): ReloadResponse.FromString,
    }
    cardinalities = {
      '_health_check': cardinality.Cardinality.UNARY_UNARY,
      '_remote_execute': cardinality.Cardinality.UNARY_UNARY,
      '_remote_reload': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel, 'OnlineActionHandler', cardinalities, options=stub_options) 
开发者ID:marvin-ai,项目名称:marvin-python-toolbox,代码行数:25,代码来源:actions_pb2.py

示例11: beta_create_BatchActionHandler_server

# 需要导入模块: import grpc [as 别名]
# 或者: from grpc import beta [as 别名]
def beta_create_BatchActionHandler_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_deserializers = {
      ('BatchActionHandler', '_health_check'): HealthCheckRequest.FromString,
      ('BatchActionHandler', '_remote_execute'): BatchActionRequest.FromString,
      ('BatchActionHandler', '_remote_reload'): ReloadRequest.FromString,
    }
    response_serializers = {
      ('BatchActionHandler', '_health_check'): HealthCheckResponse.SerializeToString,
      ('BatchActionHandler', '_remote_execute'): BatchActionResponse.SerializeToString,
      ('BatchActionHandler', '_remote_reload'): ReloadResponse.SerializeToString,
    }
    method_implementations = {
      ('BatchActionHandler', '_health_check'): face_utilities.unary_unary_inline(servicer._health_check),
      ('BatchActionHandler', '_remote_execute'): face_utilities.unary_unary_inline(servicer._remote_execute),
      ('BatchActionHandler', '_remote_reload'): face_utilities.unary_unary_inline(servicer._remote_reload),
    }
    server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations, options=server_options) 
开发者ID:marvin-ai,项目名称:marvin-python-toolbox,代码行数:25,代码来源:actions_pb2.py

示例12: beta_create_BatchActionHandler_stub

# 需要导入模块: import grpc [as 别名]
# 或者: from grpc import beta [as 别名]
def beta_create_BatchActionHandler_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_serializers = {
      ('BatchActionHandler', '_health_check'): HealthCheckRequest.SerializeToString,
      ('BatchActionHandler', '_remote_execute'): BatchActionRequest.SerializeToString,
      ('BatchActionHandler', '_remote_reload'): ReloadRequest.SerializeToString,
    }
    response_deserializers = {
      ('BatchActionHandler', '_health_check'): HealthCheckResponse.FromString,
      ('BatchActionHandler', '_remote_execute'): BatchActionResponse.FromString,
      ('BatchActionHandler', '_remote_reload'): ReloadResponse.FromString,
    }
    cardinalities = {
      '_health_check': cardinality.Cardinality.UNARY_UNARY,
      '_remote_execute': cardinality.Cardinality.UNARY_UNARY,
      '_remote_reload': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel, 'BatchActionHandler', cardinalities, options=stub_options) 
开发者ID:marvin-ai,项目名称:marvin-python-toolbox,代码行数:25,代码来源:actions_pb2.py

示例13: beta_create_ModelService_server

# 需要导入模块: import grpc [as 别名]
# 或者: from grpc import beta [as 别名]
def beta_create_ModelService_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_deserializers = {
      ('tensorflow.serving.ModelService', 'GetModelStatus'): tensorflow__serving_dot_apis_dot_get__model__status__pb2.GetModelStatusRequest.FromString,
    }
    response_serializers = {
      ('tensorflow.serving.ModelService', 'GetModelStatus'): tensorflow__serving_dot_apis_dot_get__model__status__pb2.GetModelStatusResponse.SerializeToString,
    }
    method_implementations = {
      ('tensorflow.serving.ModelService', 'GetModelStatus'): face_utilities.unary_unary_inline(servicer.GetModelStatus),
    }
    server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations, options=server_options) 
开发者ID:huseinzol05,项目名称:Gather-Deployment,代码行数:19,代码来源:model_service_pb2.py

示例14: beta_create_ModelService_stub

# 需要导入模块: import grpc [as 别名]
# 或者: from grpc import beta [as 别名]
def beta_create_ModelService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_serializers = {
      ('tensorflow.serving.ModelService', 'GetModelStatus'): tensorflow__serving_dot_apis_dot_get__model__status__pb2.GetModelStatusRequest.SerializeToString,
    }
    response_deserializers = {
      ('tensorflow.serving.ModelService', 'GetModelStatus'): tensorflow__serving_dot_apis_dot_get__model__status__pb2.GetModelStatusResponse.FromString,
    }
    cardinalities = {
      'GetModelStatus': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel, 'tensorflow.serving.ModelService', cardinalities, options=stub_options) 
开发者ID:huseinzol05,项目名称:Gather-Deployment,代码行数:19,代码来源:model_service_pb2.py

示例15: beta_create_ClusterSpecGenerator_server

# 需要导入模块: import grpc [as 别名]
# 或者: from grpc import beta [as 别名]
def beta_create_ClusterSpecGenerator_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_deserializers = {
      ('clusterspecgenerator.ClusterSpecGenerator', 'GetClusterSpec'): GetClusterSpecRequest.FromString,
      ('clusterspecgenerator.ClusterSpecGenerator', 'RegisterContainer'): RegisterContainerRequest.FromString,
    }
    response_serializers = {
      ('clusterspecgenerator.ClusterSpecGenerator', 'GetClusterSpec'): GetClusterSpecReply.SerializeToString,
      ('clusterspecgenerator.ClusterSpecGenerator', 'RegisterContainer'): RegisterContainerReply.SerializeToString,
    }
    method_implementations = {
      ('clusterspecgenerator.ClusterSpecGenerator', 'GetClusterSpec'): face_utilities.unary_unary_inline(servicer.GetClusterSpec),
      ('clusterspecgenerator.ClusterSpecGenerator', 'RegisterContainer'): face_utilities.unary_unary_inline(servicer.RegisterContainer),
    }
    server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations, options=server_options) 
开发者ID:logicalclocks,项目名称:hops-tensorflow,代码行数:22,代码来源:clusterspecgenerator_pb2.py


注:本文中的grpc.beta方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。