'All attempts to get a Google authentication bearer token failed, returning an empty token
What I need help with / What I was wondering tfds.load failure
import tensorflow as tf
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
import tensorflow_datasets as tfds
tfds.load('glue/sst2', download=True, try_gcs=True, split="validation")
Stack trace
2021-01-09 10:57:42.393771: E tensorflow/core/platform/cloud/curl_http_request.cc:614] The transmission of request 0x7fcf41a30f60 (URI: https://www.googleapis.com/oauth2/v4/token) has been stuck at 0 of 0 bytes for 61 seconds and will be aborted. CURL timing information: lookup time: 0.001158 (No error), connect time: 0 (No error), pre-transfer time: 0 (No error), start-transfer time: 0 (No error) 2021-01-09 10:57:42.397383: W tensorflow/core/platform/cloud/google_auth_provider.cc:184] All attempts to get a Google authentication bearer token failed, returning an empty token. Retrieving token from files failed with "Unavailable: Error executing an HTTP request: libcurl code 42 meaning 'Operation was aborted by an application callback', error details: Callback aborted". Retrieving token from GCE failed with "Failed precondition: Error executing an HTTP request: libcurl code 6 meaning 'Couldn't resolve host name', error details: Couldn't resolve host 'metadata'". 2021-01-09 10:58:46.099418: E tensorflow/core/platform/cloud/curl_http_request.cc:614] The transmission of request 0x7fcf3304b4e0 (URI: https://www.googleapis.com/storage/v1/b/tfds-data/o/datasets%2Fglue?fields=size%2Cgeneration%2Cupdated) has been stuck at 0 of 0 bytes for 61 seconds and will be aborted. CURL timing information: lookup time: 0.000995 (No error), connect time: 0 (No error), pre-transfer time: 0 (No error), start-transfer time: 0 (No error) 2021-01-09 11:00:01.098669: E tensorflow/core/platform/cloud/curl_http_request.cc:614] The transmission of request 0x7fcf3304b4e0 (URI: https://www.googleapis.com/storage/v1/b/tfds-data/o/datasets%2Fglue?fields=size%2Cgeneration%2Cupdated) has been stuck at 0 of 0 bytes for 61 seconds and will be aborted. CURL timing information: lookup time: 0.00099 (No error), connect time: 0 (No error), pre-transfer time: 0 (No error), start-transfer time: 0 (No error) 2021-01-09 11:02:05.646245: E tensorflow/core/platform/cloud/curl_http_request.cc:614] The transmission of request 0x7fcf33290910 (URI: https://www.googleapis.com/storage/v1/b/tfds-data/o/datasets%2Fglue?fields=size%2Cgeneration%2Cupdated) has been stuck at 0 of 0 bytes for 61 seconds and will be aborted. CURL timing information: lookup time: 0.001604 (No error), connect time: 0 (No error), pre-transfer time: 0 (No error), start-transfer time: 0 (No error)
What I've tried so far I use VPN, but It was useless at the time
It would be nice if... Could we have done anything to make things better (documentation, etc.)?
Environment information (if applicable)
Operating System: mac os 10.15.7
Python version: 3.7.9
tensorflow-datasets version: 4.2.0
tensorflow version: 2.4.0
tensorflow-metadata version: 0.26.0
Solution 1:[1]
If you are in the mainland of China, GCS cannot be accessed inside thanks to firewalls.
But datasets(i tried MNIST, COCO) can be downloaded without GCS authetication. Just change _is_gcs_disabled = True as stated in this issue.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
