|
| 1 | +from random_word import RandomWords |
| 2 | + |
| 3 | +from mrunner.helpers.specification_helper import ( |
| 4 | + create_experiments_helper, |
| 5 | + get_combinations, |
| 6 | +) |
| 7 | + |
| 8 | + |
| 9 | +name = globals()["script"][:-3] |
| 10 | + |
| 11 | +# params for all exps |
| 12 | +config = { |
| 13 | + "connect": "0.0.0.0:4431", |
| 14 | + "exp_set": "2G", |
| 15 | + "exp_point": "monk-APPO-AA-KL", |
| 16 | + "num_actor_cpus": 20, |
| 17 | + "total_steps": 2_000_000_000, |
| 18 | + "group": "monk-APPO-AA-KL", |
| 19 | + "character": "mon-hum-neu-mal", |
| 20 | + "ttyrec_batch_size": 256, |
| 21 | +} |
| 22 | + |
| 23 | + |
| 24 | +# params different between exps |
| 25 | +params_grid = [ |
| 26 | + { |
| 27 | + "exp_tags": [f"{name}-4"], |
| 28 | + "seed": list(range(3)), |
| 29 | + # load from checkpoint |
| 30 | + "unfreeze_actor_steps": [0], |
| 31 | + "use_checkpoint_actor": [True], |
| 32 | + "kickstarting_path": [ |
| 33 | + "/net/pr2/projects/plgrid/plgg_pw_crl/mbortkiewicz/mrunner_scratch/checkpoints_nle/skip4/checkpoint.tar" |
| 34 | + ], |
| 35 | + "model_checkpoint_path": [ |
| 36 | + "/net/pr2/projects/plgrid/plgg_pw_crl/mbortkiewicz/mrunner_scratch/checkpoints_nle/skip4/checkpoint.tar" |
| 37 | + ], |
| 38 | + "omitted_dlvls": [4], |
| 39 | + }, |
| 40 | + # { |
| 41 | + # "exp_tags": [f"{name}-3"], |
| 42 | + # "seed": list(range(3)), |
| 43 | + # # load from checkpoint |
| 44 | + # "unfreeze_actor_steps": [0], |
| 45 | + # "use_checkpoint_actor": [True], |
| 46 | + # "kickstarting_path": [ |
| 47 | + # "/net/pr2/projects/plgrid/plgg_pw_crl/mbortkiewicz/mrunner_scratch/checkpoints_nle/skip3/checkpoint.tar" |
| 48 | + # ], |
| 49 | + # "model_checkpoint_path": [ |
| 50 | + # "/net/pr2/projects/plgrid/plgg_pw_crl/mbortkiewicz/mrunner_scratch/checkpoints_nle/skip3/checkpoint.tar" |
| 51 | + # ], |
| 52 | + # "omitted_dlvls": [3], |
| 53 | + # }, |
| 54 | + # { |
| 55 | + # "exp_tags": [f"{name}-2"], |
| 56 | + # "seed": list(range(3)), |
| 57 | + # # load from checkpoint |
| 58 | + # "unfreeze_actor_steps": [0], |
| 59 | + # "use_checkpoint_actor": [True], |
| 60 | + # "kickstarting_path": [ |
| 61 | + # "/net/pr2/projects/plgrid/plgg_pw_crl/mbortkiewicz/mrunner_scratch/checkpoints_nle/skip2/checkpoint.tar" |
| 62 | + # ], |
| 63 | + # "model_checkpoint_path": [ |
| 64 | + # "/net/pr2/projects/plgrid/plgg_pw_crl/mbortkiewicz/mrunner_scratch/checkpoints_nle/skip2/checkpoint.tar" |
| 65 | + # ], |
| 66 | + # "omitted_dlvls": [2], |
| 67 | + # }, |
| 68 | + { |
| 69 | + "exp_tags": [f"{name}-1"], |
| 70 | + "seed": list(range(3)), |
| 71 | + # load from checkpoint |
| 72 | + "unfreeze_actor_steps": [0], |
| 73 | + "use_checkpoint_actor": [True], |
| 74 | + "kickstarting_path": [ |
| 75 | + "/net/pr2/projects/plgrid/plgg_pw_crl/mbortkiewicz/mrunner_scratch/checkpoints_nle/skip1/checkpoint.tar" |
| 76 | + ], |
| 77 | + "model_checkpoint_path": [ |
| 78 | + "/net/pr2/projects/plgrid/plgg_pw_crl/mbortkiewicz/mrunner_scratch/checkpoints_nle/skip1/checkpoint.tar" |
| 79 | + ], |
| 80 | + "omitted_dlvls": [1], |
| 81 | + }, |
| 82 | + # { |
| 83 | + # "exp_tags": [f"{name}-0"], |
| 84 | + # "seed": list(range(3)), |
| 85 | + # # load from checkpoint |
| 86 | + # "unfreeze_actor_steps": [0], |
| 87 | + # "use_checkpoint_actor": [True], |
| 88 | + # "kickstarting_path": [ |
| 89 | + # "/net/pr2/projects/plgrid/plgg_pw_crl/mbortkiewicz/mrunner_scratch/checkpoints_nle/skip0/checkpoint.tar" |
| 90 | + # ], |
| 91 | + # "model_checkpoint_path": [ |
| 92 | + # "/net/pr2/projects/plgrid/plgg_pw_crl/mbortkiewicz/mrunner_scratch/checkpoints_nle/skip0/checkpoint.tar" |
| 93 | + # ], |
| 94 | + # "omitted_dlvls": [0], |
| 95 | + # }, |
| 96 | +] |
| 97 | + |
| 98 | +params_configurations = get_combinations(params_grid) |
| 99 | + |
| 100 | +final_grid = [] |
| 101 | +for e, cfg in enumerate(params_configurations): |
| 102 | + cfg = {key: [value] for key, value in cfg.items()} |
| 103 | + r = RandomWords().get_random_word() |
| 104 | + cfg["group"] = [f"{name}_{e}_{r}"] |
| 105 | + final_grid.append(dict(cfg)) |
| 106 | + |
| 107 | + |
| 108 | +experiments_list = create_experiments_helper( |
| 109 | + experiment_name=name, |
| 110 | + project_name="nle", |
| 111 | + with_neptune=False, |
| 112 | + script="python3 mrunner_run.py", |
| 113 | + python_path=".", |
| 114 | + tags=[name], |
| 115 | + exclude=["checkpoint"], |
| 116 | + base_config=config, |
| 117 | + params_grid=final_grid, |
| 118 | + exclude_git_files=False, |
| 119 | +) |
0 commit comments