Skip to content

Commit

Permalink
update name tgb_modules to modules and update all imports to prepare …
Browse files Browse the repository at this point in the history
…for merge in original tgb
  • Loading branch information
JuliaGast committed Jun 21, 2024
1 parent e3737f6 commit c2fefde
Show file tree
Hide file tree
Showing 81 changed files with 347 additions and 347 deletions.
14 changes: 7 additions & 7 deletions examples/linkproppred/tgbl-coin/dyrep.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
# internal imports
from tgb.utils.utils import get_args, set_random_seed, save_results
from tgb.linkproppred.evaluate import Evaluator
from tgb_modules.decoder import LinkPredictor
from tgb_modules.emb_module import GraphAttentionEmbedding
from tgb_modules.msg_func import IdentityMessage
from tgb_modules.msg_agg import LastAggregator
from tgb_modules.neighbor_loader import LastNeighborLoader
from tgb_modules.memory_module import DyRepMemory
from tgb_modules.early_stopping import EarlyStopMonitor
from modules.decoder import LinkPredictor
from modules.emb_module import GraphAttentionEmbedding
from modules.msg_func import IdentityMessage
from modules.msg_agg import LastAggregator
from modules.neighbor_loader import LastNeighborLoader
from modules.memory_module import DyRepMemory
from modules.early_stopping import EarlyStopMonitor
from tgb.linkproppred.dataset_pyg import PyGLinkPropPredDataset


Expand Down
2 changes: 1 addition & 1 deletion examples/linkproppred/tgbl-coin/edgebank.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

# internal imports
from tgb.linkproppred.evaluate import Evaluator
from tgb_modules.edgebank_predictor import EdgeBankPredictor
from modules.edgebank_predictor import EdgeBankPredictor
from tgb.utils.utils import set_random_seed
from tgb.linkproppred.dataset import LinkPropPredDataset
from tgb.utils.utils import save_results
Expand Down
14 changes: 7 additions & 7 deletions examples/linkproppred/tgbl-coin/tgn.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
# internal imports
from tgb.utils.utils import get_args, set_random_seed, save_results
from tgb.linkproppred.evaluate import Evaluator
from tgb_modules.decoder import LinkPredictor
from tgb_modules.emb_module import GraphAttentionEmbedding
from tgb_modules.msg_func import IdentityMessage
from tgb_modules.msg_agg import LastAggregator
from tgb_modules.neighbor_loader import LastNeighborLoader
from tgb_modules.memory_module import TGNMemory
from tgb_modules.early_stopping import EarlyStopMonitor
from modules.decoder import LinkPredictor
from modules.emb_module import GraphAttentionEmbedding
from modules.msg_func import IdentityMessage
from modules.msg_agg import LastAggregator
from modules.neighbor_loader import LastNeighborLoader
from modules.memory_module import TGNMemory
from modules.early_stopping import EarlyStopMonitor
from tgb.linkproppred.dataset_pyg import PyGLinkPropPredDataset


Expand Down
14 changes: 7 additions & 7 deletions examples/linkproppred/tgbl-comment/dyrep.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
# internal imports
from tgb.utils.utils import get_args, set_random_seed, save_results
from tgb.linkproppred.evaluate import Evaluator
from tgb_modules.decoder import LinkPredictor
from tgb_modules.emb_module import GraphAttentionEmbedding
from tgb_modules.msg_func import IdentityMessage
from tgb_modules.msg_agg import LastAggregator
from tgb_modules.neighbor_loader import LastNeighborLoader
from tgb_modules.memory_module import DyRepMemory
from tgb_modules.early_stopping import EarlyStopMonitor
from modules.decoder import LinkPredictor
from modules.emb_module import GraphAttentionEmbedding
from modules.msg_func import IdentityMessage
from modules.msg_agg import LastAggregator
from modules.neighbor_loader import LastNeighborLoader
from modules.memory_module import DyRepMemory
from modules.early_stopping import EarlyStopMonitor
from tgb.linkproppred.dataset_pyg import PyGLinkPropPredDataset


