# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     name: python3
# ---

# + [markdown] id="view-in-github" colab_type="text"
# <a href="https://colab.research.google.com/github/Sripathm2/CompGCN/blob/master/CS249-Paper.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>

# + [markdown] id="VOoG8xKyA2Y2"
# Cloning the github repository. This is a fork of the original repository found at https://github.com/malllabiisc/CompGCN.

# + id="ylSzkcKQ-slV"
# ! rm -rf CompGCN
# ! git clone https://github.com/Sripathm2/CompGCN
# %cd CompGCN/

# + id="Qtxl8Q9mFIoO" outputId="beaab592-48a5-4f1a-e71d-21450c8fe743" colab={"base_uri": "https://localhost:8080/"}
# ! pip3 install -r requirements.txt

# + id="SdOYeVTtO_Q-" outputId="7be9c75c-8d24-4613-fd3b-336b6034445a" colab={"base_uri": "https://localhost:8080/"}
# %cd CompGCN/

# + id="L-kHmatQAgDv" outputId="6bacc084-3e6c-480d-8307-d50cb6d0bb68" colab={"base_uri": "https://localhost:8080/"}
# !chmod +x ./preprocess.sh
# ! ./preprocess.sh

# + id="1sKIkMHEHW97"
# !python3 run.py -score_func transe -opn sub -gamma 9 -hid_drop 0.1 -init_dim 200

# + id="xsumTGBZQblv" outputId="b6051c6e-4243-4bbd-ad54-2703eb796bdd" colab={"base_uri": "https://localhost:8080/"}
# !pip3 uninstall torch

# + id="Z4OZSgT4Qww3" outputId="f20b0434-f05b-4944-9a51-bed225e30ba8" colab={"base_uri": "https://localhost:8080/"}
# !pip uninstall torch-scatter

# + id="AfgfqvAJbTKA" outputId="7f4b292a-9551-4dac-9929-f50812dec468" colab={"base_uri": "https://localhost:8080/"}
# !pip3 install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.7.0+$cu102.html

# + id="plBrmb3xb41B" outputId="4d21ef80-ae83-433c-a562-a6cd929361b6" colab={"base_uri": "https://localhost:8080/", "height": 317}
from torch_scatter import scatter

# + id="M_kv2lncPhW-" outputId="bc5ab9df-8904-4cee-c06c-55e6ac222ef3" colab={"base_uri": "https://localhost:8080/"}
# !nvidia-smi

# + id="Nj_m4IZnPmkq" outputId="a655e73e-179e-480c-8598-56d3515457be" colab={"base_uri": "https://localhost:8080/"}
import torch
torch.cuda.is_available()

StarcoderdataJupyterScriptsDedupFiltered