if args.extra_label_str is not None:
        label += '-' + args.extra_label_str
    if args.bak:
        label += '.bak'

    print 'run', human
    n_leaves, mut_mult = None, None  # values if we're runing on data
    for action in args.actions:
        if action == 'write-plots' or action == 'compare-subsets':
            continue
        print ' ', action
        if action == 'cache-data-parameters':
            compareutils.execute(args, action, datafname, label, n_leaves, mut_mult, procs)
            continue
        for n_leaves in args.n_leaf_list:
            print '    ----> ', n_leaves, ' leaves'
            for mut_mult in args.mutation_multipliers:
                print '        ----> mutate', mut_mult
                compareutils.execute(args, action, datafname, label, n_leaves, mut_mult, procs)
                # sys.exit()

    if 'write-plots' in args.actions:
        compareutils.write_all_plot_csvs(args, label)
    if 'compare-subsets' in args.actions:
        compareutils.compare_all_subsets(args, label)

    # break

exit_codes = [p.wait() for p in procs]
print 'exit ', exit_codes
            ]
        else:
            parameterlist = [
                {"n_leaves": nl, "mut_mult": mm, "hfrac_bounds": hbs}
                for nl in args.n_leaf_list
                for mm in args.mutation_multipliers
                for hbs in args.hfrac_bound_list
            ]

    for action in args.actions:
        if action == "write-plots" or action == "compare-subsets":
            continue
        print " ", action
        if action == "cache-parameters" and not args.is_simu:
            compareutils.execute(args, action, datafname, label, n_leaves, mut_mult, procs)
            continue

        for params in parameterlist:
            compareutils.execute(
                args, action, datafname, label, params["n_leaves"], params["mut_mult"], procs, params["hfrac_bounds"]
            )

    if "write-plots" in args.actions:
        compareutils.write_all_plot_csvs(args, label, parameterlist, datafname)
    if "compare-subsets" in args.actions:
        compareutils.compare_subsets(args, label)

if len(procs) > 0:
    exit_codes = [p.wait() for p in procs]
    print "exit ", exit_codes
Exemple #3
0
        else:
            parameterlist = [{
                'n_leaves': nl,
                'mut_mult': mm,
                'hfrac_bounds': hbs
            } for nl in args.n_leaf_list for mm in args.mutation_multipliers
                             for hbs in args.hfrac_bound_list]

    for action in args.actions:
        if action == 'write-plots' or action == 'compare-subsets':
            continue
        print ' ', action
        if action == 'cache-parameters' and not args.is_simu:
            compareutils.execute(args, action, datafname, label, n_leaves,
                                 mut_mult, procs)
            continue

        for params in parameterlist:
            compareutils.execute(args, action, datafname, label,
                                 params['n_leaves'], params['mut_mult'], procs,
                                 params['hfrac_bounds'])

    if 'write-plots' in args.actions:
        compareutils.write_all_plot_csvs(args, label, parameterlist, datafname)
    if 'compare-subsets' in args.actions:
        compareutils.compare_subsets(args, label)

if len(procs) > 0:
    exit_codes = [p.wait() for p in procs]
    print 'exit ', exit_codes