public enum AutoShardPolicy extends Enum<AutoShardPolicy> implements com.google.protobuf.ProtocolMessageEnum
Represents the type of auto-sharding we enable.Protobuf enum
tensorflow.data.AutoShardPolicy
Enum Constant and Description |
---|
AUTO
AUTO: Attempts FILE-based sharding, falling back to DATA-based sharding.
|
DATA
DATA: Shards by elements produced by the dataset.
|
FILE
FILE: Shards by input files (i.e.
|
HINT
HINT: Looks for the presence of `shard(SHARD_HINT, ...)` which is treated
as a placeholder to replace with `shard(num_workers, worker_index)`.
|
OFF
OFF: No sharding will be performed.
|
UNRECOGNIZED |
Modifier and Type | Field and Description |
---|---|
static int |
AUTO_VALUE
AUTO: Attempts FILE-based sharding, falling back to DATA-based sharding.
|
static int |
DATA_VALUE
DATA: Shards by elements produced by the dataset.
|
static int |
FILE_VALUE
FILE: Shards by input files (i.e.
|
static int |
HINT_VALUE
HINT: Looks for the presence of `shard(SHARD_HINT, ...)` which is treated
as a placeholder to replace with `shard(num_workers, worker_index)`.
|
static int |
OFF_VALUE
OFF: No sharding will be performed.
|
Modifier and Type | Method and Description |
---|---|
static AutoShardPolicy |
forNumber(int value) |
static com.google.protobuf.Descriptors.EnumDescriptor |
getDescriptor() |
com.google.protobuf.Descriptors.EnumDescriptor |
getDescriptorForType() |
int |
getNumber() |
com.google.protobuf.Descriptors.EnumValueDescriptor |
getValueDescriptor() |
static com.google.protobuf.Internal.EnumLiteMap<AutoShardPolicy> |
internalGetValueMap() |
static AutoShardPolicy |
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) |
static AutoShardPolicy |
valueOf(int value)
Deprecated.
Use
forNumber(int) instead. |
static AutoShardPolicy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static AutoShardPolicy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final AutoShardPolicy AUTO
AUTO: Attempts FILE-based sharding, falling back to DATA-based sharding.
AUTO = 0;
public static final AutoShardPolicy FILE
FILE: Shards by input files (i.e. each worker will get a set of files to process). When this option is selected, make sure that there is at least as many files as workers. If there are fewer input files than workers, a runtime error will be raised.
FILE = 1;
public static final AutoShardPolicy DATA
DATA: Shards by elements produced by the dataset. Each worker will process the whole dataset and discard the portion that is not for itself. Note that for this mode to correctly partitions the dataset elements, the dataset needs to produce elements in a deterministic order.
DATA = 2;
public static final AutoShardPolicy HINT
HINT: Looks for the presence of `shard(SHARD_HINT, ...)` which is treated as a placeholder to replace with `shard(num_workers, worker_index)`.
HINT = 3;
public static final AutoShardPolicy OFF
OFF: No sharding will be performed.
OFF = -1;
public static final AutoShardPolicy UNRECOGNIZED
public static final int AUTO_VALUE
AUTO: Attempts FILE-based sharding, falling back to DATA-based sharding.
AUTO = 0;
public static final int FILE_VALUE
FILE: Shards by input files (i.e. each worker will get a set of files to process). When this option is selected, make sure that there is at least as many files as workers. If there are fewer input files than workers, a runtime error will be raised.
FILE = 1;
public static final int DATA_VALUE
DATA: Shards by elements produced by the dataset. Each worker will process the whole dataset and discard the portion that is not for itself. Note that for this mode to correctly partitions the dataset elements, the dataset needs to produce elements in a deterministic order.
DATA = 2;
public static final int HINT_VALUE
HINT: Looks for the presence of `shard(SHARD_HINT, ...)` which is treated as a placeholder to replace with `shard(num_workers, worker_index)`.
HINT = 3;
public static final int OFF_VALUE
OFF: No sharding will be performed.
OFF = -1;
public static AutoShardPolicy[] values()
for (AutoShardPolicy c : AutoShardPolicy.values()) System.out.println(c);
public static AutoShardPolicy valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic final int getNumber()
getNumber
in interface com.google.protobuf.Internal.EnumLite
getNumber
in interface com.google.protobuf.ProtocolMessageEnum
@Deprecated public static AutoShardPolicy valueOf(int value)
forNumber(int)
instead.public static AutoShardPolicy forNumber(int value)
public static com.google.protobuf.Internal.EnumLiteMap<AutoShardPolicy> internalGetValueMap()
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
getValueDescriptor
in interface com.google.protobuf.ProtocolMessageEnum
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
getDescriptorForType
in interface com.google.protobuf.ProtocolMessageEnum
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
public static AutoShardPolicy valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
Copyright © 2015–2022. All rights reserved.