def run_std_server ( self ) : config = tf . estimator . RunConfig ( ) server = tf . train . Server ( config . cluster_spec , job_name = config . task_type , task_index = config . task_id , protocol = config . protocol ) server . join ( )
python tensorflow multithread validate
Starts a TensorFlow server and joins the serving thread .
def run_std_server(self):
    """Starts a TensorFlow server and joins the serving thread.

    Typically used for parameter servers.

    Raises:
      ValueError: if not enough information is available in the estimator's
        config to create a server.
    """
    config = tf.estimator.RunConfig()
    server = tf.train.Server(
        config.cluster_spec,
        job_name=config.task_type,
        task_index=config.task_id,
        protocol=config.protocol)
    server.join()