Expand Down
2 changes: 1 addition & 1 deletion examples/linkproppred/tgbl-comment/edgebank.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

# internal imports
from tgb.linkproppred.evaluate import Evaluator
from tgb_modules.edgebank_predictor import EdgeBankPredictor
from modules.edgebank_predictor import EdgeBankPredictor
from tgb.utils.utils import set_random_seed
from tgb.linkproppred.dataset import LinkPropPredDataset
from tgb.utils.utils import save_results
Expand Down
14 changes: 7 additions & 7 deletions examples/linkproppred/tgbl-comment/tgn.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
# internal imports
from tgb.utils.utils import get_args, set_random_seed, save_results
from tgb.linkproppred.evaluate import Evaluator
from tgb_modules.decoder import LinkPredictor
from tgb_modules.emb_module import GraphAttentionEmbedding
from tgb_modules.msg_func import IdentityMessage
from tgb_modules.msg_agg import LastAggregator
from tgb_modules.neighbor_loader import LastNeighborLoader
from tgb_modules.memory_module import TGNMemory
from tgb_modules.early_stopping import EarlyStopMonitor
from modules.decoder import LinkPredictor
from modules.emb_module import GraphAttentionEmbedding
from modules.msg_func import IdentityMessage
from modules.msg_agg import LastAggregator
from modules.neighbor_loader import LastNeighborLoader
from modules.memory_module import TGNMemory
from modules.early_stopping import EarlyStopMonitor
from tgb.linkproppred.dataset_pyg import PyGLinkPropPredDataset


Expand Down
14 changes: 7 additions & 7 deletions examples/linkproppred/tgbl-flight/dyrep.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
# internal imports
from tgb.utils.utils import get_args, set_random_seed, save_results
from tgb.linkproppred.evaluate import Evaluator
from tgb_modules.decoder import LinkPredictor
from tgb_modules.emb_module import GraphAttentionEmbedding
from tgb_modules.msg_func import IdentityMessage
from tgb_modules.msg_agg import LastAggregator
from tgb_modules.neighbor_loader import LastNeighborLoader
from tgb_modules.memory_module import DyRepMemory
from tgb_modules.early_stopping import EarlyStopMonitor
from modules.decoder import LinkPredictor
from modules.emb_module import GraphAttentionEmbedding
from modules.msg_func import IdentityMessage
from modules.msg_agg import LastAggregator
from modules.neighbor_loader import LastNeighborLoader
from modules.memory_module import DyRepMemory
from modules.early_stopping import EarlyStopMonitor
from tgb.linkproppred.dataset_pyg import PyGLinkPropPredDataset


Expand Down
2 changes: 1 addition & 1 deletion examples/linkproppred/tgbl-flight/edgebank.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

# internal imports
from tgb.linkproppred.evaluate import Evaluator
from tgb_modules.edgebank_predictor import EdgeBankPredictor
from modules.edgebank_predictor import EdgeBankPredictor
from tgb.utils.utils import set_random_seed
from tgb.linkproppred.dataset import LinkPropPredDataset
from tgb.utils.utils import save_results
Expand Down
14 changes: 7 additions & 7 deletions examples/linkproppred/tgbl-flight/tgn.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
# internal imports
from tgb.utils.utils import get_args, set_random_seed, save_results
from tgb.linkproppred.evaluate import Evaluator
from tgb_modules.decoder import LinkPredictor
from tgb_modules.emb_module import GraphAttentionEmbedding
from tgb_modules.msg_func import IdentityMessage
from tgb_modules.msg_agg import LastAggregator
from tgb_modules.neighbor_loader import LastNeighborLoader
from tgb_modules.memory_module import TGNMemory
from tgb_modules.early_stopping import EarlyStopMonitor
from modules.decoder import LinkPredictor
from modules.emb_module import GraphAttentionEmbedding
from modules.msg_func import IdentityMessage
from modules.msg_agg import LastAggregator
from modules.neighbor_loader import LastNeighborLoader
from modules.memory_module import TGNMemory
from modules.early_stopping import EarlyStopMonitor
from tgb.linkproppred.dataset_pyg import PyGLinkPropPredDataset


