-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_predictor.py
More file actions
31 lines (26 loc) · 873 Bytes
/
run_predictor.py
File metadata and controls
31 lines (26 loc) · 873 Bytes
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
import argparse
import logging as logger
from src import *
from src.runs.predictor import run_predictor
from src.utils.config import Config
if __name__ != '__main__':
exit(0)
parser = argparse.ArgumentParser(description='Arguments for evaluation.')
parser.add_argument('--log_to_file',
default=None,
type=none_or_str,
action='store')
parser.add_argument('--model_ckpt',
default=None,
type=none_or_str,
action='store')
parser.add_argument('--dataset',
type=str,
action='store')
parser.add_argument('--device',
type=str,
action='store')
args = parser.parse_args()
setup_logger(logger, args.log_to_file)
config = Config(**args.__dict__)
run_predictor(logger, config)