Skip to content

Commit 0cd3c73

Browse files
committed
🎨 add default versions for pip install in google colab
1 parent dd6bc1c commit 0cd3c73

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

tutorials/zero-shot/Tutorial_ZeroShot_Integration.ipynb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,17 @@
5151
"\n",
5252
"import os\n",
5353
"import sys\n",
54+
"%load_ext autoreload\n",
55+
"%autoreload 2\n",
5456
"\n",
5557
"if \"google.colab\" in sys.modules:\n",
5658
" print(\"Running on Google Colab\")\n",
5759
" print(\"Installing dependencies...\")\n",
58-
" !pip install -U scgpt \"torch<=2.2.2\"\n",
60+
" !pip install -U scgpt \"torch<=2.2.2\" \"numpy<2\" \"umap-learn<0.5.7\"\n",
5961
" # the optional dependency of flash-attion is skipped on colab\n",
6062
" !pip install wandb louvain\n",
6163
"\n",
62-
" # NOTE: May need to restart runtime after the installation\n",
64+
" # NOTE: MAY NEED TO RESTART RUNTIME AFTER THE INSTALLATION\n",
6365
"\n",
6466
" print(\"Downloading data and model ckpt...\")\n",
6567
" !pip install -q -U gdown\n",

tutorials/zero-shot/Tutorial_ZeroShot_Integration_Continual_Pretraining.ipynb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,17 @@
4646
"\n",
4747
"import os\n",
4848
"import sys\n",
49+
"%load_ext autoreload\n",
50+
"%autoreload 2\n",
4951
"\n",
5052
"if \"google.colab\" in sys.modules:\n",
5153
" print(\"Running on Google Colab\")\n",
5254
" print(\"Installing dependencies...\")\n",
53-
" !pip install -U scgpt \"torch<=2.2.2\"\n",
55+
" !pip install -U scgpt \"torch<=2.2.2\" \"numpy<2\" \"umap-learn<0.5.7\"\n",
5456
" # the optional dependency of flash-attion is skipped on colab\n",
5557
" !pip install wandb louvain\n",
5658
"\n",
57-
" # NOTE: May need to restart runtime after the installation\n",
59+
" # NOTE: MAY NEED TO RESTART RUNTIME AFTER THE INSTALLATION\n",
5860
"\n",
5961
" print(\"Downloading data and model ckpt...\")\n",
6062
" !pip install -q -U gdown\n",

tutorials/zero-shot/Tutorial_ZeroShot_Reference_Mapping.ipynb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,17 @@
4646
"\n",
4747
"import os\n",
4848
"import sys\n",
49+
"%load_ext autoreload\n",
50+
"%autoreload 2\n",
4951
"\n",
5052
"if \"google.colab\" in sys.modules:\n",
5153
" print(\"Running on Google Colab\")\n",
5254
" print(\"Installing dependencies...\")\n",
53-
" !pip install -U scgpt \"torch<=2.2.2\"\n",
55+
" !pip install -U scgpt \"torch<=2.2.2\" \"numpy<2\" \"umap-learn<0.5.7\"\n",
5456
" # the optional dependency of flash-attion is skipped on colab\n",
5557
" !pip install wandb louvain faiss-cpu\n",
5658
"\n",
57-
" # NOTE: May need to restart runtime after the installation\n",
59+
" # NOTE: MAY NEED TO RESTART RUNTIME AFTER THE INSTALLATION\n",
5860
"\n",
5961
" print(\"Downloading data and model ckpt...\")\n",
6062
" !pip install -q -U gdown\n",

0 commit comments

Comments
 (0)