class_docstr: A Server base class for accepting RPCs for registered tf.functions.
  
  Functions can be registered on the server and are exposed via RPCs.
class_docstr_tok: ["A","Server","base","class","for","accepting","RPCs","for","registered","tf.functions",".","Functions","can","be","registered","on","the","server","and","are","exposed","via","RPCs","."]
docstr: Create TF RPC server at given address.
  
  Args:
    rpc_layer: Communication layer between client and server. Only "grpc" rpc
      layer is supported at the moment.
    address: Address where RPC server is hosted.
  
  Returns:
    An instance of `tf.distribute.experimental.rpc.Server` class.
  
  Raises:
      A ValueError if rpc_layer other than "grpc" is used. Only GRPC
      is supported at the moment.
  
  Example usage:
  
    >>> import portpicker
    >>> @tf.function(input_signature=[
    ...      tf.TensorSpec([], tf.int32),
    ...      tf.TensorSpec([], tf.int32)])
    ... def remote_fn(a, b):
    ...   return tf.add(a, b)
  
    >>> port = portpicker.pick_unused_port()
    >>> address = "localhost:{}".format(port)
    >>> server = tf.distribute.experimental.rpc.Server.create("grpc", address)
    >>> server.register("addition", remote_fn)
    >>> server.start()
docstr_tok: ["Create","TF","RPC","server","at","given","address",".","Args",":","rpc_layer",":","Communication","layer","between","client","and","server",".","Only","``","grpc","''","rpc","layer","is","supported","at","the","moment",".","address",":","Address","where","RPC","server","is","hosted",".","Returns",":","An","instance","of","`","tf.distribute.experimental.rpc.Server","`","class",".","Raises",":","A","ValueError","if","rpc_layer","other","than","``","grpc","''","is","used",".","Only","GRPC","is","supported","at","the","moment",".","Example","usage",":",">",">",">","import","portpicker",">",">",">","@","tf.function","(","input_signature=","[","...","tf.TensorSpec","(","[","]",",","tf.int32",")",",","...","tf.TensorSpec","(","[","]",",","tf.int32",")","]",")","...","def","remote_fn","(","a",",","b",")",":","...","return","tf.add","(","a",",","b",")",">",">",">","port","=","portpicker.pick_unused_port","(",")",">",">",">","address","=","``","localhost",":","{","}","''",".format","(","port",")",">",">",">","server","=","tf.distribute.experimental.rpc.Server.create","(","``","grpc","''",",","address",")",">",">",">","server.register","(","``","addition","''",",","remote_fn",")",">",">",">","server.start","(",")"]
code: def create(rpc_layer, address):
      """Create TF RPC server at given address.
  
      Args:
        rpc_layer: Communication layer between client and server. Only "grpc" rpc
          layer is supported at the moment.
        address: Address where RPC server is hosted.
  
      Returns:
        An instance of `tf.distribute.experimental.rpc.Server` class.
  
      Raises:
          A ValueError if rpc_layer other than "grpc" is used. Only GRPC
          is supported at the moment.
  
      Example usage:
  
        >>> import portpicker
        >>> @tf.function(input_signature=[
        ...      tf.TensorSpec([], tf.int32),
        ...      tf.TensorSpec([], tf.int32)])
        ... def remote_fn(a, b):
        ...   return tf.add(a, b)
  
        >>> port = portpicker.pick_unused_port()
        >>> address = "localhost:{}".format(port)
        >>> server = tf.distribute.experimental.rpc.Server.create("grpc", address)
        >>> server.register("addition", remote_fn)
        >>> server.start()
  
      """
      if rpc_layer != "grpc":
          raise ValueError(
              "Only GRPC backend is supported at the moment."
          )
      return GrpcServer(address=address)
  
imports: from typing import Optional, Sequence, Union
  import tensorflow.distribute.experimental.rpc.kernels.gen_rpc_ops
  from tensorflow.distribute.experimental.rpc.proto import tf_rpc_service_pb2
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.eager import function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import none_tensor
  from tensorflow.python.framework import type_spec
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.saved_model import nested_structure_coder
  from tensorflow.python.types import core
  from tensorflow.python.util import nest
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 1 for calling the Server obj's underlying member method code with example usage: obj.create(rpc_layer, address) and returns: GrpcServer