我的 Google 云端硬盘帐户上有 2TB 存储空间。
我想将它们与 Cloud Colab (GPU Python 3) 一起使用。
我已经安装了驱动器空间,但我仍然坚持使用 ~69GB 的 Colab 存储。
(1) 安装驱动器空间
WORKSPACE_PATH = 'ml/'
drive.mount('/content/drive/', force_remount=True)
ROOT_DIR = '/content/drive/My Drive/science'
BASE_DIR = os.path.join(ROOT_DIR, WORKSPACE_PATH)
Run Code Online (Sandbox Code Playgroud)
输出:安装在/content/drive/
(2) 从GCS下载了大约40GB的数据:
bucker_name = 'my_bucket_name'
!gsutil -m cp gs://{bucket_name}/* 'path_to_my_mounted_drive'
Run Code Online (Sandbox Code Playgroud)
输出:
Copying gs://xxx/test.h5...
Copying gs://xxx/train.h5...
[Errno 28] No space left on device
[Errno 28] No space left on device
[Errno 28] No space left on device
[Errno 28] No space left on device
[Errno …Run Code Online (Sandbox Code Playgroud) 尝试使用 RxFire 在 Google Cloud Storage 中上传大型图像文件时,出现错误:存储/未找到对象。
\n\n他们说在桶中找不到该图像,但当我检查时,我看到了它们!
\n\n我用小图像(可能是 100kb...)进行了测试,效果很好。
\n\n但尝试使用 > 500kb 图像,不起作用......
\n\nupload$\n .pipe(\n switchMap((event: any) => {\n const name = Math.random().toString(36).substring(5);\n const blob = event.target.files[0];\n const type = blob.type.replace(\'image/\', \'\');\n const ref = storage.ref(`uploads/test/${name}.${type}`);\n return put(ref, blob);\n }),\n map(snapshot => snapshot),\n filter(snapshot => snapshot.totalBytes === snapshot.bytesTransferred),\n mergeMap(snapshot => getDownloadURL(snapshot.ref))\n )\n .subscribe(url => {\n console.log(\'Results\', url)\n }, (error) => {\n // ERROR HERE\n console.log(\'error\', error)\n })\nRun Code Online (Sandbox Code Playgroud)\n\n预期结果:上传处理大图像
\n\n实际结果:错误
\n\nUncaught t\xc2\xa0{code_: "storage/object-not-found", …Run Code Online (Sandbox Code Playgroud) 我已经使用Beam一段时间了,我想知道编写高效且优化的Beam管道的关键概念是什么。
我有一些Spark背景知识,并且我知道我们可能更喜欢使用reduceByKey而不是groupByKey以避免混洗并优化网络流量。
Beam也一样吗?
我将不胜感激一些技巧或材料/最佳实践。