Expand Down
14 changes: 7 additions & 7 deletions examples/linkproppred/tgbl-review/dyrep.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
# internal imports
from tgb.utils.utils import get_args, set_random_seed, save_results
from tgb.linkproppred.evaluate import Evaluator
from tgb_modules.decoder import LinkPredictor
from tgb_modules.emb_module import GraphAttentionEmbedding
from tgb_modules.msg_func import IdentityMessage
from tgb_modules.msg_agg import LastAggregator
from tgb_modules.neighbor_loader import LastNeighborLoader
from tgb_modules.memory_module import DyRepMemory
from tgb_modules.early_stopping import EarlyStopMonitor
from modules.decoder import LinkPredictor
from modules.emb_module import GraphAttentionEmbedding
from modules.msg_func import IdentityMessage
from modules.msg_agg import LastAggregator
from modules.neighbor_loader import LastNeighborLoader
from modules.memory_module import DyRepMemory
from modules.early_stopping import EarlyStopMonitor
from tgb.linkproppred.dataset_pyg import PyGLinkPropPredDataset


Expand Down
2 changes: 1 addition & 1 deletion examples/linkproppred/tgbl-review/edgebank.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

# internal imports
from tgb.linkproppred.evaluate import Evaluator
from tgb_modules.edgebank_predictor import EdgeBankPredictor
from modules.edgebank_predictor import EdgeBankPredictor
from tgb.utils.utils import set_random_seed
from tgb.linkproppred.dataset import LinkPropPredDataset
from tgb.utils.utils import save_results
Expand Down
14 changes: 7 additions & 7 deletions examples/linkproppred/tgbl-review/tgn.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
# internal imports
from tgb.utils.utils import get_args, set_random_seed, save_results
from tgb.linkproppred.evaluate import Evaluator
from tgb_modules.decoder import LinkPredictor
from tgb_modules.emb_module import GraphAttentionEmbedding
from tgb_modules.msg_func import IdentityMessage
from tgb_modules.msg_agg import LastAggregator
from tgb_modules.neighbor_loader import LastNeighborLoader
from tgb_modules.memory_module import TGNMemory
from tgb_modules.early_stopping import EarlyStopMonitor
from modules.decoder import LinkPredictor
from modules.emb_module import GraphAttentionEmbedding
from modules.msg_func import IdentityMessage
from modules.msg_agg import LastAggregator
from modules.neighbor_loader import LastNeighborLoader
from modules.memory_module import TGNMemory
from modules.early_stopping import EarlyStopMonitor
from tgb.linkproppred.dataset_pyg import PyGLinkPropPredDataset


Expand Down
14 changes: 7 additions & 7 deletions examples/linkproppred/tgbl-wiki/dyrep.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
# internal imports
from tgb.utils.utils import get_args, set_random_seed, save_results
from tgb.linkproppred.evaluate import Evaluator
from tgb_modules.decoder import LinkPredictor
from tgb_modules.emb_module import GraphAttentionEmbedding
from tgb_modules.msg_func import IdentityMessage
from tgb_modules.msg_agg import LastAggregator
from tgb_modules.neighbor_loader import LastNeighborLoader
from tgb_modules.memory_module import DyRepMemory
from tgb_modules.early_stopping import EarlyStopMonitor
from modules.decoder import LinkPredictor
from modules.emb_module import GraphAttentionEmbedding
from modules.msg_func import IdentityMessage
from modules.msg_agg import LastAggregator
from modules.neighbor_loader import LastNeighborLoader
from modules.memory_module import DyRepMemory
from modules.early_stopping import EarlyStopMonitor
from tgb.linkproppred.dataset_pyg import PyGLinkPropPredDataset


