-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcruncher-cl.py
More file actions
31 lines (22 loc) · 993 Bytes
/
Copy pathcruncher-cl.py
File metadata and controls
31 lines (22 loc) · 993 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 sys
import argparse
from cruncher.cruncher import Cruncher
# Sample command line execution:
# python3.6 cruncher-cl.py --confdir "cruncher_conf/experiment_metrics_step_up/"
# comment: on my laptop it needs to be invoked with python without version at the end
parser = argparse.ArgumentParser(description = 'Running the experiments for alternative configurations.')
parser.add_argument('--confdir', dest = 'config_dir',
action = 'store', default = None,
help = 'directory with the configuration files for the experiments')
parser.add_argument('--datadir', dest = 'data_dir',
action = 'store', default = None,
help = 'directory with the data to visualize')
args = parser.parse_args()
if args.config_dir is None:
sys.exit('No configuration directory specified.')
c = Cruncher(args.config_dir)
if args.data_dir is None:
c.run_experiment()
else:
c.set_data_dir(args.data_dir)
c.visualize()