Closed moathkhaleel closed 6 days ago
Many deep learning libraries have TPU-specific versions of packages. You're pip-installing tensorflow. The pip wheel doesn't include TPU support. I managed to find an old tensorflow 2.9+TPU wheel which may work for you.
!pip install https://storage.googleapis.com/cloud-tpu-tpuvm-artifacts/tensorflow/tf-2.9.3/tensorflow-2.9.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
You'll likely need to pass in tpu='local'
to the TPUClusterResolver too.
Without additional information we're not able to resolve this issue, so it will be closed at this time. You're still free to add more info and respond to any questions above, though. We'll re-open the issue if you do. Thanks for your contribution!
A couple of weeks ago, I was able to use the following code without a problem. I used to connect to 'TPU (deprecated)' runtime. I tried using the same code today using 'TPU v2' but I keep getting an error indicating that I am not connected to TPU: