Ejemplo n.º 1
0
def runscript():

    parser = argparse.ArgumentParser()
    for arg in arguments:
        parser.add_argument(*arg['flags'], **arg['parameters'])

    run_args = parser.parse_args()

    lab = Laboratory(run_args.model_type, run_args.config_path,
                     run_args.lab_path)
    expt = Experiment(lab, reproduce=run_args.reproduce, force=run_args.force)

    n_runs_per_submit = expt.config.get('runspersub', 1)
    subrun = 1

    while True:

        print('nruns: {0} nruns_per_submit: {1} subrun: {2}'
              ''.format(expt.n_runs, n_runs_per_submit, subrun))

        expt.setup()
        expt.run()
        expt.archive()

        # Finished runs
        if expt.n_runs == 0:
            break

        # Need to manually increment the run counter if still looping
        if n_runs_per_submit > 1 and subrun < n_runs_per_submit:
            expt.counter += 1
            # Re-initialize manifest: important to clear out restart manifest
            # note no attempt to preserve reproduce flag, it makes no sense
            # to on subsequent runs
            expt.manifest = Manifest(expt.config.get('manifest', {}),
                                     reproduce=False)
            expt.set_output_paths()
            # Does not make sense to reproduce a multiple run.
            # Take care of this with argument processing?
            expt.reproduce = False
        else:
            break

        subrun += 1

    if expt.n_runs > 0:
        expt.resubmit()
Ejemplo n.º 2
0
def runscript():

    parser = argparse.ArgumentParser()
    for arg in arguments:
        parser.add_argument(*arg['flags'], **arg['parameters'])

    run_args = parser.parse_args()

    lab = Laboratory(run_args.model_type, run_args.config_path,
                     run_args.lab_path)
    expt = Experiment(lab)

    expt.setup()
    expt.run()
    expt.archive()

    if expt.n_runs > 0:
        expt.resubmit()
Ejemplo n.º 3
0
def runscript():

    parser = argparse.ArgumentParser()
    for arg in arguments:
        parser.add_argument(*arg['flags'], **arg['parameters'])

    run_args = parser.parse_args()

    lab = Laboratory(run_args.model_type, run_args.config_path,
                     run_args.lab_path)
    expt = Experiment(lab)

    expt.setup()
    expt.run()
    expt.archive()

    if expt.n_runs > 0:
        expt.resubmit()
Ejemplo n.º 4
0
def runscript():

    parser = argparse.ArgumentParser()
    for arg in arguments:
        parser.add_argument(*arg['flags'], **arg['parameters'])

    run_args = parser.parse_args()

    lab = Laboratory(run_args.model_type, run_args.config_path,
                     run_args.lab_path)
    expt = Experiment(lab, reproduce=run_args.reproduce)

    n_runs_per_submit = expt.config.get('runspersub', 1)
    subrun = 1

    while True:

        print('nruns: {0} nruns_per_submit: {1} subrun: {2}'
              ''.format(expt.n_runs, n_runs_per_submit, subrun))

        expt.setup()
        expt.run()
        expt.archive()

        # Finished runs
        if expt.n_runs == 0:
            break

        # Need to manually increment the run counter if still looping
        if n_runs_per_submit > 1 and subrun < n_runs_per_submit:
            expt.counter += 1
            expt.set_output_paths()
            # Does not make sense to reproduce a multiple run. Take care of
            # this with argument processing?
            expt.reproduce = False
        else:
            break

        subrun += 1

    if expt.n_runs > 0:
        expt.resubmit()
Ejemplo n.º 5
0
def runscript():

    parser = argparse.ArgumentParser()
    for arg in arguments:
        parser.add_argument(*arg['flags'], **arg['parameters'])

    run_args = parser.parse_args()

    lab = Laboratory(run_args.model_type, run_args.config_path,
                     run_args.lab_path)
    expt = Experiment(lab)

    expt.setup()

    n_runs_per_submit = expt.config.get('runspersub', 1)

    subrun = 1

    while subrun <= n_runs_per_submit and expt.n_runs > 0:

        print('nruns: {0} nruns_per_submit: {1} subrun: {2}'
              ''.format(expt.n_runs, n_runs_per_submit, subrun))

        expt.setup()
        expt.run()
        expt.archive()

        # Need to manually increment the run counter if still looping
        if n_runs_per_submit > 1 and subrun < n_runs_per_submit:
            expt.counter += 1
            expt.set_output_paths()

        subrun += 1

    if expt.n_runs > 0:
        expt.resubmit()
Ejemplo n.º 6
0
def runscript():

    parser = argparse.ArgumentParser()
    for arg in arguments:
        parser.add_argument(*arg['flags'], **arg['parameters'])

    run_args = parser.parse_args()

    lab = Laboratory(run_args.model_type, run_args.config_path,
                     run_args.lab_path)
    expt = Experiment(lab)

    expt.setup()

    n_runs_per_submit = expt.config.get('runspersub', 1)

    subrun = 1

    while subrun <= n_runs_per_submit and expt.n_runs > 0:

        print('nruns: {} nruns_per_submit: {} subrun: {}'
              ''.format(expt.n_runs, n_runs_per_submit, subrun))

        expt.setup()
        expt.run()
        expt.archive()

        # Need to manually increment the run counter if still looping
        if n_runs_per_submit > 1 and subrun < n_runs_per_submit:
            expt.counter += 1
            expt.set_output_paths()

        subrun += 1

    if expt.n_runs > 0:
        expt.resubmit()