예제 #1
0
def main(args):
    # Get configuration values
    config = copy.deepcopy(CONFIGS[args.name])

    # Merge configuration with command line arguments
    config.update(vars(args))

    config = process_args(args, config)
    if config is None:
        # This may return when a sigopt experiment is created.
        print("Nothing to run (config=None).")
        return

    for trial in create_trials(config):
        run_trial(trial)
예제 #2
0
from nupic.research.frameworks.vernon.run_with_raytune import run

if __name__ == "__main__":
    parser = argparse.ArgumentParser(parents=DEFAULT_PARSERS)
    parser.add_argument(
        "-e",
        "--experiment",
        dest="name",
        default="default_base",
        help="Experiment to run",
        choices=CONFIGS.keys(),
    )

    args = parser.parse_args()
    if args.name is None:
        parser.print_help()
        exit(1)

    # Get configuration values
    config = copy.deepcopy(CONFIGS[args.name])

    # Merge configuration with command line arguments
    config.update(vars(args))

    # Process args and modify config appropriately.
    config = process_args(args, config)
    if config is None:
        pass
    else:
        run(config)