<br />

<button value="stable" default="">See Stable</button> <button value="nightly">See Nightly</button>

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/keras-team/keras/tree/v3.15.1/keras/src/backend/config.py#L441-L453) |

Get the maximum number of steps for any call to fit/evaluate/predict.

```python
tf.keras.config.max_steps_per_epoch()
```

Retrieves the limit on the number of epochs set by
[`keras.config.set_max_steps_per_epoch`](https://www.tensorflow.org/api_docs/python/tf/keras/config/set_max_steps_per_epoch.md.txt) or the `KERAS_MAX_STEPS_PER_EPOCH`
environment variable.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `max_epochs` | The integer limit on the number of epochs or `None`. If `None`, no limit is applied. |

<br />