-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_bias_crs.py
44 lines (37 loc) · 1.91 KB
/
run_bias_crs.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# @Time : 2020/11/22
# @Author : Kun Zhou
# @Email : [email protected]
# UPDATE:
# @Time : 2020/11/24, 2021/1/9
# @Author : Kun Zhou, Xiaolei Wang
# @Email : [email protected], [email protected]
import argparse
import warnings
from bias_crs.config import Config
warnings.filterwarnings('ignore')
if __name__ == '__main__':
# parse args
parser = argparse.ArgumentParser()
parser.add_argument('-c', '--config', type=str,
default='config/crs/tgredial/tgredial.yaml', help='config file(yaml) path')
parser.add_argument('-g', '--gpu', type=str, default='0',
help='specify GPU id(s) to use, we now support multiple GPUs. Defaults to GPU(0).')
parser.add_argument('-sd', '--save_data', action='store_true',
help='save processed dataset')
parser.add_argument('-rd', '--restore_data', action='store_true',
help='restore processed dataset')
parser.add_argument('-ss', '--save_system', action='store_true',
help='save trained system')
parser.add_argument('-rs', '--restore_system', action='store_true',
help='restore trained system')
parser.add_argument('-d', '--debug', action='store_true',
help='use valid dataset to debug your system')
parser.add_argument('-i', '--interact', action='store_true',
help='interact with your system instead of training')
parser.add_argument('-tb', '--tensorboard', action='store_true',
help='enable tensorboard to monitor train performance')
args, _ = parser.parse_known_args()
config = Config(args.config, args.gpu, args.debug)
from bias_crs.quick_start import run_bias_crs
run_bias_crs(config, args.save_data, args.restore_data, args.save_system, args.restore_system, args.interact,
args.debug, args.tensorboard)