Antonin RAFFIN

Results 880 comments of Antonin RAFFIN

> How should I rewrite the above code to make it work? Have you looked at https://github.com/Stable-Baselines-Team/stable-baselines3-contrib/issues/80#issuecomment-1159013599 ? You should flatten the mask. It is tested here in SB3-contrib: https://github.com/Stable-Baselines-Team/stable-baselines3-contrib/blob/75b2de139927da26d5871aef9fd839632f73b296/tests/test_invalid_actions.py#L95-L103...

`env.action_space.sample` is from gym, not sb3, requirements are different (i think we had sb3 api before gym supported mask).

> is help still wanted on this? yes > Its open but v stale and isn't listed on the critical path for v2.0 what do you mean? this is a...

> So we must apply a mask wrapper to the environment before applying VecEnv to it? you have two options: - Implement the `action_masks` method at the single env level:...

> This code works. if it is implemented at the single env level (that means you have a `action_masks` method), you don't need the action wrapper. The way you do...

> Indeed the MaskablePPO does not work with SubprocVecEnv although it works with DummyVecEnv. SubprocVecEnv throws a pickle exception when reading the action_masks attribute. quick remark (as I won't have...

> Still It does not work with SubprocVect as methods can not be pickle. This does run for me: ```python from sb3_contrib import MaskablePPO from sb3_contrib.common.envs import InvalidActionEnvDiscrete from sb3_contrib.common.maskable.evaluation...

> Bumping this up.... anyone got a PR or something to try? I am struggling to get MPPO to work with subproc :/ https://github.com/Stable-Baselines-Team/stable-baselines3-contrib/issues/49#issuecomment-1422869188 https://github.com/Stable-Baselines-Team/stable-baselines3-contrib/issues/49#issuecomment-1436841759

> I would be interested in exporting SB3 models into C++ executables but I am not sure on how to approach this problem For inference, you can have a look...

Hello, It seems that it may be related from your custom environment. The following code works on my machine: ```python from stable_baselines.common.cmd_util import make_atari_env from stable_baselines import ACKTR env =...