# tf.data.experimental.ExternalStatePolicy

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.14.0/tensorflow/python/data/ops/options.py#L155-L190) |

Represents how to handle external state during serialization.

#### View aliases


**Compat aliases for migration**

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

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

<br />

See the [`tf.data.Options.experimental_external_state_policy`](https://www.tensorflow.org/versions/r2.14/api_docs/python/tf/data/Options#experimental_external_state_policy) documentation
for more information.

<br />

<br />

<br />

| ## Class Variables ||
|---|---|
| FAIL | `<ExternalStatePolicy.FAIL: 2>` |
| IGNORE | `<ExternalStatePolicy.IGNORE: 1>` |
| WARN | `<ExternalStatePolicy.WARN: 0>` |

<br />