Skip to content

Commit bfbed2f

Browse files
authored
add torchvision and datetime workarounds to all notebooks using colab (#253)
* add torchvision and datetime workarounds to all notebooks using colab * execute septop notebook * fix deprecation warning
1 parent dedc0c8 commit bfbed2f

File tree

7 files changed

+154
-67
lines changed

7 files changed

+154
-67
lines changed

abfe_tutorial/abfe_tutorial.ipynb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@
4545
"# Only run this cell if on google colab\n",
4646
"import os\n",
4747
"if \"COLAB_RELEASE_TAG\" in os.environ:\n",
48+
" # fix for colab's torchvision causing issues\n",
49+
" !rm -r /usr/local/lib/python3.12/dist-packages/torchvision\n",
50+
" \n",
4851
" !pip install -q condacolab\n",
4952
" import condacolab\n",
5053
" condacolab.install_from_url(\"https://github.com/OpenFreeEnergy/openfe/releases/download/v1.7.0/OpenFEforge-1.7.0-Linux-x86_64.sh\")"
@@ -65,6 +68,10 @@
6568
" import locale\n",
6669
" locale.getpreferredencoding = lambda: \"UTF-8\"\n",
6770
" !mkdir inputs && cd inputs && openfe fetch rbfe-tutorial\n",
71+
" # quick fix for https://github.com/conda-incubator/condacolab/issues/75\n",
72+
" # if deprecation warnings persist, rerun this cell\n",
73+
" import warnings\n",
74+
" warnings.filterwarnings(action=\"ignore\", message=r\"datetime.datetime.utcnow\") \n",
6875
" for _ in range(3):\n",
6976
" # Sometimes we have to re-run the check\n",
7077
" try:\n",

ahfe_tutorial/ahfe_tutorial.ipynb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@
4545
"# Only run this cell if on google colab\n",
4646
"import os\n",
4747
"if \"COLAB_RELEASE_TAG\" in os.environ:\n",
48+
" # fix for colab's torchvision causing issues\n",
49+
" !rm -r /usr/local/lib/python3.12/dist-packages/torchvision\n",
50+
" \n",
4851
" !pip install -q condacolab\n",
4952
" import condacolab\n",
5053
" condacolab.install_from_url(\"https://github.com/OpenFreeEnergy/openfe/releases/download/v1.7.0/OpenFEforge-1.7.0-Linux-x86_64.sh\")"
@@ -65,6 +68,10 @@
6568
" import locale\n",
6669
" locale.getpreferredencoding = lambda: \"UTF-8\"\n",
6770
" !mkdir inputs && cd inputs && openfe fetch rbfe-tutorial\n",
71+
" # quick fix for https://github.com/conda-incubator/condacolab/issues/75\n",
72+
" # if deprecation warnings persist, rerun this cell\n",
73+
" import warnings\n",
74+
" warnings.filterwarnings(action=\"ignore\", message=r\"datetime.datetime.utcnow\") \n",
6875
" for _ in range(3):\n",
6976
" # Sometimes we have to re-run the check\n",
7077
" try:\n",

openmm_md/plain_md.ipynb

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
},
7979
{
8080
"cell_type": "code",
81-
"execution_count": 1,
81+
"execution_count": null,
8282
"id": "6559bc05",
8383
"metadata": {},
8484
"outputs": [],
@@ -87,14 +87,17 @@
8787
"# Only run this cell if on google colab\n",
8888
"import os\n",
8989
"if \"COLAB_RELEASE_TAG\" in os.environ:\n",
90+
" # fix for colab's torchvision causing issues\n",
91+
" !rm -r /usr/local/lib/python3.12/dist-packages/torchvision\n",
92+
" \n",
9093
" !pip install -q condacolab\n",
9194
" import condacolab\n",
9295
" condacolab.install_from_url(\"https://github.com/OpenFreeEnergy/openfe/releases/download/v1.7.0/OpenFEforge-1.7.0-Linux-x86_64.sh\")"
9396
]
9497
},
9598
{
9699
"cell_type": "code",
97-
"execution_count": 2,
100+
"execution_count": null,
98101
"id": "eb1368ca",
99102
"metadata": {},
100103
"outputs": [],
@@ -107,6 +110,10 @@
107110
" import locale\n",
108111
" locale.getpreferredencoding = lambda: \"UTF-8\"\n",
109112
" !mkdir inputs && cd inputs && openfe fetch rbfe-tutorial\n",
113+
" # quick fix for https://github.com/conda-incubator/condacolab/issues/75\n",
114+
" # if deprecation warnings persist, rerun this cell\n",
115+
" import warnings\n",
116+
" warnings.filterwarnings(action=\"ignore\", message=r\"datetime.datetime.utcnow\") \n",
110117
" for _ in range(3):\n",
111118
" # Sometimes we have to re-run the check\n",
112119
" try:\n",

openmm_rbfe/OpenFE_showcase_1_RBFE_of_T4lysozyme.ipynb

Lines changed: 8 additions & 6 deletions
Large diffs are not rendered by default.

openmm_septop/ligand_network.graphml

Lines changed: 73 additions & 0 deletions
Large diffs are not rendered by default.

openmm_septop/septop_tutorial.ipynb

Lines changed: 43 additions & 59 deletions
Large diffs are not rendered by default.

plotting_rbfes_with_cinnabar/PlottingFreeEnergiesUsingCinnabar.ipynb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
"# Only run this cell if on google colab\n",
3232
"import os\n",
3333
"if \"COLAB_RELEASE_TAG\" in os.environ:\n",
34+
" # fix for colab's torchvision causing issues\n",
35+
" !rm -r /usr/local/lib/python3.12/dist-packages/torchvision\n",
36+
" \n",
3437
" !pip install -q condacolab\n",
3538
" import condacolab\n",
3639
" condacolab.install_from_url(\"https://github.com/OpenFreeEnergy/openfe/releases/download/v1.7.0/OpenFEforge-1.7.0-Linux-x86_64.sh\")"
@@ -51,6 +54,10 @@
5154
" import locale\n",
5255
" locale.getpreferredencoding = lambda: \"UTF-8\"\n",
5356
" !mkdir inputs && cd inputs && openfe fetch rbfe-tutorial\n",
57+
" # quick fix for https://github.com/conda-incubator/condacolab/issues/75\n",
58+
" # if deprecation warnings persist, rerun this cell\n",
59+
" import warnings\n",
60+
" warnings.filterwarnings(action=\"ignore\", message=r\"datetime.datetime.utcnow\") \n",
5461
" for _ in range(3):\n",
5562
" # Sometimes we have to re-run the check\n",
5663
" try:\n",

0 commit comments

Comments
 (0)