Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dataset] make rgcn compatible with the latest version of numpy #183

Merged
merged 4 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion examples/agnn/agnn_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
"""
import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
# os.environ['TL_BACKEND'] = 'torch'
os.environ['TL_BACKEND'] = 'torch'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0:Output all; 1:Filter out INFO; 2:Filter out INFO and WARNING; 3:Filter out INFO, WARNING, and ERROR

import argparse
import tensorlayerx as tlx
from gammagl.datasets import Planetoid
Expand Down
5 changes: 4 additions & 1 deletion examples/appnp/appnp_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@

import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
# os.environ['TL_BACKEND'] = 'torch'
os.environ['TL_BACKEND'] = 'torch'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0:Output all; 1:Filter out INFO; 2:Filter out INFO and WARNING; 3:Filter out INFO, WARNING, and ERROR

import argparse
import tensorlayerx as tlx
from gammagl.datasets import Planetoid
Expand Down
5 changes: 4 additions & 1 deletion examples/cagcn/cagcn_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@

import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
# os.environ['TL_BACKEND'] = 'torch'
os.environ['TL_BACKEND'] = 'torch'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0:Output all; 1:Filter out INFO; 2:Filter out INFO and WARNING; 3:Filter out INFO, WARNING, and ERROR

import argparse
import tensorlayerx as tlx
from gammagl.datasets import Planetoid
Expand Down
5 changes: 4 additions & 1 deletion examples/chebnet/chebnet_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@

import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
# os.environ['TL_BACKEND'] = 'torch'
os.environ['TL_BACKEND'] = 'torch'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0:Output all; 1:Filter out INFO; 2:Filter out INFO and WARNING; 3:Filter out INFO, WARNING, and ERROR

import argparse
import tensorlayerx as tlx
from gammagl.datasets import Planetoid
Expand Down
7 changes: 5 additions & 2 deletions examples/cogsl/cogsl_trainer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import os
# os.environ['CUDA_VISIBLE_DEVICES']='0'
# os.environ['TL_BACKEND'] = 'paddle'
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
os.environ['TL_BACKEND'] = 'torch'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0:Output all; 1:Filter out INFO; 2:Filter out INFO and WARNING; 3:Filter out INFO, WARNING, and ERROR


import sys
import argparse
Expand Down
5 changes: 4 additions & 1 deletion examples/compgcn/compgcn_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
# @FileName: compgcn_trainer.py
import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
# os.environ['TL_BACKEND'] = 'torch'
os.environ['TL_BACKEND'] = 'torch'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0:Output all; 1:Filter out INFO; 2:Filter out INFO and WARNING; 3:Filter out INFO, WARNING, and ERROR

import argparse
import tensorlayerx as tlx
from gammagl.models import CompGCN
Expand Down
5 changes: 4 additions & 1 deletion examples/deepwalk/deepwalk_trainer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
# os.environ['TL_BACKEND'] = 'torch'
os.environ['TL_BACKEND'] = 'torch'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0:Output all; 1:Filter out INFO; 2:Filter out INFO and WARNING; 3:Filter out INFO, WARNING, and ERROR

import argparse
import tensorlayerx as tlx
from gammagl.datasets import Planetoid
Expand Down
5 changes: 4 additions & 1 deletion examples/dgcnn/dgcnn_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
"""
import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
# os.environ['TL_BACKEND'] = 'torch'
os.environ['TL_BACKEND'] = 'torch'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0:Output all; 1:Filter out INFO; 2:Filter out INFO and WARNING; 3:Filter out INFO, WARNING, and ERROR

import argparse
import tensorlayerx as tlx
import tensorlayerx.nn as nn
Expand Down
6 changes: 4 additions & 2 deletions examples/dgi/dgi_trainer.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import math
import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
# os.environ['TL_BACKEND'] = 'torch'
os.environ['TL_BACKEND'] = 'torch'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0:Output all; 1:Filter out INFO; 2:Filter out INFO and WARNING; 3:Filter out INFO, WARNING, and ERROR

from gammagl.utils import add_self_loops, calc_gcn_norm, mask_to_index, remove_self_loops
import argparse
from tqdm import tqdm
Expand Down
5 changes: 4 additions & 1 deletion examples/drgst/dr_gst.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
# os.environ['TL_BACKEND'] = 'torch'
os.environ['TL_BACKEND'] = 'torch'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0:Output all; 1:Filter out INFO; 2:Filter out INFO and WARNING; 3:Filter out INFO, WARNING, and ERROR

import argparse
import copy
import numpy as np
Expand Down
5 changes: 4 additions & 1 deletion examples/dropedge/dropedge_trainer.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@

import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
# os.environ['TL_BACKEND'] = 'torch'
os.environ['TL_BACKEND'] = 'torch'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0:Output all; 1:Filter out INFO; 2:Filter out INFO and WARNING; 3:Filter out INFO, WARNING, and ERROR

