jax icon indicating copy to clipboard operation
jax copied to clipboard

libc++abi Error while following TPU-VM Jax Tutorial

Open lk-wq opened this issue 4 years ago • 2 comments

Description

I've been running into an error while trying to follow the official Jax Tutorial https://cloud.google.com/tpu/docs/run-calculation-jax.

Steps to reproduce:

I created a VM with

gcloud compute tpus tpu-vm tpu-name --zone us-central1-f --accelerator-type v2-8 --version tpu-vm-tf-2.10.0 --metadata enable-oslogin=TRUE

Next, install jax with the command

pip install "jax[tpu]>=0.2.16" -f https://storage.googleapis.com/jax-releases/libtpu_releases.html

I then ran

python3

And then

import jax
jax.device_count()

At this point I receive the following error:

libc++abi: terminating due to uncaught exception of type s_13615: yaml-cpp: error at line 20, column 12: end of the map not found
Aborted (core dumped)

Any suggestions would be appreciated!

What jax/jaxlib version are you using?

jax v0.3.25, jaxlib v0.3.25

Which accelerator(s) are you using?

TPU v2-8

Additional system info

Using tpu-vm-tf-2.10.0, python3.8.10

NVIDIA GPU info

No response

lk-wq avatar Nov 24 '22 16:11 lk-wq

I'm not able to repro this. Can you try your instructions again and verify you're still getting the issue? (Thanks for the clear instructions btw!)

Also FYI, if you're only planning to access the TPU via jax, you should use --version tpu-vm-base (you can still pip install tensorflow for CPU-only TF access). But maybe you're planning use both jax and TF (note they can't access the TPU at the same time).

skye avatar Nov 29 '22 01:11 skye

Thanks, looks like everything is working now!

lk-wq avatar Nov 30 '22 15:11 lk-wq