forked from LQlq123/FairCRS
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun_crslab.py
35 lines (30 loc) · 1.69 KB
/
run_crslab.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
import argparse
import warnings
from crslab.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='1',
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 crslab.quick_start import run_crslab
run_crslab(config, args.save_data, args.restore_data, args.save_system, args.restore_system, args.interact,
args.debug, args.tensorboard)