def run_test(cfile): """ Runs a configuration file """ config = load_config_file(f"../TestConfigs/{cfile}.json", id=True) # print(config) dispatch = TrainDispatch() runconfig = RunConfig(impl=1, verbose=True, tboard=False, best=True, early=True, multi=1, proxy=False, save=False, remote=False, info=True, log=False) train_process, architecture = dispatch.dispatch(config['arch']['mode']) lresults = train_process(architecture, config, runconfig) print(lresults)
verbose = 1 if args.verbose else 0 impl = 2 if args.gpu else 1 if args.config is None: config = getconfig(proxy=args.proxy, mode=args.exp, secpat=args.secpat) elif args.mino: config = load_config_file(args.config, id=False, mino=True) else: config = load_config_file(args.config, id=True) run_config = RunConfig(impl, verbose, args.tboard, args.best, args.early, args.multi, args.proxy, args.save, args.remote, args.info, args.log) dispatch = TrainDispatch() if config is not None: ############################################ # Data if not 'site' in config: site = config['data']['datanames'][0].split('-') config['site'] = f"{site[0]}-{site[1]}" # try: print( f"Running job {config['_id']} {config['site']} {config['arch']['mode']} {strftime('%Y-%m-%d %H:%M:%S')}" ) train_process, architecture = dispatch.dispatch(config['arch']['mode'])