在kaggle中执行HTTP请求时出错

2024-05-23 22:42:56 发布

您现在位置:Python中文网/ 问答频道 /正文

当我运行此代码时

nq_task = t5.data.TaskRegistry.get("nq_context_free")
ds = nq_task.get_dataset(split="validation", sequence_length={"inputs": 128, "targets": 32})
print("A few preprocessed validation examples...")
for ex in tfds.as_numpy(ds.take(5)):
  print(ex)

我有这个错误

PermissionDeniedError: Error executing an HTTP request: HTTP response code 403 with body '<?xml version='1.0' encoding='UTF-8'?><Error><Code>AccessDenied</Code><Message>Access denied.</Message><Details>Anonymous caller does not have storage.objects.get access to the Google Cloud Storage object.</Details></Error>'
     when reading gs://t5_abstr_summ_arxiv_001/train1.tsv

Tags: 代码httpmessagetaskdatagetdscode