Skip to content
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

Fix definition of "intersection-multi-agent-v1" with MultiAgentWrapper #609

Merged
merged 2 commits into from
Aug 9, 2024

Conversation

LucasAlegre
Copy link
Member

This PR changes the register of "intersection-multi-agent-v1" to apply the MultiAgentWrapper on the register method.

The previous version is giving an error when importing highway-env with gymnasium 1.0 since MultiAgentWrapper(MultiAgentIntersectionEnv) is applying a wrapper to a class instead of an object.

@LucasAlegre
Copy link
Member Author

Can this be merged asp @eleurent @jjshoots ? We need this for MO-Gymnasium Farama-Foundation/MO-Gymnasium#95

@ffelten
Copy link

ffelten commented Aug 9, 2024

Shouldn't you try to bump Gymnasium to 1.0 in this PR?

@LucasAlegre
Copy link
Member Author

Shouldn't you try to bump Gymnasium to 1.0 in this PR?

It is not necessary on MO-Gymnasium side.

@pseudo-rnd-thoughts
Copy link
Member

I think this issue is resolved on Gymnasium main, could you test locally to confirm?

@LucasAlegre
Copy link
Member Author

I think this issue is resolved on Gymnasium main, could you test locally to confirm?

I got the same error using the last Gymnasium state on Github:

  File "/home/lucas/HighwayEnv/highway_env/envs/__init__.py", line 6, in <module>
    from highway_env.envs.intersection_env import *
  File "/home/lucas/HighwayEnv/highway_env/envs/intersection_env.py", line 428, in <module>
    TupleMultiAgentIntersectionEnv = MultiAgentWrapper(MultiAgentIntersectionEnv)
  File "/home/lucas/Gymnasium/gymnasium/core.py", line 310, in __init__
    assert isinstance(env, Env)

Copy link
Member

@pseudo-rnd-thoughts pseudo-rnd-thoughts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, dont worry then

@pseudo-rnd-thoughts pseudo-rnd-thoughts merged commit 0686b06 into Farama-Foundation:master Aug 9, 2024
5 checks passed
@LucasAlegre
Copy link
Member Author

@pseudo-rnd-thoughts I guess it makes sense to make a new release for highway-env? The last one is from more than one year ago.

@pseudo-rnd-thoughts
Copy link
Member

Yes, that is probably a good idea

@eleurent
Copy link
Collaborator

Thanks for this fix! Made a new release: v1.9.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants