# tf.contrib.distribute.run_standard_tensorflow_server

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/distribute/distribute_coordinator.py#L555-L625) |

Starts a standard TensorFlow server.

    tf.contrib.distribute.run_standard_tensorflow_server(
        session_config=None
    )

This method parses configurations from "TF_CONFIG" environment variable and
starts a TensorFlow server. The "TF_CONFIG" is typically a json string and
must have information of the cluster and the role of the server in the
cluster. One example is:

TF_CONFIG='{
"cluster": {
"worker": \["host1:2222", "host2:2222", "host3:2222"\],
"ps": \["host4:2222", "host5:2222"\]
},
"task": {"type": "worker", "index": 1}
}'

This "TF_CONFIG" specifies there are 3 workers and 2 ps tasks in the cluster
and the current role is worker 1.

Valid task types are "chief", "worker", "ps" and "evaluator" and you can have
at most one "chief" and at most one "evaluator".

An optional key-value can be specified is "rpc_layer". The default value is
"grpc".

<br />

<br />

<br />

| ## Args ||
|---|---|
| `session_config` | an optional [`tf.compat.v1.ConfigProto`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/ConfigProto) object. Users can pass in the session config object to configure server-local devices. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| a [`tf.distribute.Server`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/distribute/Server) object which has already been started. ||

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `ValueError` | if the "TF_CONFIG" environment is not complete. |

<br />