@borg.annotations(
    out_path = ("results output path"),
    portfolio_name = ("name of the portfolio to train"),
    train_bundle = ("path to pre-recorded runs", "positional", None, os.path.abspath),
    test_bundle = ("path to pre-recorded runs", "positional", None, os.path.abspath),
    single = ("run a single solver", "option"),
    workers = ("submit jobs?", "option", "w", int),
    local = ("workers are local?", "flag"),
    )
def main(
    out_path,
    portfolio_name,
    train_bundle,
    test_bundle,
    single = None,
    workers = 0,
    local = False,
    ):

    # generate jobs
    def yield_runs():
        train_data = borg.storage.RunData.from_bundle(train_bundle)
        test_data = borg.storage.RunData.from_bundle(test_bundle)

        if portfolio_name == "-":
            if single is None:
                makers = map(SolverMaker, train_data.solver_names)
            else:
                makers = map(SolverMaker, [single])
        else:
            makers = [PortfolioMaker(portfolio_name)]

        for maker in makers:
            for _ in xrange(4):
                yield (simulate_split, [maker, train_data, test_data])

    # and run them
    with open(out_path, "w") as out_file:
        writer = csv.writer(out_file)

        writer.writerow(["path", "solver", "budget", "cost", "success", "answer", "split"])

        condor.do(yield_runs(), workers, lambda _, r: writer.writerows(r), local)
Called when the user inputs text in this panel to
dataset/ETHPy150Open borg-project/borg/borg/tools/simulate.py/main--crossover with--dataset/ETHPy150Open williballenthin/INDXParse/MFTView.py/DiskGeometryWarningPanel._volume_offset_changed