forked from BUPT-GAMMA/OpenHGNN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
21 lines (18 loc) · 1.07 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# @Time : 2021/1/28
# @Author : Tianyu Zhao
# @Email : [email protected]
import argparse
from openhgnn.experiment import Experiment
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--model', '-m', default='RGCN', type=str, help='name of models')
parser.add_argument('--task', '-t', default='node_classification', type=str, help='name of task')
# link_prediction / node_classification
parser.add_argument('--dataset', '-d', default='acm4GTN', type=str, help='name of datasets')
parser.add_argument('--gpu', '-g', default='-1', type=int, help='-1 means cpu')
parser.add_argument('--use_best_config', action='store_true', help='will load utils.best_config')
parser.add_argument('--load_from_pretrained', action='store_true', help='load model from the checkpoint')
args = parser.parse_args()
experiment = Experiment(model=args.model, dataset=args.dataset, task=args.task, gpu=args.gpu,
use_best_config=args.use_best_config, load_from_pretrained=args.load_from_pretrained)
experiment.run()