Я использую коллаборацию Google для предварительной подготовки bert. Мои train_data находятся в облачном хранилище Google, мой код на colab
IS_COLAB_BACKEND = 'COLAB_GPU' in os.environ
if IS_COLAB_BACKEND:
from google.colab import auth
auth.authenticate_user()
model_saved_path = 'gs://zhongxing_train/model/roberta_pretrain_model2.ckpt'
corpus_paths = ['gs://zhongxing_train/corpus.0.tfrecord' ]
tpu_address = 'grpc://' + os.environ['COLAB_TPU_ADDR']
Текущее сообщение об ошибке:
PermissionDeniedError Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/client/session.py in _do_call(self, fn, *args)
1355 try:
-> 1356 return fn(*args)
1357 except errors.OpError as e:
10 frames
PermissionDeniedError: From /job:worker/replica:0/task:0:
Error executing an HTTP request: HTTP response code 403 with body '{
"error": {
"code": 403,
"message": "service-495559152420@cloud-tpu.iam.gserviceaccount.com does not have storage.objects.get access to zhongxing_train/corpus.0.tfrecord.",
"errors": [
{
"message": "service-495559152420@cloud-tpu.iam.gserviceaccount.com does not have storage.objects.get access to zhongxing_train/corpus.0.tfrecord.",
"domain": "global",
"reason": "forbidden"
}
]
}
}
'
when reading metadata of gs://zhongxing_train/corpus.0.tfrecord
[[{{node MultiDeviceIteratorGetNextFromShard}}]]
[[RemoteCall]]
[[IteratorGetNextAsOptional]]
During handling of the above exception, another exception occurred:
PermissionDeniedError Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/client/session.py in _do_call(self, fn, *args)
1368 pass
1369 message = error_interpolation.interpolate(message, self._graph)
-> 1370 raise type(e)(node_def, op, message)
1371
1372 def _extend_graph(self):
PermissionDeniedError: From /job:worker/replica:0/task:0:
Error executing an HTTP request: HTTP response code 403 with body '{
"error": {
"code": 403,
"message": "service-495559152420@cloud-tpu.iam.gserviceaccount.com does not have storage.objects.get access to zhongxing_train/corpus.0.tfrecord.",
"errors": [
{
"message": "service-495559152420@cloud-tpu.iam.gserviceaccount.com does not have storage.objects.get access to zhongxing_train/corpus.0.tfrecord.",
"domain": "global",
"reason": "forbidden"
}
]
}
}
'
when reading metadata of gs://zhongxing_train/corpus.0.tfrecord
[[{{node MultiDeviceIteratorGetNextFromShard}}]]
[[RemoteCall]]
[[IteratorGetNextAsOptional]]
Это мой шнур colab
Я думаю, может быть, мне нужно установить разрешение для моих train_data для облачного хранилища Как я могу получить разрешение от облачного хранилища Google