New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] Action Space showing floats when dtype=int #3107
Comments
Someone here has asked the same question, but there's no answer |
This looks like a bug to me, I'll take a look. edit: this is a bug in stable-baselines3, since the action is produced by a sb3 policy, the sb3 policy is ignoring the fact that the action space is a box with type int. So to look into this, we would need to know the versions of gym and stable-baselines3 you're using. |
It's worth noting that I am running this in a Google Colab notebook... |
I also just tried upgrading |
So a box action space with int values is equivalent in some sense to a multi-discrete action space, which stable-baselines3 does currently support. I think stable-baselines3 doesn't support integer values box action spaces from looking at their code, so if you really need int valued box support and a multi-discrete space wont work, then I'd recommend making a feature request on stable-baselines3. To be clear, I think most likely you will be able to get the desired behavior with a MultiDiscrete action space. |
This did fix the issue, changing the action space to:
...worked in turning them into int's so I can go ahead with that, but maybe the Box int thing could be figured out in the future. Thanks! |
Question
This isn't NOT a bug, but I also didn't want to submit it as a bug in case it's really not, but when I set an action space as a
Box
withdtype=int
ordtype=np.int32
, when the environment is reset for the first time, the actions are showing as floats? Any idea why?I've provided a minimal reproducible example below:
OUTPUT
The code will stop at my
stop()
function call which doesn't exist, but you can see the floats printed out in the output. Any ideas?The text was updated successfully, but these errors were encountered: