如何解决Google Colab无法从GCS Bucket中获取文件
我正在尝试使用TPU训练repo的模型,该模型需要所有输入文件,并且模型目录必须使用云存储桶。
我确实创建了一个存储区并上传了模型的所有文件。
但是google colab无法读取我的存储分区的路径。这是我运行文件的命令:
!python run_coqa.py \
--use_tpu=True \
--tpu=TF_MASTER \ # 'grpc://'
--spiece_model_file=/content/xlnet_extension_tf/model/xlnet_cased_L-24_H-1024_A-16/spiece.model \
--model_config_path=gs://my_xlnet_2/xlnet_cased_L-24_H-1024_A-16/xlnet_config.json \
--init_checkpoint=gs://my_xlnet_2/xlnet_cased_L-24_H-1024_A-16/xlnet_model.ckpt \
--task_name=coqa \
--random_seed=100 \
--predict_tag=xxxxx \
--data_dir=/content/xlnet_extension_tf/data \
--output_dir=gs://my_xlnet_2/xlnet_output \
--model_dir=gs://my_xlnet_2/xlnet_output \
--export_dir=gs://my_xlnet_2/xlnet_output \
...
然后我收到此错误:
FileNotFoundError: [Errno 2] No such file or directory: 'gs://my_xlnet_2/xlnet_output'
我可以使用以下命令BUCKET_NAME = 'gs://my_xlnet_2'
将文件上传到存储桶中:
!gsutil mv /content/xlnet_extension_tf/model/xlnet_cased_L-24_H-1024_A-16 $BUCKET_NAME
你们知道如何解决这个问题吗?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。