예제 #1
0
abspath = os.path.abspath(__file__)
dname = os.path.dirname(abspath)
os.chdir(dname)
dirs = parse_path_comb(args.dirs)

labels = args.labels.split(',')
datasets = args.datasets.split(',')

lines_by_metrics = dict()

label_idx = 0

if args.x_select is None:
    x_select = None
else:
    x_select = parse_x_select(args.x_select)
for label, dir in zip(labels, dirs):
    dir_contents = parse_1_line_dir(dir)
    for metric, metric_data in dir_contents.items():
        if metric not in lines_by_metrics:
            lines_by_metrics[metric] = dict()
        datasets_present = keys_from_list_in_dict(metric_data, datasets)
        if len(datasets_present) > 1:
            for dataset in datasets_present:
                lines_by_metrics[metric][label + '_' + dataset] = select_by_x(
                    extract_line_from_file(metric_data[dataset]), x_select)
        else:
            lines_by_metrics[metric][label] = select_by_x(
                extract_line_from_file(metric_data[datasets_present[0]]),
                x_select)
style = dict(
예제 #2
0
    default=None,
)
parser.add_argument(
    '-lst',
    '--line_select',
    help=
    "select line hyper parameter values. Format: '<value1>,<value2>,...'. Default is None",
    default=None,
)
args = parser.parse_args()

select = dict()
if args.x_select is None:
    select['x_select'] = None
else:
    select['x_select'] = parse_x_select(args.x_select)
if args.line_select is None:
    select['line_select'] = None
else:
    select['line_select'] = parse_line_select(args.line_select)

style = dict(
    no_line=args.no_line,
    error=args.error,
    marker=args.marker,
)

eval_dirs = parse_path_comb(args.eval_dir)
metric_scales = parse_metric_scales_str(args.metric_scales)

hp_plot_order = args.hp_order.split(',')