import argparse
import tensorlayerx as tlx
from gammagl.datasets import Planetoid
Expand Down
5 changes: 4 additions & 1 deletion examples/fagcn/fagcn_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@

import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
# os.environ['TL_BACKEND'] = 'torch'
os.environ['TL_BACKEND'] = 'torch'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0:Output all; 1:Filter out INFO; 2:Filter out INFO and WARNING; 3:Filter out INFO, WARNING, and ERROR

import argparse
import tensorlayerx as tlx
from gammagl.datasets import Planetoid
Expand Down
5 changes: 4 additions & 1 deletion examples/film/film_trainer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
# os.environ['TL_BACKEND'] = 'torch'
os.environ['TL_BACKEND'] = 'torch'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0:Output all; 1:Filter out INFO; 2:Filter out INFO and WARNING; 3:Filter out INFO, WARNING, and ERROR

import argparse
import tensorlayerx as tlx
from tensorlayerx.model import TrainOneStep, WithLoss
Expand Down
9 changes: 6 additions & 3 deletions examples/gaan/GaAN_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@
@Author : yunhe
"""

import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
os.environ['TL_BACKEND'] = 'torch'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0:Output all; 1:Filter out INFO; 2:Filter out INFO and WARNING; 3:Filter out INFO, WARNING, and ERROR

from tensorlayerx.model import TrainOneStep, WithLoss
from gammagl.utils import add_self_loops, mask_to_index
from gammagl.models import GaANModel
from gammagl.datasets import Planetoid
import tensorlayerx as tlx
import argparse
import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
# os.environ['TL_BACKEND'] = 'torch'

class SemiSpvzLoss(WithLoss):
def __init__(self, net, loss_fn):
Expand Down
5 changes: 4 additions & 1 deletion examples/gat/gat_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@

import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
# os.environ['TL_BACKEND'] = 'torch'
os.environ['TL_BACKEND'] = 'torch'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0:Output all; 1:Filter out INFO; 2:Filter out INFO and WARNING; 3:Filter out INFO, WARNING, and ERROR

import argparse
import tensorlayerx as tlx
from gammagl.datasets import Planetoid
Expand Down
5 changes: 4 additions & 1 deletion examples/gatv2/gatv2_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@

import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
# os.environ['TL_BACKEND'] = 'torch'
os.environ['TL_BACKEND'] = 'torch'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0:Output all; 1:Filter out INFO; 2:Filter out INFO and WARNING; 3:Filter out INFO, WARNING, and ERROR

import argparse
import tensorlayerx as tlx
from gammagl.datasets import Planetoid
Expand Down
5 changes: 4 additions & 1 deletion examples/gcn/gcn_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@

import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
# os.environ['TL_BACKEND'] = 'torch'
os.environ['TL_BACKEND'] = 'torch'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0:Output all; 1:Filter out INFO; 2:Filter out INFO and WARNING; 3:Filter out INFO, WARNING, and ERROR

import argparse
import tensorlayerx as tlx
from gammagl.datasets import Planetoid
Expand Down
5 changes: 4 additions & 1 deletion examples/gcnii/gcnii_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@

import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
# os.environ['TL_BACKEND'] = 'torch'
os.environ['TL_BACKEND'] = 'torch'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0:Output all; 1:Filter out INFO; 2:Filter out INFO and WARNING; 3:Filter out INFO, WARNING, and ERROR

import argparse
import tensorlayerx as tlx
from gammagl.datasets import Planetoid
Expand Down
7 changes: 5 additions & 2 deletions examples/gen/gen_trainer.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
os.environ['TL_BACKEND'] = 'torch'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0:Output all; 1:Filter out INFO; 2:Filter out INFO and WARNING; 3:Filter out INFO, WARNING, and ERROR

import time
import argparse
import numpy as np
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
# os.environ['TL_BACKEND'] = 'torch'
import tensorlayerx as tlx
from gammagl.layers.conv import GCNConv
from gammagl.datasets import Planetoid
Expand Down
9 changes: 6 additions & 3 deletions examples/gin/gin.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@

import numpy
import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
# os.environ['TL_BACKEND'] = 'torch'
os.environ['TL_BACKEND'] = 'torch'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0:Output all; 1:Filter out INFO; 2:Filter out INFO and WARNING; 3:Filter out INFO, WARNING, and ERROR


import numpy
import argparse
import tensorlayerx as tlx
from tensorlayerx.model import TrainOneStep, WithLoss
Expand Down
5 changes: 4 additions & 1 deletion examples/gmm/gmm_trainer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
# os.environ['TL_BACKEND'] = 'torch'
os.environ['TL_BACKEND'] = 'torch'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0:Output all; 1:Filter out INFO; 2:Filter out INFO and WARNING; 3:Filter out INFO, WARNING, and ERROR

import argparse
import tensorlayerx as tlx
from gammagl.datasets import Planetoid
Expand Down
7 changes: 5 additions & 2 deletions examples/gprgnn/gprgnn_trainer.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import os
import os.path as osp
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
# os.environ['TL_BACKEND'] = 'torch'
os.environ['TL_BACKEND'] = 'torch'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0:Output all; 1:Filter out INFO; 2:Filter out INFO and WARNING; 3:Filter out INFO, WARNING, and ERROR

import os.path as osp
import argparse
from tqdm import tqdm
import numpy as np
Expand Down
5 changes: 4 additions & 1 deletion examples/grace/grace_trainer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
# os.environ['TL_BACKEND'] = 'torch'
os.environ['TL_BACKEND'] = 'torch'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0:Output all; 1:Filter out INFO; 2:Filter out INFO and WARNING; 3:Filter out INFO, WARNING, and ERROR

from gammagl.utils import add_self_loops, calc_gcn_norm
import argparse
from tqdm import tqdm
Expand Down
6 changes: 5 additions & 1 deletion examples/grade/grade_trainer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
# os.environ['TL_BACKEND'] = 'torch'
os.environ['TL_BACKEND'] = 'torch'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0:Output all; 1:Filter out INFO; 2:Filter out INFO and WARNING; 3:Filter out INFO, WARNING, and ERROR


import tensorlayerx as tlx
import argparse
from gammagl.models.grade import GRADE
Expand Down
5 changes: 4 additions & 1 deletion examples/graphgan/graphgan_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@

import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
# os.environ['TL_BACKEND'] = 'torch'
os.environ['TL_BACKEND'] = 'torch'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0:Output all; 1:Filter out INFO; 2:Filter out INFO and WARNING; 3:Filter out INFO, WARNING, and ERROR

from gammagl.models import GraphGAN
from gammagl.utils import read_embeddings
from gammagl.datasets import CA_GrQc
Expand Down
5 changes: 4 additions & 1 deletion examples/graphsage/train_full.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
# os.environ['TL_BACKEND'] = 'torch'
os.environ['TL_BACKEND'] = 'torch'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0:Output all; 1:Filter out INFO; 2:Filter out INFO and WARNING; 3:Filter out INFO, WARNING, and ERROR

from gammagl.models.graphsage import GraphSAGE_Full_Model
import argparse
import tensorlayerx as tlx
Expand Down
5 changes: 4 additions & 1 deletion examples/han/han_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
# @FileName: han_trainer.py
import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
# os.environ['TL_BACKEND'] = 'torch'
os.environ['TL_BACKEND'] = 'torch'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0:Output all; 1:Filter out INFO; 2:Filter out INFO and WARNING; 3:Filter out INFO, WARNING, and ERROR

import argparse
import tensorlayerx as tlx
import gammagl.transforms as T
Expand Down
5 changes: 4 additions & 1 deletion examples/hardgat/hardgat_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@

import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
# os.environ['TL_BACKEND'] = 'torch'
os.environ['TL_BACKEND'] = 'torch'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0:Output all; 1:Filter out INFO; 2:Filter out INFO and WARNING; 3:Filter out INFO, WARNING, and ERROR

import argparse
import tensorlayerx as tlx
from gammagl.datasets import Planetoid
Expand Down
5 changes: 4 additions & 1 deletion examples/hcha/hcha_trainer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
# os.environ['TL_BACKEND'] = 'torch'
os.environ['TL_BACKEND'] = 'torch'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0:Output all; 1:Filter out INFO; 2:Filter out INFO and WARNING; 3:Filter out INFO, WARNING, and ERROR

import argparse
import tensorlayerx as tlx
import numpy as np
Expand Down
5 changes: 4 additions & 1 deletion examples/herec/herec_trainer_aminer.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import argparse
import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
# os.environ['TL_BACKEND'] = 'torch'
os.environ['TL_BACKEND'] = 'torch'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0:Output all; 1:Filter out INFO; 2:Filter out INFO and WARNING; 3:Filter out INFO, WARNING, and ERROR

import os.path as osp
import tensorlayerx as tlx
from gammagl.datasets import AMiner
Expand Down
5 changes: 4 additions & 1 deletion examples/herec/herec_trainer_imdb_dblp.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import argparse
import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
# os.environ['TL_BACKEND'] = 'torch'
os.environ['TL_BACKEND'] = 'torch'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0:Output all; 1:Filter out INFO; 2:Filter out INFO and WARNING; 3:Filter out INFO, WARNING, and ERROR

import os.path as osp
import tensorlayerx as tlx
from gammagl.datasets import IMDB, DBLP
Expand Down
5 changes: 4 additions & 1 deletion examples/hetero_rgcn/rgcn_trainer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
# os.environ['TL_BACKEND'] = 'torch'
os.environ['TL_BACKEND'] = 'torch'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0:Output all; 1:Filter out INFO; 2:Filter out INFO and WARNING; 3:Filter out INFO, WARNING, and ERROR

from gammagl.datasets.alircd import AliRCD
import argparse
import tensorlayerx as tlx
Expand Down
Loading