Get the number of batches in a DataBunch

How do I get the number of batches in a DataBunch? I checked the source but there was no method that returns this.

It lives in the length of the dataloader,

len(data.train_dl) or len(data.valid_dl)
2 Likes