ALRhub / fancy_gym

Fancy Gym: Unifying interface for various RL benchmarks with support for Black Box approaches.
https://alrhub.github.io/fancy_gym/
MIT License
33 stars 15 forks source link

Airhockey Enviroment doesn't register in namespace #101

Open gregorfr opened 9 months ago

gregorfr commented 9 months ago

This is a bug that only I seem to have, but despite reinstalling fancy_gym numerous times, I never got past it. Whenever I try to use an Airhockey enviroment (despite installing fancy_gym[all] and other needed dependencies) it tells me "gymnasium.error.NameNotFound: Environment AirHockey-{name depends on which Airhockey I tried} doesn't exist in namespace fancy." This only happens for the AirHockey enviroment, all other enviroments work just fine.

To Reproduce Example test.py: import fancy_gym import gymnasium as gym env = gym.make('fancy/AirHockey-3dof-hit-v0', render_mode="rgb_array", width=600, height=400)

Will throw the Error: gymnasium.error.NameNotFound: Environment AirHockey-3dof-hit doesn't exist in namespace fancy.

Additionally, I have used the print(gym.envs.registry.keys()) method to display all the envs in the name space, which gave me this output: namespace.txt

D-o-d-o-x commented 9 months ago

Hi. Bugs that only one person seem to have are somewhat problematic to triage...

Are you using any kind of virtual environment? (venv, poetry, conda, etc.) I heard about weird issues from some of our deep down dependencies on Apple M-Series chips; do you happen to work on one of those?

Can you try Python3.11? (Python version, where the 'minor version number' are even are stable releases, uneven ones are development releases. So the even numbers should be more stable. But I actually found issues to sometimes disappear when going to an 'development release')

Are there any errors printed during installation of fancy_gym? Or during import? (Except for some DeprecationWarnings, those are to be expected...) Specifically, is the message '[FANCY GYM] Air Hockey not available (depends on mushroom-rl, dmc, mujoco)' printed?

D-o-d-o-x commented 9 months ago

Did you install from github or PyPI? It's possible, that the update that brought AirHockey has not yet hit the PyPI repos. (We were restructuring how our deployment pipeline works...)