# tf.data.experimental.AutoShardPolicy

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.1.0/tensorflow/python/data/experimental/ops/distribute_options.py#L27-L36) |

Represents the type of auto-sharding we enable.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.data.experimental.AutoShardPolicy`](https://www.tensorflow.org/api_docs/python/tf/data/experimental/AutoShardPolicy)

<br />

Please see the DistributeOptions.auto_shard_policy documentation for more
information on each type of autosharding.

## Class Variables

- `AUTO = <AutoShardPolicy.AUTO: 0>`
- `DATA = <AutoShardPolicy.DATA: 2>`
- `FILE = <AutoShardPolicy.FILE: 1>`
- `OFF = <AutoShardPolicy.OFF: -1>`