Repository navigation
[RLlib] Change scope of PPO tests to comply with currently supported set of spaces in RLModules for PPO - #32940
Conversation
Signed-off-by: Kourosh Hakhamaneshi <[email protected]>
Signed-off-by: Kourosh Hakhamaneshi <[email protected]>
Signed-off-by: Kourosh Hakhamaneshi <[email protected]>
Signed-off-by: Kourosh Hakhamaneshi <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
There was a problem hiding this comment.
dude this is super hacky, and not approvable.
My suggestion (the general sketch):
LEARNER_ENABLED_OBS_SPACES = [...]
LEARNER_ENABLED_ACTION_SPACES = [...]
def _do_check(algo, config, a_name, o_name):
config_copy = config.copy()
config_copy.validate()
if config_copy.enable_api:
obs_space_list = LEARNER_ENABLED_OBS_SPACES
act_space_list = LEARNER_ENABLED_ACTION_SPACES
else: ...
if o_name not in obs_space_list and in THE_OLD_OBS_LIST:
warn(message)
return
if a_name not in act_space_list and in THE_OLD_ACTION_LIST:
warn(message)
return
|
@kouroshHakha I understand that it looks hacky. But the code you propose makes it so that hitting an unsupported action space OR and unsupported observations space simply skips the test. Thereby omitting tests that would have a supported space. |
|
This test works by zipping the spaces together. I don't think it is worth restructuring the rest of the test around your code. |
|
As per our offline discussion, we are restructuring the test itself. |
…h cases to skip Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
| config["env"] = RandomEnv | ||
|
|
||
| def _do_check(alg, config, a_name, o_name): | ||
| if alg == "PPO": |
There was a problem hiding this comment.
We decided to not have this algo == "PPO" specialization, right?
We should check for which obs / action space to choose based on whether the enable_rl_module_api is set or not.
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
| "discrete": Discrete(5), # TODO: (Artur) Support "multi_binary" | ||
| "discrete2": Discrete(5), | ||
| "discrete": Discrete(5), | ||
| "vector1d": Box(-1.0, 1.0, (5,), dtype=np.float32), |
There was a problem hiding this comment.
rename: vector1d --> continuous
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
…set of spaces in RLModules for PPO. (ray-project#32940) Signed-off-by: elliottower <[email protected]>
…set of spaces in RLModules for PPO. (ray-project#32940) Signed-off-by: Jack He <[email protected]>
Why are these changes needed?
This PR changes the scope of the PPO test_supported_spaces test.
As we not yet support all previously supported spaces, this PR makes it so that we skip the tests that we don't "want".
It also restructures the tests:
(whereas before all possible spaces on both sides where zipped to create test cases)