andreped / super-ml-pets

🐢 AI for Super Auto Pets
MIT License
31 stars 13 forks source link

Error when training #66

Closed adjmathix closed 1 year ago

adjmathix commented 1 year ago

Describe the bug When tyring to train the model, I have either a module or AttributeError.

To Reproduce Steps to reproduce the behavior: Following the steps in the README.txt for setup.

When I'm ready to train I run: python main.py --task train -> it gives me an error for not having the module shimmy 0.2.1 installed. after pip install shimmy>=0.2.1, I run again the train command line and now I have: AttributeError: 'SuperAutoPetsEnv' object has no attribute 'render_mode' Desktop (please complete the following information):

I know this project is starting to date a bit but hopefully someone is going to read this issue. I would love to have it working.

andreped commented 1 year ago

Hello, @adjmathix!

I managed to reproduce the bug on CoLab (see gist).

Basically, it seems like there is something that has changed in stable baseline3 or any of its dependencies, resulting in the bug you are observing.

I will make a PR, if I find a solution to this problem.

andreped commented 1 year ago

I found a simple fix. The latest sb3-contrib is not compatible with the environment. By simply forcing to use a specific version, it fixes the problem (see updated gist).

andreped commented 1 year ago

Fixed in 9e12fe1fbd24453301e7d26f1304285b663d60af.

All unit tests passed, so I assume this works. Pull latest and try again.

adjmathix commented 1 year ago

That works on my side too! Thanks for the quick fix.