Cannot run setup section of the t5-trivia codelab due to error importing tensorflow_gcs_config
adelinac opened this issue · 6 comments
When trying to run the setup section of the t5-trivia codelab I get the following error:
Setting up GCS access...
NotImplementedError Traceback (most recent call last)
in ()
32 # Use legacy GCS authentication method.
33 os.environ['USE_AUTH_EPHEM'] = '0'
---> 34 import tensorflow_gcs_config
35 from google.colab import auth
36 # Set credentials for GCS reading/writing from Colab and TPU.
1 frames
/usr/local/lib/python3.7/dist-packages/tensorflow_gcs_config/init.py in _load_library(filename, lib)
55 raise NotImplementedError(
56 "unable to open file: " +
---> 57 "{}, from paths: {}\ncaused by: {}".format(filename, filenames, errs))
58
59 _gcs_config_so = _load_library("_gcs_config_ops.so")
NotImplementedError: unable to open file: _gcs_config_ops.so, from paths: ['/usr/local/lib/python3.7/dist-packages/tensorflow_gcs_config/_gcs_config_ops.so']
caused by: ['/usr/local/lib/python3.7/dist-packages/tensorflow_gcs_config/_gcs_config_ops.so: undefined symbol: _ZNK10tensorflow8OpKernel11TraceStringERKNS_15OpKernelContextEb']
This seems to have happened before: #319,
however I was not able to use any of the recommended workarounds.
same issue
Updating that package version with !pip install -U tensorflow-gcs-config==2.9.1
fix notebook access to GCS
Thank you! Confirmed this fixes my issue
I just started getting this issue. Changing versions has no effect.
same
I found a workaround by adding TPU service account to the bucket.
- Remove any references to tensorflow_gcs_config.
- Remove "os.environ['USE_AUTH_EPHEM'] = '0'"
- Let the code fail.
- You will get a permissions error from the TPU that contains the name of the service account requiring access. I assume the service account is different for everyone. EX:
service-xxxxxxxxxxx@cloud-tpu.iam.gserviceaccount.com does not have storage.objects.list access to the Google Cloud Storage bucket. Permission 'storage.objects.list' denied on resource (or it may not exist)." - Log into GCS console. Navigate to the bucket.
- Click on Permissions.
- Assign the role "Storage Object Admin" to the service account listed above.
Now run your project.