Closed Hamza-101 closed 2 months ago
Please have a careful look at https://github.com/DLR-RM/stable-baselines3/issues/982#issuecomment-1197044014
AssertionError: Your environment must inherit from the gymnasium.Env
Please fix any issue found by the env checker before posting an issue about custom env.
The prompt asked to give minimal viable working code which is why I gave the steps. Giving these 4 functions was also written in details box, which is why I attached it.
My situation is simlar to No error in inheriting Just wants me to switch to gynasium, can't cause it wouldn't install tried multiple times on different os.
So it can be ignored.
What do you mean "it wouldn't install"?
minimal viable working code which is why I gave the steps
It far from being minimal. Providing a MRE would help
What do you mean "it wouldn't install"?
box2d wouldn't install whenever I tried to setup gymnasium. Tried many times, manually and otherwise.
It far from being minimal. Providing a MRE would help
This is the "minimal" code I could provide while keeping it working.
Gymnasium and box2d are maintained, if you can't install it, open an issue on its GitHub to sort this out. Plus it seems like you've installed it:
Gymnasium: 0.29.1
Please make sure to understand what minimal means: https://github.com/DLR-RM/stable-baselines3/issues/982#issuecomment-1197044014 and https://stackoverflow.com/help/minimal-reproducible-example: I should be able to copy pate you code and run it. I don't have PPonew.py
for example.
Despite it, it won't work. I'll try that too. I know what minimal is but I have provided files, and this is the least amount needed to run it. Tried my best to make it small.
🐛 Bug
check_env result
I have trained and tested a custom Boid flocking environment, in OpenAI Gym, using 3 Boids it works. However when I test it, the policy, for greater than that e.g 10, it gives the following error.![image](https://github.com/DLR-RM/stable-baselines3/assets/45544623/e5b64139-fab3-4687-bcb3-9df401d1aa3e)
Code example
Relevant log output / Error message
System Info
OS: Windows-10-10.0.22631-SP0 10.0.22631 Python: 3.11.4 Stable-Baselines3: 2.2.1 PyTorch: 2.0.0+cpu GPU Enabled: False Numpy: 1.23.5 Cloudpickle: 1.2.2 Gymnasium: 0.29.1 OpenAI Gym: 0.15.7
({'OS': 'Windows-10-10.0.22631-SP0 10.0.22631', 'Python': '3.11.4', 'Stable-Baselines3': '2.2.1', 'PyTorch': '2.0.0+cpu', 'GPU Enabled': 'False', 'Numpy': '1.23.5', 'Cloudpickle': '1.2.2', 'Gymnasium': '0.29.1', 'OpenAI Gym': '0.15.7'}, '- OS: Windows-10-10.0.22631-SP0 10.0.22631\n- Python: 3.11.4\n- Stable-Baselines3: 2.2.1\n- PyTorch: 2.0.0+cpu\n- GPU Enabled: False\n- Numpy: 1.23.5\n- Cloudpickle: 1.2.2\n- Gymnasium: 0.29.1\n- OpenAI Gym: 0.15.7\n')
Checklist