tf.contrib.distribute.run_standard_tensorflow_server
Stay organized with collections
Save and categorize content based on your preferences.
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".
Args |
session_config
|
an optional tf.compat.v1.ConfigProto object. Users can
pass in the session config object to configure server-local devices.
|
Raises |
ValueError
|
if the "TF_CONFIG" environment is not complete.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2020-10-01 UTC."],[],[],null,["# tf.contrib.distribute.run_standard_tensorflow_server\n\n\u003cbr /\u003e\n\n|-------------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/distribute/distribute_coordinator.py#L555-L625) |\n\nStarts a standard TensorFlow server. \n\n tf.contrib.distribute.run_standard_tensorflow_server(\n session_config=None\n )\n\nThis method parses configurations from \"TF_CONFIG\" environment variable and\nstarts a TensorFlow server. The \"TF_CONFIG\" is typically a json string and\nmust have information of the cluster and the role of the server in the\ncluster. One example is:\n\nTF_CONFIG='{\n\"cluster\": {\n\"worker\": \\[\"host1:2222\", \"host2:2222\", \"host3:2222\"\\],\n\"ps\": \\[\"host4:2222\", \"host5:2222\"\\]\n},\n\"task\": {\"type\": \"worker\", \"index\": 1}\n}'\n\nThis \"TF_CONFIG\" specifies there are 3 workers and 2 ps tasks in the cluster\nand the current role is worker 1.\n\nValid task types are \"chief\", \"worker\", \"ps\" and \"evaluator\" and you can have\nat most one \"chief\" and at most one \"evaluator\".\n\nAn optional key-value can be specified is \"rpc_layer\". The default value is\n\"grpc\".\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `session_config` | an optional [`tf.compat.v1.ConfigProto`](../../../tf/ConfigProto) object. Users can pass in the session config object to configure server-local devices. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| a [`tf.distribute.Server`](../../../tf/distribute/Server) object which has already been started. ||\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ------ ||\n|--------------|-------------------------------------------------|\n| `ValueError` | if the \"TF_CONFIG\" environment is not complete. |\n\n\u003cbr /\u003e"]]