-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun_eval.py
More file actions
23 lines (20 loc) · 736 Bytes
/
run_eval.py
File metadata and controls
23 lines (20 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import os
import sys
if os.path.abspath('..') not in sys.path:
sys.path.append(os.path.abspath('..'))
from config import cli
from dataset import *
from evaluation import Evaluator, PropertyEvaluator
if __name__ == '__main__':
args = cli(standalone_mode=False)
data = get_dataset(args.dataset, args, load_path=args.load_path)
if args.eval_whole:
evaluator = Evaluator(args)
evaluator.MIA_evaluate(data, reduced=False, model_type='GCN')
else:
if args.attack is not None:
args.reduced = False
data = attack(data, args)
args.save_path = f'checkpoints'
evaluator = Evaluator(args)
evaluator.MIA_evaluate(data, reduced=True, model_type='GCN')