Interface ServiceConfig.WorkerConfigOrBuilder
- All Superinterfaces:
MessageLiteOrBuilder, MessageOrBuilder
- All Known Implementing Classes:
ServiceConfig.WorkerConfig, ServiceConfig.WorkerConfig.Builder
- Enclosing class:
ServiceConfig
-
Method Summary
Modifier and TypeMethodDescriptionlongMaximum size of the cross-trainer cache in bytes.If `data_transfer_protocol` is set, the address of the data transfer server.If `data_transfer_protocol` is set, the address of the data transfer server.longIf `data_transfer_protocol` is set, the port to which the data transfer server binds.If set, the name of an alternative data transfer protocol for which the worker starts an additional server ("data transfer server"); the trainer can then get data from this server.If set, the name of an alternative data transfer protocol for which the worker starts an additional server ("data transfer server"); the trainer can then get data from this server.The address of the dispatcher to register with.The address of the dispatcher to register with.longHow long to retry requests to the dispatcher before giving up and reporting an error.longHow often the worker should heartbeat to the master.longgetPort()The port for the worker to bind to.The protocol for the worker to use when connecting to the dispatcher.The protocol for the worker to use when connecting to the dispatcher.longWhen shutting down a worker, how long to wait for the gRPC server to process the final requests.longThe maximum size of a distributed snapshot chunk file.The address of the worker server.The address of the worker server.getWorkerTags(int index) Tags attached to the worker.getWorkerTagsBytes(int index) Tags attached to the worker.intTags attached to the worker.Tags attached to the worker.Methods inherited from interface MessageLiteOrBuilder
isInitialized
-
Method Details
-
getPort
long getPort()The port for the worker to bind to. A value of 0 indicates that the worker may bind to any available port.
int64 port = 1;- Returns:
- The port.
-
getProtocol
String getProtocol()The protocol for the worker to use when connecting to the dispatcher.
string protocol = 2;- Returns:
- The protocol.
-
getProtocolBytes
ByteString getProtocolBytes()The protocol for the worker to use when connecting to the dispatcher.
string protocol = 2;- Returns:
- The bytes for protocol.
-
getDispatcherAddress
String getDispatcherAddress()The address of the dispatcher to register with.
string dispatcher_address = 3;- Returns:
- The dispatcherAddress.
-
getDispatcherAddressBytes
ByteString getDispatcherAddressBytes()The address of the dispatcher to register with.
string dispatcher_address = 3;- Returns:
- The bytes for dispatcherAddress.
-
getWorkerAddress
String getWorkerAddress()The address of the worker server. The substring "%port%", if specified, will be replaced with the worker's bound port. This is useful when the port is set to `0`.
string worker_address = 4;- Returns:
- The workerAddress.
-
getWorkerAddressBytes
ByteString getWorkerAddressBytes()The address of the worker server. The substring "%port%", if specified, will be replaced with the worker's bound port. This is useful when the port is set to `0`.
string worker_address = 4;- Returns:
- The bytes for workerAddress.
-
getWorkerTagsList
Tags attached to the worker. This allows reading from selected workers. For example, by applying a "COLOCATED" tag, tf.data service is able to read from the local tf.data worker if one exists, then from off-TF-host workers, to avoid cross-TF-host reads.
repeated string worker_tags = 10;- Returns:
- A list containing the workerTags.
-
getWorkerTagsCount
int getWorkerTagsCount()Tags attached to the worker. This allows reading from selected workers. For example, by applying a "COLOCATED" tag, tf.data service is able to read from the local tf.data worker if one exists, then from off-TF-host workers, to avoid cross-TF-host reads.
repeated string worker_tags = 10;- Returns:
- The count of workerTags.
-
getWorkerTags
Tags attached to the worker. This allows reading from selected workers. For example, by applying a "COLOCATED" tag, tf.data service is able to read from the local tf.data worker if one exists, then from off-TF-host workers, to avoid cross-TF-host reads.
repeated string worker_tags = 10;- Parameters:
index- The index of the element to return.- Returns:
- The workerTags at the given index.
-
getWorkerTagsBytes
Tags attached to the worker. This allows reading from selected workers. For example, by applying a "COLOCATED" tag, tf.data service is able to read from the local tf.data worker if one exists, then from off-TF-host workers, to avoid cross-TF-host reads.
repeated string worker_tags = 10;- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the workerTags at the given index.
-
getHeartbeatIntervalMs
long getHeartbeatIntervalMs()How often the worker should heartbeat to the master. A value of 0 indicates that the decision should be left up to the runtime.
int64 heartbeat_interval_ms = 5;- Returns:
- The heartbeatIntervalMs.
-
getDispatcherTimeoutMs
long getDispatcherTimeoutMs()How long to retry requests to the dispatcher before giving up and reporting an error. A value of 0 indicates that the decision should be left up to the runtime.
int64 dispatcher_timeout_ms = 6;- Returns:
- The dispatcherTimeoutMs.
-
getDataTransferProtocol
String getDataTransferProtocol()If set, the name of an alternative data transfer protocol for which the worker starts an additional server ("data transfer server"); the trainer can then get data from this server. If not set, no such server is started, and the trainer can only get data from the regular worker server over `protocol`.string data_transfer_protocol = 7;- Returns:
- The dataTransferProtocol.
-
getDataTransferProtocolBytes
ByteString getDataTransferProtocolBytes()If set, the name of an alternative data transfer protocol for which the worker starts an additional server ("data transfer server"); the trainer can then get data from this server. If not set, no such server is started, and the trainer can only get data from the regular worker server over `protocol`.string data_transfer_protocol = 7;- Returns:
- The bytes for dataTransferProtocol.
-
getDataTransferPort
long getDataTransferPort()If `data_transfer_protocol` is set, the port to which the data transfer server binds. If set to `0`, the server binds to any available port.
int64 data_transfer_port = 13;- Returns:
- The dataTransferPort.
-
getDataTransferAddress
String getDataTransferAddress()If `data_transfer_protocol` is set, the address of the data transfer server. The substring "%dts_port%" can be used to represent -- and is replaced with -- the bound port of the data transfer server; this is useful when `data_transfer_port` is set to `0`.
string data_transfer_address = 8;- Returns:
- The dataTransferAddress.
-
getDataTransferAddressBytes
ByteString getDataTransferAddressBytes()If `data_transfer_protocol` is set, the address of the data transfer server. The substring "%dts_port%" can be used to represent -- and is replaced with -- the bound port of the data transfer server; this is useful when `data_transfer_port` is set to `0`.
string data_transfer_address = 8;- Returns:
- The bytes for dataTransferAddress.
-
getCrossTrainerCacheSizeBytes
long getCrossTrainerCacheSizeBytes()Maximum size of the cross-trainer cache in bytes. If enabled, make sure your training job provides sufficient memory resources.
int64 cross_trainer_cache_size_bytes = 11;- Returns:
- The crossTrainerCacheSizeBytes.
-
getSnapshotMaxChunkSizeBytes
long getSnapshotMaxChunkSizeBytes()The maximum size of a distributed snapshot chunk file. A value of 0 indicates that the decision should be left up to the runtime.
int64 snapshot_max_chunk_size_bytes = 12;- Returns:
- The snapshotMaxChunkSizeBytes.
-
getShutdownQuietPeriodMs
long getShutdownQuietPeriodMs()When shutting down a worker, how long to wait for the gRPC server to process the final requests. This is used to achieve clean shutdown in unit tests.
int64 shutdown_quiet_period_ms = 9;- Returns:
- The shutdownQuietPeriodMs.
-