Commit 9e8a308e authored by Rhett Ying's avatar Rhett Ying Committed by RhettYing
Browse files

[doc] install cpu version by default in notebooks (#7186)

parent 2550ac5c
...@@ -43,10 +43,11 @@ ...@@ -43,10 +43,11 @@
"os.environ['TORCH'] = torch.__version__\n", "os.environ['TORCH'] = torch.__version__\n",
"os.environ['DGLBACKEND'] = \"pytorch\"\n", "os.environ['DGLBACKEND'] = \"pytorch\"\n",
"\n", "\n",
"# Install the CUDA version. If you want to install CPU version, please\n", "# Install the CPU version in default. If you want to install CUDA version,\n",
"# refer to https://www.dgl.ai/pages/start.html.\n", "# please refer to https://www.dgl.ai/pages/start.html and change runtime type\n",
"device = torch.device(\"cuda\")\n", "# accordingly.\n",
"!pip install --pre dgl -f https://data.dgl.ai/wheels-test/cu121/repo.html\n", "device = torch.device(\"cpu\")\n",
"!pip install --pre dgl -f https://data.dgl.ai/wheels-test/repo.html\n",
"\n", "\n",
"try:\n", "try:\n",
" import dgl\n", " import dgl\n",
...@@ -348,8 +349,7 @@ ...@@ -348,8 +349,7 @@
"metadata": { "metadata": {
"colab": { "colab": {
"private_outputs": true, "private_outputs": true,
"provenance": [], "provenance": []
"gpuType": "T4"
}, },
"kernelspec": { "kernelspec": {
"display_name": "Python 3", "display_name": "Python 3",
...@@ -366,8 +366,7 @@ ...@@ -366,8 +366,7 @@
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.10.12" "version": "3.10.12"
}, }
"accelerator": "GPU"
}, },
"nbformat": 4, "nbformat": 4,
"nbformat_minor": 0 "nbformat_minor": 0
......
...@@ -44,10 +44,11 @@ ...@@ -44,10 +44,11 @@
"os.environ['TORCH'] = torch.__version__\n", "os.environ['TORCH'] = torch.__version__\n",
"os.environ['DGLBACKEND'] = \"pytorch\"\n", "os.environ['DGLBACKEND'] = \"pytorch\"\n",
"\n", "\n",
"# Install the CUDA version. If you want to install CPU version, please\n", "# Install the CPU version in default. If you want to install CUDA version,\n",
"# refer to https://www.dgl.ai/pages/start.html.\n", "# please refer to https://www.dgl.ai/pages/start.html and change runtime type\n",
"device = torch.device(\"cuda\")\n", "# accordingly.\n",
"!pip install --pre dgl -f https://data.dgl.ai/wheels-test/cu121/repo.html\n", "device = torch.device(\"cpu\")\n",
"!pip install --pre dgl -f https://data.dgl.ai/wheels-test/repo.html\n",
"\n", "\n",
"try:\n", "try:\n",
" import dgl\n", " import dgl\n",
...@@ -351,9 +352,7 @@ ...@@ -351,9 +352,7 @@
} }
], ],
"metadata": { "metadata": {
"accelerator": "GPU",
"colab": { "colab": {
"gpuType": "T4",
"private_outputs": true, "private_outputs": true,
"provenance": [] "provenance": []
}, },
...@@ -376,4 +375,4 @@ ...@@ -376,4 +375,4 @@
}, },
"nbformat": 4, "nbformat": 4,
"nbformat_minor": 0 "nbformat_minor": 0
} }
\ No newline at end of file
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