Expand Down
2 changes: 1 addition & 1 deletion examples/linkproppred/tgbl-wiki/edgebank.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

# internal imports
from tgb.linkproppred.evaluate import Evaluator
from tgb_modules.edgebank_predictor import EdgeBankPredictor
from modules.edgebank_predictor import EdgeBankPredictor
from tgb.utils.utils import set_random_seed
from tgb.linkproppred.dataset import LinkPropPredDataset
from tgb.utils.utils import save_results
Expand Down
14 changes: 7 additions & 7 deletions examples/linkproppred/tgbl-wiki/tgn.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
# internal imports
from tgb.utils.utils import get_args, set_random_seed, save_results
from tgb.linkproppred.evaluate import Evaluator
from tgb_modules.decoder import LinkPredictor
from tgb_modules.emb_module import GraphAttentionEmbedding
from tgb_modules.msg_func import IdentityMessage
from tgb_modules.msg_agg import LastAggregator
from tgb_modules.neighbor_loader import LastNeighborLoader
from tgb_modules.memory_module import TGNMemory
from tgb_modules.early_stopping import EarlyStopMonitor
from modules.decoder import LinkPredictor
from modules.emb_module import GraphAttentionEmbedding
from modules.msg_func import IdentityMessage
from modules.msg_agg import LastAggregator
from modules.neighbor_loader import LastNeighborLoader
from modules.memory_module import TGNMemory
from modules.early_stopping import EarlyStopMonitor
from tgb.linkproppred.dataset_pyg import PyGLinkPropPredDataset


Expand Down
14 changes: 7 additions & 7 deletions examples/linkproppred/tgbl-wiki/tgn_mem.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
# internal imports
from tgb.utils.utils import get_args, set_random_seed, save_results
from tgb.linkproppred.evaluate import Evaluator
from tgb_modules.decoder import LinkPredictor
from tgb_modules.emb_module import GraphAttentionEmbedding
from tgb_modules.msg_func import IdentityMessage
from tgb_modules.msg_agg import LastAggregator
from tgb_modules.neighbor_loader import LastNeighborLoader
from tgb_modules.memory_module import TGNMemory
from tgb_modules.early_stopping import EarlyStopMonitor
from modules.decoder import LinkPredictor
from modules.emb_module import GraphAttentionEmbedding
from modules.msg_func import IdentityMessage
from modules.msg_agg import LastAggregator
from modules.neighbor_loader import LastNeighborLoader
from modules.memory_module import TGNMemory
from modules.early_stopping import EarlyStopMonitor
from tgb.linkproppred.dataset_pyg import PyGLinkPropPredDataset


Expand Down
6 changes: 3 additions & 3 deletions examples/linkproppred/thgl-forum/edgebank.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
import argparse

# internal imports
tgb_modules_path = osp.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
sys.path.append(tgb_modules_path)
modules_path = osp.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
sys.path.append(modules_path)
from tgb.linkproppred.evaluate import Evaluator
from tgb_modules.edgebank_predictor import EdgeBankPredictor
from modules.edgebank_predictor import EdgeBankPredictor
from tgb.utils.utils import set_random_seed
from tgb.linkproppred.dataset import LinkPropPredDataset
from tgb.utils.utils import save_results
Expand Down
8 changes: 4 additions & 4 deletions examples/linkproppred/thgl-forum/recurrencybaseline.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
import os.path as osp
import json
#internal imports
tgb_modules_path = osp.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
sys.path.append(tgb_modules_path)
from tgb_modules.recurrencybaseline_predictor import baseline_predict, baseline_predict_remote
modules_path = osp.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
sys.path.append(modules_path)
from modules.recurrencybaseline_predictor import baseline_predict, baseline_predict_remote
from tgb.linkproppred.evaluate import Evaluator
from tgb.linkproppred.dataset import LinkPropPredDataset
from tgb.utils.utils import set_random_seed, save_results
from tgb_modules.tkg_utils import create_basis_dict, group_by, reformat_ts
from modules.tkg_utils import create_basis_dict, group_by, reformat_ts

