0

I am trying to run a code that requires tpu name and zone in config.

Using a TPU runtime, how can I find the TPU name and zone in Google Colab?

Bob Smith
  • 36,107
  • 11
  • 98
  • 91
user1340852
  • 825
  • 3
  • 9
  • 27

1 Answers1

1

Google Colab doesn't expose TPU name or its zone. However you can get the TPU IP using the following code snippet:

tpu = tf.distribute.cluster_resolver.TPUClusterResolver()
print('Running on TPU ', tpu.cluster_spec().as_dict())
aman2930
  • 275
  • 2
  • 9