"n_offsprings": 4, "n_breeding": 4, "tournament_size": 1, "n_processes": 8, }, "evolve_params": {"max_generations": 500, "min_fitness": 300,}, } params["md5_hash_sim_script"] = utils.md5_file( params["sim_script"] ) # consistency check key = dicthash.generate_hash_from_dict(params, blacklist=["wall_clock_limit"]) params["outputdir"] = os.path.join(os.getcwd(), key) params["workingdir"] = os.getcwd() submit_job = False print("preparing job") print(" ", params["outputdir"]) utils.mkdirp(params["outputdir"]) utils.write_json(sim_params, os.path.join(params["outputdir"], "sim_params.json")) utils.write_json(params, os.path.join(params["outputdir"], "params.json")) utils.create_jobfile(params) utils.copy_file(params["sim_script"], params["outputdir"]) utils.copy_files(params["dependencies"], params["outputdir"]) if submit_job: print("submitting job") utils.submit_job(params)
] for use_drxeot_init in [True]: params['use_drxeot_init'] = use_drxeot_init for initial_seed in initial_seed_array: params['seeds'] = np.linspace(initial_seed, initial_seed + 3, 4) key = dicthash.generate_hash_from_dict(params) params['outputdir'] = os.path.join(os.getcwd(), results_folder, key) params['workingdir'] = os.getcwd() submit_job = True print('preparing job') print(' ', params['outputdir']) utils.mkdirp(params['outputdir']) utils.write_pickle( params, os.path.join(params['outputdir'], 'params.pickle')) utils.create_jobfile(params) utils.copy_file(params['sim_script'], params['outputdir']) utils.copy_files(params['dependencies'], params['outputdir']) if submit_job: print('submitting job') utils.submit_job(params)
"population_params": {"n_parents": 8, "mutation_rate": 0.05}, "ea_params": {"n_offsprings": 8, "n_breeding": 8, "tournament_size": 1}, "genome_params": { "n_inputs": 2, "n_outputs": 1, "n_columns": 5, "n_rows": 1, "levels_back": None, }, }, } params["md5_hash_sim_script"] = utils.md5_file(params["machine_params"]["sim_script"]) key = dicthash.generate_hash_from_dict(params, blacklist=[("gp_params", "max_generations")]) params["machine_params"]["workingdir"] = os.getcwd() params["machine_params"]["outputdir"] = os.path.join(params["machine_params"]["workingdir"], key) print("preparing job") print(" ", params["machine_params"]["outputdir"]) utils.mkdirp(params["machine_params"]["outputdir"]) utils.write_json(params, f"{params['machine_params']['outputdir']}/params.json") utils.create_jobfile(params["machine_params"]) utils.copy_file(params["machine_params"]["sim_script"], params["machine_params"]["outputdir"]) for fn in ["write_job.py", "sim_utils.py", "primitive_utils.py"]: utils.copy_file(fn, params["machine_params"]["outputdir"]) os.chdir(params["machine_params"]["outputdir"])