Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
9e8a308e
Commit
9e8a308e
authored
Mar 01, 2024
by
Rhett Ying
Committed by
RhettYing
Mar 02, 2024
Browse files
[doc] install cpu version by default in notebooks (#7186)
parent
2550ac5c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
15 deletions
+13
-15
notebooks/stochastic_training/link_prediction.ipynb
notebooks/stochastic_training/link_prediction.ipynb
+7
-8
notebooks/stochastic_training/node_classification.ipynb
notebooks/stochastic_training/node_classification.ipynb
+6
-7
No files found.
notebooks/stochastic_training/link_prediction.ipynb
View file @
9e8a308e
...
...
@@ -43,10 +43,11 @@
"os.environ['TORCH'] = torch.__version__\n",
"os.environ['DGLBACKEND'] = \"pytorch\"\n",
"\n",
"# Install the CUDA version. If you want to install CPU version, please\n",
"# refer to https://www.dgl.ai/pages/start.html.\n",
"device = torch.device(\"cuda\")\n",
"!pip install --pre dgl -f https://data.dgl.ai/wheels-test/cu121/repo.html\n",
"# Install the CPU version in default. If you want to install CUDA version,\n",
"# please refer to https://www.dgl.ai/pages/start.html and change runtime type\n",
"# accordingly.\n",
"device = torch.device(\"cpu\")\n",
"!pip install --pre dgl -f https://data.dgl.ai/wheels-test/repo.html\n",
"\n",
"try:\n",
" import dgl\n",
...
...
@@ -348,8 +349,7 @@
"metadata": {
"colab": {
"private_outputs": true,
"provenance": [],
"gpuType": "T4"
"provenance": []
},
"kernelspec": {
"display_name": "Python 3",
...
...
@@ -366,8 +366,7 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.12"
},
"accelerator": "GPU"
}
},
"nbformat": 4,
"nbformat_minor": 0
...
...
notebooks/stochastic_training/node_classification.ipynb
View file @
9e8a308e
...
...
@@ -44,10 +44,11 @@
"os.environ['TORCH'] = torch.__version__\n",
"os.environ['DGLBACKEND'] = \"pytorch\"\n",
"\n",
"# Install the CUDA version. If you want to install CPU version, please\n",
"# refer to https://www.dgl.ai/pages/start.html.\n",
"device = torch.device(\"cuda\")\n",
"!pip install --pre dgl -f https://data.dgl.ai/wheels-test/cu121/repo.html\n",
"# Install the CPU version in default. If you want to install CUDA version,\n",
"# please refer to https://www.dgl.ai/pages/start.html and change runtime type\n",
"# accordingly.\n",
"device = torch.device(\"cpu\")\n",
"!pip install --pre dgl -f https://data.dgl.ai/wheels-test/repo.html\n",
"\n",
"try:\n",
" import dgl\n",
...
...
@@ -351,9 +352,7 @@
}
],
"metadata": {
"accelerator": "GPU",
"colab": {
"gpuType": "T4",
"private_outputs": true,
"provenance": []
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment