Skip to content

Commit 0d9a24b

Browse files
Htomlinson14copybara-github
authored andcommitted
Use shutil to zip and download colab outputs
PiperOrigin-RevId: 501595938 Change-Id: Ib586090d13279eca1371f0e0b046379b728a3e87
1 parent a394167 commit 0d9a24b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

notebooks/AlphaFold.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@
342342
"from concurrent import futures\n",
343343
"import json\n",
344344
"import random\n",
345+
"import shutil\n",
345346
"\n",
346347
"from urllib import request\n",
347348
"from google.colab import files\n",
@@ -773,7 +774,7 @@
773774
" f.write(pae_data)\n",
774775
"\n",
775776
"# --- Download the predictions ---\n",
776-
"!zip -q -r {output_dir}.zip {output_dir}\n",
777+
"shutil.make_archive(base_name='prediction', format='zip', root_dir=output_dir)\n",
777778
"files.download(f'{output_dir}.zip')"
778779
]
779780
},

0 commit comments

Comments
 (0)