I am running a Google Colab notebook and am trying to capture TPU profiling data for use in TensorBoard, however I can't get capture_tpu_profile
to run in the background while running my TensorFlow code.
So far I tried to run the capture process in the background with:
!capture_tpu_profile --logdir=gs://<my_logdir> --tpu=$COLAB_TPU_ADDR &
and
!bg capture_tpu_profile --logdir=gs://<my_logdir> --tpu=$COLAB_TPU_ADDR
Turns out a way to do this is to start the process from python directly like this (I also had to modify the parameter from
--tpu
to--service_addr
):the
check=True
makes the command raise an Exception if it fails.