Class ServiceConfig.WorkerConfig
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
org.tensorflow.proto.data.experimental.ServiceConfig.WorkerConfig
- All Implemented Interfaces:
Message, MessageLite, MessageLiteOrBuilder, MessageOrBuilder, Serializable, ServiceConfig.WorkerConfigOrBuilder
- Enclosing class:
ServiceConfig
public static final class ServiceConfig.WorkerConfig
extends GeneratedMessageV3
implements ServiceConfig.WorkerConfigOrBuilder
Configuration for a tf.data service WorkerServer. Next id: 14Protobuf type
tensorflow.data.experimental.WorkerConfig- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classConfiguration for a tf.data service WorkerServer.Nested classes/interfaces inherited from class GeneratedMessageV3
GeneratedMessageV3.BuilderParent, GeneratedMessageV3.ExtendableBuilder<MessageType, BuilderType>, GeneratedMessageV3.ExtendableMessage<MessageType>, GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType>, GeneratedMessageV3.FieldAccessorTable, GeneratedMessageV3.UnusedPrivateParameterNested classes/interfaces inherited from class AbstractMessageLite
AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class GeneratedMessageV3
alwaysUseFieldBuilders, unknownFieldsFields inherited from class AbstractMessage
memoizedSizeFields inherited from class AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanlongMaximum 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.static ServiceConfig.WorkerConfigstatic final Descriptors.DescriptorThe 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.intlongWhen 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.final UnknownFieldSetThe 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.inthashCode()protected GeneratedMessageV3.FieldAccessorTablefinal booleannewBuilder(ServiceConfig.WorkerConfig prototype) protected ServiceConfig.WorkerConfig.Builderprotected Objectstatic ServiceConfig.WorkerConfigparseDelimitedFrom(InputStream input) static ServiceConfig.WorkerConfigparseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) static ServiceConfig.WorkerConfigparseFrom(byte[] data) static ServiceConfig.WorkerConfigparseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) static ServiceConfig.WorkerConfigparseFrom(ByteString data) static ServiceConfig.WorkerConfigparseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) static ServiceConfig.WorkerConfigparseFrom(CodedInputStream input) static ServiceConfig.WorkerConfigparseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) static ServiceConfig.WorkerConfigparseFrom(InputStream input) static ServiceConfig.WorkerConfigparseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) static ServiceConfig.WorkerConfigparseFrom(ByteBuffer data) static ServiceConfig.WorkerConfigparseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) static Parser<ServiceConfig.WorkerConfig> parser()voidwriteTo(CodedOutputStream output) Methods inherited from class GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringMethods inherited from class AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
-
Field Details
-
PORT_FIELD_NUMBER
public static final int PORT_FIELD_NUMBER- See Also:
-
PROTOCOL_FIELD_NUMBER
public static final int PROTOCOL_FIELD_NUMBER- See Also:
-
DISPATCHER_ADDRESS_FIELD_NUMBER
public static final int DISPATCHER_ADDRESS_FIELD_NUMBER- See Also:
-
WORKER_ADDRESS_FIELD_NUMBER
public static final int WORKER_ADDRESS_FIELD_NUMBER- See Also:
-
WORKER_TAGS_FIELD_NUMBER
public static final int WORKER_TAGS_FIELD_NUMBER- See Also:
-
HEARTBEAT_INTERVAL_MS_FIELD_NUMBER
public static final int HEARTBEAT_INTERVAL_MS_FIELD_NUMBER- See Also:
-
DISPATCHER_TIMEOUT_MS_FIELD_NUMBER
public static final int DISPATCHER_TIMEOUT_MS_FIELD_NUMBER- See Also:
-
DATA_TRANSFER_PROTOCOL_FIELD_NUMBER
public static final int DATA_TRANSFER_PROTOCOL_FIELD_NUMBER- See Also:
-
DATA_TRANSFER_PORT_FIELD_NUMBER
public static final int DATA_TRANSFER_PORT_FIELD_NUMBER- See Also:
-
DATA_TRANSFER_ADDRESS_FIELD_NUMBER
public static final int DATA_TRANSFER_ADDRESS_FIELD_NUMBER- See Also:
-
CROSS_TRAINER_CACHE_SIZE_BYTES_FIELD_NUMBER
public static final int CROSS_TRAINER_CACHE_SIZE_BYTES_FIELD_NUMBER- See Also:
-
SNAPSHOT_MAX_CHUNK_SIZE_BYTES_FIELD_NUMBER
public static final int SNAPSHOT_MAX_CHUNK_SIZE_BYTES_FIELD_NUMBER- See Also:
-
SHUTDOWN_QUIET_PERIOD_MS_FIELD_NUMBER
public static final int SHUTDOWN_QUIET_PERIOD_MS_FIELD_NUMBER- See Also:
-
-
Method Details
-
newInstance
- Overrides:
newInstancein classGeneratedMessageV3
-
getUnknownFields
- Specified by:
getUnknownFieldsin interfaceMessageOrBuilder- Overrides:
getUnknownFieldsin classGeneratedMessageV3
-
getDescriptor
-
internalGetFieldAccessorTable
- Specified by:
internalGetFieldAccessorTablein classGeneratedMessageV3
-
getPort
public 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;- Specified by:
getPortin interfaceServiceConfig.WorkerConfigOrBuilder- Returns:
- The port.
-
getProtocol
The protocol for the worker to use when connecting to the dispatcher.
string protocol = 2;- Specified by:
getProtocolin interfaceServiceConfig.WorkerConfigOrBuilder- Returns:
- The protocol.
-
getProtocolBytes
The protocol for the worker to use when connecting to the dispatcher.
string protocol = 2;- Specified by:
getProtocolBytesin interfaceServiceConfig.WorkerConfigOrBuilder- Returns:
- The bytes for protocol.
-
getDispatcherAddress
The address of the dispatcher to register with.
string dispatcher_address = 3;- Specified by:
getDispatcherAddressin interfaceServiceConfig.WorkerConfigOrBuilder- Returns:
- The dispatcherAddress.
-
getDispatcherAddressBytes
The address of the dispatcher to register with.
string dispatcher_address = 3;- Specified by:
getDispatcherAddressBytesin interfaceServiceConfig.WorkerConfigOrBuilder- Returns:
- The bytes for dispatcherAddress.
-
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;- Specified by:
getWorkerAddressin interfaceServiceConfig.WorkerConfigOrBuilder- Returns:
- The workerAddress.
-
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;- Specified by:
getWorkerAddressBytesin interfaceServiceConfig.WorkerConfigOrBuilder- 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;- Specified by:
getWorkerTagsListin interfaceServiceConfig.WorkerConfigOrBuilder- Returns:
- A list containing the workerTags.
-
getWorkerTagsCount
public 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;- Specified by:
getWorkerTagsCountin interfaceServiceConfig.WorkerConfigOrBuilder- 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;- Specified by:
getWorkerTagsin interfaceServiceConfig.WorkerConfigOrBuilder- 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;- Specified by:
getWorkerTagsBytesin interfaceServiceConfig.WorkerConfigOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the workerTags at the given index.
-
getHeartbeatIntervalMs
public 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;- Specified by:
getHeartbeatIntervalMsin interfaceServiceConfig.WorkerConfigOrBuilder- Returns:
- The heartbeatIntervalMs.
-
getDispatcherTimeoutMs
public 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;- Specified by:
getDispatcherTimeoutMsin interfaceServiceConfig.WorkerConfigOrBuilder- Returns:
- The dispatcherTimeoutMs.
-
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;- Specified by:
getDataTransferProtocolin interfaceServiceConfig.WorkerConfigOrBuilder- Returns:
- The dataTransferProtocol.
-
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;- Specified by:
getDataTransferProtocolBytesin interfaceServiceConfig.WorkerConfigOrBuilder- Returns:
- The bytes for dataTransferProtocol.
-
getDataTransferPort
public 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;- Specified by:
getDataTransferPortin interfaceServiceConfig.WorkerConfigOrBuilder- Returns:
- The dataTransferPort.
-
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;- Specified by:
getDataTransferAddressin interfaceServiceConfig.WorkerConfigOrBuilder- Returns:
- The dataTransferAddress.
-
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;- Specified by:
getDataTransferAddressBytesin interfaceServiceConfig.WorkerConfigOrBuilder- Returns:
- The bytes for dataTransferAddress.
-
getCrossTrainerCacheSizeBytes
public 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;- Specified by:
getCrossTrainerCacheSizeBytesin interfaceServiceConfig.WorkerConfigOrBuilder- Returns:
- The crossTrainerCacheSizeBytes.
-
getSnapshotMaxChunkSizeBytes
public 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;- Specified by:
getSnapshotMaxChunkSizeBytesin interfaceServiceConfig.WorkerConfigOrBuilder- Returns:
- The snapshotMaxChunkSizeBytes.
-
getShutdownQuietPeriodMs
public 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;- Specified by:
getShutdownQuietPeriodMsin interfaceServiceConfig.WorkerConfigOrBuilder- Returns:
- The shutdownQuietPeriodMs.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfaceMessageLiteOrBuilder- Overrides:
isInitializedin classGeneratedMessageV3
-
writeTo
- Specified by:
writeToin interfaceMessageLite- Overrides:
writeToin classGeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfaceMessageLite- Overrides:
getSerializedSizein classGeneratedMessageV3
-
equals
- Specified by:
equalsin interfaceMessage- Overrides:
equalsin classAbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceMessage- Overrides:
hashCodein classAbstractMessage
-
parseFrom
public static ServiceConfig.WorkerConfig parseFrom(ByteBuffer data) throws InvalidProtocolBufferException - Throws:
InvalidProtocolBufferException
-
parseFrom
public static ServiceConfig.WorkerConfig parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException - Throws:
InvalidProtocolBufferException
-
parseFrom
public static ServiceConfig.WorkerConfig parseFrom(ByteString data) throws InvalidProtocolBufferException - Throws:
InvalidProtocolBufferException
-
parseFrom
public static ServiceConfig.WorkerConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException - Throws:
InvalidProtocolBufferException
-
parseFrom
public static ServiceConfig.WorkerConfig parseFrom(byte[] data) throws InvalidProtocolBufferException - Throws:
InvalidProtocolBufferException
-
parseFrom
public static ServiceConfig.WorkerConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException - Throws:
InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static ServiceConfig.WorkerConfig parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static ServiceConfig.WorkerConfig parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static ServiceConfig.WorkerConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfaceMessage- Specified by:
newBuilderForTypein interfaceMessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfaceMessage- Specified by:
toBuilderin interfaceMessageLite
-
newBuilderForType
protected ServiceConfig.WorkerConfig.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent) - Specified by:
newBuilderForTypein classGeneratedMessageV3
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfaceMessage- Specified by:
getParserForTypein interfaceMessageLite- Overrides:
getParserForTypein classGeneratedMessageV3
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfaceMessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfaceMessageOrBuilder
-