W3cubDocs

/TensorFlow 2.4

tf.data.experimental.service.DispatcherConfig

Configuration class for tf.data service dispatchers.

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. Defaults to "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.
  • 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. 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.
Attributes
port
protocol
work_dir
fault_tolerant_mode
job_gc_check_interval_ms
job_gc_timeout_ms

© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.4/api_docs/python/tf/data/experimental/service/DispatcherConfig