Issue
Note: These same steps work without any errors on Colab GPU.
Please help me with this. I created a dataset and saved it as file
data = tf.data.Dataset.from_tensor_slices(( features, labels))
tf.data.experimental.save(data, myfile)
When I try to load it
data = tf.data.experimental.load(myfile)
and run any function on the data like len(data)
, data.batch(16)
or data.take(1)
then I get this error:
NotFoundError: Could not find metadata file. [Op:DatasetCardinality]
TPU config
resolver = tf.distribute.cluster_resolver.TPUClusterResolver(tpu='')
tf.config.experimental_connect_to_cluster(resolver)
# This is the TPU initialization code that has to be at the beginning.
tf.tpu.experimental.initialize_tpu_system(resolver)
Is it similar to this TF1.14][TPU]Can not use custom TFrecord dataset on Colab using TPU ?
Solution
After some more debugging I got this error:
UnimplementedError: File system scheme '[local]' not implemented (file: './data/temp/2692738424590406024')
Encountered when executing an operation using EagerExecutor. This error cancels all future operations and poisons their output tensors. [Op:DatasetCardinality]
I found this explanation:
Cloud TPUs can only access data in GCS as only the GCS file system is registered.
More info here: File system scheme '[local]' not implemented in Google Colab TPU
Answered By - Nikhil
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.