Repository navigation
Preserve discrete action specs in CanonicalSpecWrapper - #378
sylvesterkaczmarek wants to merge 3 commits into
Conversation
|
Hi, Could we add a test for that order too? It would exercise the exact Would it be helpful if I implemented this test? I'm happy to work on it and open a small PR if that's okay with you. |
Signed-off-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>
|
Good catch, Narendra. I added the reversed wrapper order from #294 in |
|
Thanks for adding the test! Glad I could help. I'll keep an eye out for more edge cases in Acme. |
Summary
Fixes #294.
CanonicalSpecWrappercurrently treats everydm_env.specs.BoundedArraysubclass as a continuous action. In particular,DiscreteArrayinherits fromBoundedArraybut does not acceptminimumormaximumin its constructor. Requesting the canonical action spec therefore raisesTypeError. Itsstep()path also incorrectly rescales integer action indices as continuous values.BoundedArrayaction specs, not theDiscreteArraysubclass.clip=True.SinglePrecisionWrapper.Verification
dm_envanddm-treetypes.dm-launchpadwheel, so the isolated test runner supplied an unused import-only Launchpad placeholder. The tests exercise the actual Acme wrapper implementation with real dm_env types; no full Acme or agent training suite was run.