def predict(num_processes, data_c_rel, all_data_c_rel, alpha, lmbda_psi,
perf_list_all, hits_list_all, window, neg_sampler, split_mode):
Expand Down
8 changes: 4 additions & 4 deletions examples/linkproppred/thgl-forum/sthn.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from tgb.linkproppred.evaluate import Evaluator

import argparse
from tgb_modules.sthn import set_seed, pre_compute_subgraphs, get_inputs_for_ind, check_data_leakage
from modules.sthn import set_seed, pre_compute_subgraphs, get_inputs_for_ind, check_data_leakage
import torch
import pandas as pd
import itertools
Expand Down Expand Up @@ -128,10 +128,10 @@ def load_model(args):
}
if args.model == 'sthn':
if args.predict_class:
from tgb_modules.sthn import Multiclass_Interface as STHN_Interface
from modules.sthn import Multiclass_Interface as STHN_Interface
else:
from tgb_modules.sthn import STHN_Interface
from tgb_modules.sthn import link_pred_train
from modules.sthn import STHN_Interface
from modules.sthn import link_pred_train

mixer_configs = {
'per_graph_size' : args.max_edges,
Expand Down
14 changes: 7 additions & 7 deletions examples/linkproppred/thgl-forum/tgn.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
# internal imports
from tgb.utils.utils import get_args, set_random_seed, save_results
from tgb.linkproppred.evaluate import Evaluator
from tgb_modules.decoder import LinkPredictor
from tgb_modules.emb_module import GraphAttentionEmbedding
from tgb_modules.msg_func import IdentityMessage
from tgb_modules.msg_agg import LastAggregator
from tgb_modules.neighbor_loader import LastNeighborLoader
from tgb_modules.memory_module import TGNMemory
from tgb_modules.early_stopping import EarlyStopMonitor
from modules.decoder import LinkPredictor
from modules.emb_module import GraphAttentionEmbedding
from modules.msg_func import IdentityMessage
from modules.msg_agg import LastAggregator
from modules.neighbor_loader import LastNeighborLoader
from modules.memory_module import TGNMemory
from modules.early_stopping import EarlyStopMonitor
from tgb.linkproppred.dataset_pyg import PyGLinkPropPredDataset


Expand Down
6 changes: 3 additions & 3 deletions examples/linkproppred/thgl-github/edgebank.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
import argparse

# internal imports
tgb_modules_path = osp.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
sys.path.append(tgb_modules_path)
modules_path = osp.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
sys.path.append(modules_path)
from tgb.linkproppred.evaluate import Evaluator
from tgb_modules.edgebank_predictor import EdgeBankPredictor
from modules.edgebank_predictor import EdgeBankPredictor
from tgb.utils.utils import set_random_seed
from tgb.linkproppred.dataset import LinkPropPredDataset
from tgb.utils.utils import save_results
Expand Down
8 changes: 4 additions & 4 deletions examples/linkproppred/thgl-github/recurrencybaseline.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
import os.path as osp
import json
#internal imports
tgb_modules_path = osp.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
sys.path.append(tgb_modules_path)
from tgb_modules.recurrencybaseline_predictor import baseline_predict, baseline_predict_remote
modules_path = osp.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
sys.path.append(modules_path)
from modules.recurrencybaseline_predictor import baseline_predict, baseline_predict_remote
from tgb.linkproppred.evaluate import Evaluator
from tgb.linkproppred.dataset import LinkPropPredDataset
from tgb.utils.utils import set_random_seed, save_results
from tgb_modules.tkg_utils import create_basis_dict, group_by, reformat_ts
from modules.tkg_utils import create_basis_dict, group_by, reformat_ts

def predict(num_processes, data_c_rel, all_data_c_rel, alpha, lmbda_psi,
perf_list_all, hits_list_all, window, neg_sampler, split_mode):
Expand Down
Loading

0 comments on commit c2fefde

Please sign in to comment.