tf.data.experimental.service.DispatcherConfig
Stay organized with collections
Save and categorize content based on your preferences.
Configuration class for tf.data service dispatchers.
tf.data.experimental.service.DispatcherConfig(
port=0,
protocol=None,
work_dir=None,
fault_tolerant_mode=False,
worker_addresses=None,
job_gc_check_interval_ms=None,
job_gc_timeout_ms=None,
worker_timeout_ms=None,
worker_max_concurrent_snapshots=0
)
Fields |
port
|
Specifies the port to bind to. A value of 0 indicates that the server
may bind to any available port.
|
protocol
|
The protocol to use for communicating with the tf.data service,
e.g. "grpc".
|
work_dir
|
A directory to store dispatcher state in. This
argument is required for the dispatcher to be able to recover from
restarts.
|
fault_tolerant_mode
|
Whether the dispatcher should write its state to a
journal so that it can recover from restarts. Dispatcher state, including
registered datasets and created jobs, is synchronously written to the
journal before responding to RPCs. If True , work_dir must also be
specified.
|
worker_addresses
|
If the job uses auto-sharding, it needs to specify a fixed
list of worker addresses that will register with the dispatcher. The
worker addresses should be in the format "host" or "host:port" , where
"port" is an integer, named port, or %port% to match any port.
|
job_gc_check_interval_ms
|
How often the dispatcher should scan through to
delete old and unused jobs, in milliseconds. If not set, the runtime will
select a reasonable default. A higher value will reduce load on the
dispatcher, while a lower value will reduce the time it takes for the
dispatcher to garbage collect expired jobs.
|
job_gc_timeout_ms
|
How long a job needs to be unused before it becomes a
candidate for garbage collection, in milliseconds. A value of -1 indicates
that jobs should never be garbage collected. If not set, the runtime will
select a reasonable default. A higher value will cause jobs to stay around
longer with no consumers. This is useful if there is a large gap in
time between when consumers read from the job. A lower value will reduce
the time it takes to reclaim the resources from expired jobs.
|
worker_timeout_ms
|
How long to wait for a worker to heartbeat before
considering it missing. If not set, the runtime will select a reasonable
default.
|
worker_max_concurrent_snapshots
|
The maximum number of snapshots a worker
can concurrently process.
|
Attributes |
port
|
A namedtuple alias for field number 0
|
protocol
|
A namedtuple alias for field number 1
|
work_dir
|
A namedtuple alias for field number 2
|
fault_tolerant_mode
|
A namedtuple alias for field number 3
|
worker_addresses
|
A namedtuple alias for field number 4
|
job_gc_check_interval_ms
|
A namedtuple alias for field number 5
|
job_gc_timeout_ms
|
A namedtuple alias for field number 6
|
worker_timeout_ms
|
A namedtuple alias for field number 7
|
worker_max_concurrent_snapshots
|
A namedtuple alias for field number 8
|
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. Some content is licensed under the numpy license.
Last updated 2024-04-26 UTC.
[null,null,["Last updated 2024-04-26 UTC."],[],[],null,["# tf.data.experimental.service.DispatcherConfig\n\n\u003cbr /\u003e\n\n|---------------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.16.1/tensorflow/python/data/experimental/service/server_lib.py#L44-L127) |\n\nConfiguration class for tf.data service dispatchers.\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.data.experimental.service.DispatcherConfig`](https://www.tensorflow.org/api_docs/python/tf/data/experimental/service/DispatcherConfig)\n\n\u003cbr /\u003e\n\n tf.data.experimental.service.DispatcherConfig(\n port=0,\n protocol=None,\n work_dir=None,\n fault_tolerant_mode=False,\n worker_addresses=None,\n job_gc_check_interval_ms=None,\n job_gc_timeout_ms=None,\n worker_timeout_ms=None,\n worker_max_concurrent_snapshots=0\n )\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Fields ------ ||\n|-----------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `port` | Specifies the port to bind to. A value of 0 indicates that the server may bind to any available port. |\n| `protocol` | The protocol to use for communicating with the tf.data service, e.g. \"grpc\". |\n| `work_dir` | A directory to store dispatcher state in. This argument is required for the dispatcher to be able to recover from restarts. |\n| `fault_tolerant_mode` | Whether the dispatcher should write its state to a journal so that it can recover from restarts. Dispatcher state, including registered datasets and created jobs, is synchronously written to the journal before responding to RPCs. If `True`, `work_dir` must also be specified. |\n| `worker_addresses` | If the job uses auto-sharding, it needs to specify a fixed list of worker addresses that will register with the dispatcher. The worker addresses should be in the format `\"host\"` or `\"host:port\"`, where `\"port\"` is an integer, named port, or `%port%` to match any port. |\n| `job_gc_check_interval_ms` | How often the dispatcher should scan through to delete old and unused jobs, in milliseconds. If not set, the runtime will select a reasonable default. A higher value will reduce load on the dispatcher, while a lower value will reduce the time it takes for the dispatcher to garbage collect expired jobs. |\n| `job_gc_timeout_ms` | How long a job needs to be unused before it becomes a candidate for garbage collection, in milliseconds. A value of -1 indicates that jobs should never be garbage collected. If not set, the runtime will select a reasonable default. A higher value will cause jobs to stay around longer with no consumers. This is useful if there is a large gap in time between when consumers read from the job. A lower value will reduce the time it takes to reclaim the resources from expired jobs. |\n| `worker_timeout_ms` | How long to wait for a worker to heartbeat before considering it missing. If not set, the runtime will select a reasonable default. |\n| `worker_max_concurrent_snapshots` | The maximum number of snapshots a worker can concurrently process. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Attributes ---------- ||\n|-----------------------------------|-----------------------------------------|\n| `port` | A `namedtuple` alias for field number 0 |\n| `protocol` | A `namedtuple` alias for field number 1 |\n| `work_dir` | A `namedtuple` alias for field number 2 |\n| `fault_tolerant_mode` | A `namedtuple` alias for field number 3 |\n| `worker_addresses` | A `namedtuple` alias for field number 4 |\n| `job_gc_check_interval_ms` | A `namedtuple` alias for field number 5 |\n| `job_gc_timeout_ms` | A `namedtuple` alias for field number 6 |\n| `worker_timeout_ms` | A `namedtuple` alias for field number 7 |\n| `worker_max_concurrent_snapshots` | A `namedtuple` alias for field number 8 |\n\n\u003cbr /\u003e"]]