Last active
February 2, 2022 18:52
-
-
Save previtus/93b901eb22e9d780ead9edbf26adbb45 to your computer and use it in GitHub Desktop.
practical_colab_starter_HT22.ipynb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"nbformat": 4, | |
"nbformat_minor": 0, | |
"metadata": { | |
"colab": { | |
"name": "practical_colab_starter_HT22.ipynb", | |
"provenance": [], | |
"collapsed_sections": [], | |
"include_colab_link": true | |
}, | |
"kernelspec": { | |
"name": "python3", | |
"display_name": "Python 3" | |
}, | |
"accelerator": "GPU" | |
}, | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "view-in-github", | |
"colab_type": "text" | |
}, | |
"source": [ | |
"<a href=\"https://colab.research.google.com/gist/previtus/93b901eb22e9d780ead9edbf26adbb45/practical_colab_starter_ht22.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"source": [ | |
"*This is a starter notebook which installs the correct python libraries to run on Google Collab (as tested on 2.2.2022).*" | |
], | |
"metadata": { | |
"id": "5EW65PMGw6Lz" | |
} | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "o9wEHGQEgWzD" | |
}, | |
"source": [ | |
"# Environment" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "sRwrcnodgQVY", | |
"outputId": "2d17b482-7108-491d-cff4-868aefee5e17" | |
}, | |
"source": [ | |
"!pip install networkx" | |
], | |
"execution_count": null, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"name": "stdout", | |
"text": [ | |
"Requirement already satisfied: networkx in /usr/local/lib/python3.7/dist-packages (2.6.3)\n" | |
] | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "FcuyM0V1gSm5", | |
"outputId": "c39bb929-fc46-4d25-d0c7-aab78396ff58" | |
}, | |
"source": [ | |
"!python -c \"import torch; print(torch.__version__)\"" | |
], | |
"execution_count": null, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"name": "stdout", | |
"text": [ | |
"1.10.0+cu111\n" | |
] | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "1HjB5HgqgVf6", | |
"outputId": "dbd35b3f-c4cb-42be-c0ef-d65a197e2d2a" | |
}, | |
"source": [ | |
"!python -c \"import torch; print(torch.version.cuda)\"" | |
], | |
"execution_count": null, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"name": "stdout", | |
"text": [ | |
"11.1\n" | |
] | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "8iU60yUzgYnA" | |
}, | |
"source": [ | |
"# using those two numbers we install the correct pytorch-geometric\n", | |
"# torch 1.10.0\n", | |
"# cuda cu111\n", | |
"!pip install --no-index torch-scatter -f https://pytorch-geometric.com/whl/torch-1.10.0+cu111.html\n", | |
"!pip install --no-index torch-sparse -f https://pytorch-geometric.com/whl/torch-1.10.0+cu111.html\n", | |
"!pip install --no-index torch-cluster -f https://pytorch-geometric.com/whl/torch-1.10.0+cu111.html\n", | |
"!pip install --no-index torch-spline-conv -f https://pytorch-geometric.com/whl/torch-1.10.0+cu111.html\n", | |
"!pip install torch-geometric" | |
], | |
"execution_count": null, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "xs7m0TvJhL4O" | |
}, | |
"source": [ | |
"Suggested tutorials\n", | |
"\n", | |
"> https://networkx.org/documentation/stable/tutorial.html\n", | |
"\n", | |
"> https://pytorch-geometric.readthedocs.io/en/latest/notes/colabs.html\n" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "DAd7CzS6gzhM" | |
}, | |
"source": [ | |
"# Assignment\n", | |
"\n", | |
"See: https://www.cs.ox.ac.uk/files/13312/ATML_Practical_1.pdf" | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment