You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
choices=json.loads("["+val.split("[")[1].split("]")[0] +"]") # Seems faster than ast.literal_eval (See https://stackoverflow.com/questions/1894269/how-to-convert-string-representation-of-list-to-a-list)
79
-
len_c=len(choices)
80
-
ifsample[j] ==1.0: #TODO remove? Don't know if sobol samples include 1.0
var_agent_configs=OrderedDict(sorted(var_agent_configs.items(), key=lambdat: t[0])) #hack because ConfigSpace below orders alphabetically, the returned configs are in a jumbled order compared to the order above.
37
+
random_agent_configs=OrderedDict(sorted(random_agent_configs.items(), key=lambdat: t[0])) #hack because ConfigSpace below orders alphabetically, the returned configs are in a jumbled order compared to the order above, which would create problems with config processing.
choices=json.loads("["+val.split("[")[1].split("]")[0] +"]") # Seems faster than ast.literal_eval (See https://stackoverflow.com/questions/1894269/how-to-convert-string-representation-of-list-to-a-list)
# if random_configs[i].get_dictionary()["train_batch_size"] == 4 \
146
-
# and random_configs[i].get_dictionary()["buffer_size"] < 33:
147
-
# print("Config:", i, "train_batch_size, buffer_size:", random_configs[i].get_dictionary()["train_batch_size"], random_configs[i].get_dictionary()["buffer_size"])
148
-
random_configs[i] =tuple(random_configs[i].get_dictionary().values()) #hack ####TODO Change run_experiments.py and here to directly pass whole config dict to run_experiments.py. Would need to replace in every config.py file.
# for config_type, config_dict in var_configs.items():
256
-
# for key in config_dict:
257
-
# assert type(var_configs[config_type][key]) == list, "var_config should be a dict of dicts with lists as the leaf values to allow each configuration option to take multiple possible values"
Copy file name to clipboardexpand all lines: experiments/rainbow_hydra_qbert.py
+11-22
Original file line number
Diff line number
Diff line change
@@ -2,27 +2,18 @@
2
2
timesteps_total=10_000_000
3
3
fromcollectionsimportOrderedDict
4
4
5
-
var_env_configs=OrderedDict({
5
+
sobol_env_configs=OrderedDict({
6
6
'delay': [0],
7
7
'dummy_seed': [iforiinrange(num_seeds)],
8
8
})
9
9
10
-
var_configs=OrderedDict({
11
-
"env": var_env_configs
12
-
})
13
-
14
-
value_tuples= []
15
-
forconfig_type, config_dictinvar_configs.items():
16
-
forkeyinconfig_dict:
17
-
asserttype(var_configs[config_type][key]) ==list, "var_config should be a dict of dicts with lists as the leaf values to allow each configuration option to take multiple possible values"
print("Total number of grid configs. to run:", len(cartesian_product_configs))
13
+
})
23
14
24
15
25
-
var_agent_configs=OrderedDict({
16
+
random_agent_configs=OrderedDict({
26
17
27
18
"lr": "float, log, [1e-5, 1e-3]", # 1e-4
28
19
"learning_starts": "int, [1, 2000]", # 500
@@ -35,7 +26,7 @@
35
26
36
27
})
37
28
38
-
var_agent_configs=OrderedDict(sorted(var_agent_configs.items(), key=lambdat: t[0])) #hack because saved configs used below as random_configs are ordered alphabetically.
29
+
random_agent_configs=OrderedDict(sorted(random_agent_configs.items(), key=lambdat: t[0])) #hack because ConfigSpace below orders alphabetically, the returned configs are in a jumbled order compared to the order above, which would create problems with config processing.
39
30
40
31
random_configs= \
41
32
[(1.86e-12, 1480, 0.0697, 311, 0.000545, 8, 1845, 64), # top 10 configs begin from here
0 commit comments