This occurred while I was using tf.data.Dataset:
The calling iterator did not fully read the dataset being cached. In order to avoid unexpected truncation of the dataset, the partially cached contents of the dataset will be discarded. This can happen if you have an input pipeline similar to
dataset.cache().take(k).repeat(). You should usedataset.take(k).cache().repeat()instead.
According to other questions, for example this one, it has something to do with where cache() is in the sequence of methods, but I can't understand what to do concretely.
Here's how to reproduce the warning:
import tensorflow_datasets as tfds
ds = tfds.load('iris', split='train')
ds = ds.take(100)
for elem in ds:
pass
Seems like no matter what I do, and no matter where I use cache(), the warning pops up.