https://github.com/tensorflow/tensorflow/issues/42146#issuecomment-671484239
Message: "Consider either turning off auto-sharding or switching the auto_shard_policy to DATA to shard this dataset."
If your Tensorflow scripts leave this log message, then it falls back to use DATA type sharding. Thus, to turn off the log message you can set auto_shard_policy to DATA using tf.data.Options() as follows:
options = tf.data.Options()
options.experimental_distribute.auto_shard_policy = tf.data.experimental.AutoShardPolicy.DATA
dataset = dataset.with_options(options)