ray.serve.config.gRPCOptions#

class ray.serve.config.gRPCOptions(*, port: int = 9000, grpc_servicer_functions: List[str] = [])[source]#

Bases: BaseModel

gRPC options for the proxies. Supported fields:

Parameters:
  • port (int) – Port for gRPC server if started. Default to 9000. Cannot be updated once Serve has started running. Serve must be shut down and restarted with the new port instead.

  • grpc_servicer_functions (List[str]) – List of import paths for gRPC add_servicer_to_server functions to add to Serve’s gRPC proxy. Default to empty list, which means no gRPC methods will be added and no gRPC server will be started. The servicer functions need to be importable from the context of where Serve is running.

PublicAPI (alpha): This API is in alpha and may change before becoming stable.

Methods

__init__

Create a new model by parsing and validating input data from keyword arguments.

construct

Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.

copy

Duplicate a model, optionally choose which fields to include, exclude and change.

dict

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

json

Generate a JSON representation of the model, include and exclude arguments as per dict().

update_forward_refs

Try to update ForwardRefs on fields based on this Model, globalns and localns.

Attributes

grpc_servicer_func_callable

Return a list of callable functions from the grpc_servicer_functions.

port

grpc_servicer_functions