Unity-Technologies / ml-agents

The Unity Machine Learning Agents Toolkit (ML-Agents) is an open-source project that enables games and simulations to serve as environments for training intelligent agents using deep reinforcement learning and imitation learning.
https://unity.com/products/machine-learning-agents
Other
17.12k stars 4.15k forks source link

gym complains about `Box bound precision lowered by casting to float32` #5906

Closed xixiha5230 closed 1 year ago

xixiha5230 commented 1 year ago

Describe the bug

gym complains about Box bound precision lowered by casting to float32

To Reproduce

use UnityToGymWrapper then gym start warning

Solution

This is because this line of code:

high = np.array([1] * self.group_spec.action_spec.continuous_size)

Because the default type is np.int, it needs to be changed to np.float32

high = np.array([1.] * self.group_spec.action_spec.continuous_size, dtype=np.float32)

miguelalonsojr commented 1 year ago

Please resubmit your bug report using our template https://github.com/Unity-Technologies/ml-agents/blob/develop/.github/ISSUE_TEMPLATE/bug_report.md. This will allow us to try to reproduce the error.

github-actions[bot] commented 1 year ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.