Commit 0d9a24b2 authored by Hamish Tomlinson's avatar Hamish Tomlinson Committed by Copybara-Service
Browse files

Use shutil to zip and download colab outputs

PiperOrigin-RevId: 501595938
Change-Id: Ib586090d13279eca1371f0e0b046379b728a3e87
parent a3941673
......@@ -342,6 +342,7 @@
"from concurrent import futures\n",
"import json\n",
"import random\n",
"import shutil\n",
"\n",
"from urllib import request\n",
"from google.colab import files\n",
......@@ -773,7 +774,7 @@
" f.write(pae_data)\n",
"\n",
"# --- Download the predictions ---\n",
"!zip -q -r {output_dir}.zip {output_dir}\n",
"shutil.make_archive(base_name='prediction', format='zip', root_dir=output_dir)\n",
"files.download(f'{output_dir}.zip')"
]
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment