'Batching Tfrecords in Tensorflow Federated TFF

I'm trying to batch tfrecords to enable faster training in Tensorflow Federated environment that is set up on GCP. Can someone please let me know if this is supported in TFF?

If it is supported, can anyone please provide links to the documentation?

I tried the below code but I'm getting the following runtime warning:

Code:

data = tf.data.TFRecordDataset(\["/tmp/mnist.tfrecord"\]).map(decode_fn).batch(30)

Warning:

RuntimeWarning: Enable tracemalloc to get the object allocation traceback



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source