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

UnregisteredEnv #2

Closed
Meta-YZ opened this issue Jul 3, 2021 · 39 comments
Closed

UnregisteredEnv #2

Meta-YZ opened this issue Jul 3, 2021 · 39 comments

Comments

@Meta-YZ
Copy link

Meta-YZ commented Jul 3, 2021

Hi! When I run the run_mappo.py,and something went wrong. But I have check the merge_env_v1, it's actually registered.

(marl_cav) h@qhan:~/rl/MARL_CAVs/MARL$ python run_mappo.py
Traceback (most recent call last):
File "/home/h/anaconda3/envs/marl_cav/lib/python3.6/site-packages/gym/envs/registration.py", line 121, in spec
return self.env_specs[id]
KeyError: 'merge-multi-agent-v0'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "run_mappo.py", line 225, in
train(args)
File "run_mappo.py", line 80, in train
env = gym.make('merge-multi-agent-v0')
File "/home/h/anaconda3/envs/marl_cav/lib/python3.6/site-packages/gym/envs/registration.py", line 145, in make
return registry.make(id, **kwargs)
File "/home/h/anaconda3/envs/marl_cav/lib/python3.6/site-packages/gym/envs/registration.py", line 89, in make
spec = self.spec(path)
File "/home/h/anaconda3/envs/marl_cav/lib/python3.6/site-packages/gym/envs/registration.py", line 131, in spec
raise error.UnregisteredEnv('No registered env with id: {}'.format(id))
gym.error.UnregisteredEnv: No registered env with id: merge-multi-agent-v0

@DongChen06
Copy link
Owner

Hi, Yuanzhuo, thanks for your interest. If you are using Pycharm to run the code, maybe you can try to make the directory as the source directory. Feel free to let me know if you have other questions.
image

@Meta-YZ
Copy link
Author

Meta-YZ commented Jul 4, 2021

Thanks! I have tried to do this before, but this error still occurs. In addition, I found this error when I checked and ran the file.
image

@DongChen06
Copy link
Owner

Hi, Yuanzhuo, Thanks for your update. To test the code, please run the files, e.g., run_mappo.py instead of the environment file. Please feel free to let me know you have further questions.

@Meta-YZ
Copy link
Author

Meta-YZ commented Jul 6, 2021

Hi, Yuanzhuo, Thanks for your update. To test the code, please run the files, e.g., run_mappo.py instead of the environment file. Please feel free to let me know you have further questions.

Sorry! My expression is not very clear. I run the 'run_mappo.py' actually, and make Directory as Source s Root as well. But tthere was the error 'gym.error.UnregisteredEnv: No registered env with id: merge-multi-agent-v0'.

@DongChen06
Copy link
Owner

DongChen06 commented Jul 6, 2021

Hi, Yuanzhuo, Thanks for your update. To test the code, please run the files, e.g., run_mappo.py instead of the environment file. Please feel free to let me know you have further questions.

Sorry! My expression is not very clear. I run the 'run_mappo.py' actually, and make Directory as Source s Root as well. But tthere was the error 'gym.error.UnregisteredEnv: No registered env with id: merge-multi-agent-v0'.

It seems you are running the environment file? Please also try to make both highway-env and MARL directories as source directories and then run the run_mappo.py under the directory of MARL.
image

@Meta-YZ
Copy link
Author

Meta-YZ commented Jul 6, 2021

Hi, Yuanzhuo, Thanks for your update. To test the code, please run the files, e.g., run_mappo.py instead of the environment file. Please feel free to let me know you have further questions.

Sorry! My expression is not very clear. I run the 'run_mappo.py' actually, and make Directory as Source s Root as well. But tthere was the error 'gym.error.UnregisteredEnv: No registered env with id: merge-multi-agent-v0'.

It seems you are running the environment file? Please also try to make both highway-env and MARL directories as source directories and then run the run_mappo.py under the directory of MARL.
image
Thanks! I did this on Ubuntu18.04.I didn't do anything extra, and didn't run the environment file at this time.
image
image

@DongChen06
Copy link
Owner

Thank you so much! Could you please try to run it via the right click instead of the command line?
image

If you can see the output as follows, you are able to run the code. The error means there are no existing models.
image

@Meta-YZ
Copy link
Author

Meta-YZ commented Jul 6, 2021

If you can see the output as follows, you are able to run the code. The error means there are no existing models.

Thank you very much for your patience and solution!My output is similar to yours. I sincerely hope that your article can be accepted, and looking forward to your code open source. Good luck!

Best regards

@DongChen06
Copy link
Owner

If you can see the output as follows, you are able to run the code. The error means there are no existing models.

Thank you very much for your patience and solution!My output is similar to yours. I sincerely hope that your article can be accepted, and looking forward to your code open source. Good luck!

Best regards

Thank you for your kind words. Also, I am welcome to further discussion and potential improvement for the paper.

@siddarth-mp
Copy link

Hi, Yuanzhuo, Thanks for your update. To test the code, please run the files, e.g., run_mappo.py instead of the environment file. Please feel free to let me know you have further questions.

Sorry! My expression is not very clear. I run the 'run_mappo.py' actually, and make Directory as Source s Root as well. But tthere was the error 'gym.error.UnregisteredEnv: No registered env with id: merge-multi-agent-v0'.

It seems you are running the environment file? Please also try to make both highway-env and MARL directories as source directories and then run the run_mappo.py under the directory of MARL.
image
Thanks! I did this on Ubuntu18.04.I didn't do anything extra, and didn't run the environment file at this time.
image
image

image

so when im running the file only ;it runs but wat to do further @DongChen06
and also when i run it through marl_cav environment: i get the same error still :
image
it'd be really helpful; if u can react to this @DongChen06

@siddarth-mp
Copy link

image

so when im running the file only ;it runs but wat to do further @DongChen06
and also when i run it through marl_cav environment: i get the same error still :
image

it'd be really helpful; if u can react to this @DongChen06

@siddarth-mp
Copy link

image
however results were produced but the video,model folders were empty; can u guide me pls

@DongChen06
Copy link
Owner

@siddarth-mp Hi are you still facing the unregistered issue or you are able to run it without outputting results?

@siddarth-mp
Copy link

siddarth-mp commented Apr 25, 2023 via email

@DongChen06
Copy link
Owner

The figures are not shown correctly

@siddarth-mp
Copy link

siddarth-mp commented Apr 25, 2023 via email

@siddarth-mp
Copy link

siddarth-mp commented Apr 25, 2023 via email

@siddarth-mp
Copy link

siddarth-mp commented Apr 25, 2023 via email

@DongChen06
Copy link
Owner

For the MAPPO, it should be correct, just wait for some time and then you will see the results.

@siddarth-mp
Copy link

siddarth-mp commented Apr 25, 2023 via email

@DongChen06
Copy link
Owner

Great! For MADQN, you may need to follow MAPPO or MAA2C to make some changes. I did not test MADQN.

@siddarth-mp
Copy link

siddarth-mp commented Apr 26, 2023 via email

@siddarth-mp
Copy link

siddarth-mp commented Apr 27, 2023 via email

@siddarth-mp
Copy link

siddarth-mp commented Jun 16, 2023 via email

@DongChen06
Copy link
Owner

Hi sidd, I think GRL is a good idea to improve the current approach. Since GNN is used for embedding layers, you may replace the feature extraction layers with GNN and keep other settings unchanged. For the network inputs, you may consider a fixed number of surrounding vehicles to simplify the problem and each neighbor can be considered as one node.

@siddarth-mp
Copy link

siddarth-mp commented Jun 17, 2023 via email

@siddarth-mp
Copy link

siddarth-mp commented Jul 17, 2023 via email

@DongChen06 DongChen06 mentioned this issue Nov 1, 2023
@ZhangTingyang
Copy link

image
Why is the directory set correctly, after running this file, it still shows that the environment is not registered, and then there are no pictures and videos in the resulting package?

@DongChen06
Copy link
Owner

@ZhangTingyang Hi Tingyang, can you run other algos? Or they all failed? Also, please also try the MA2C codes in the google drive

@ZhangTingyang
Copy link

@ZhangTingyang Hi Tingyang, can you run other algos? Or they all failed? Also, please also try the MA2C codes in the google drive

Thank you for your prompt reply, running run_maacktr.py and run_mappo.py files are the same result, how to register an ID? If the normal result is normal, will the video file be generated in the result? How should Google Drive be used, I haven't used it before, can you give me some pointers, thank you very much.

@DongChen06
Copy link
Owner

@ZhangTingyang Hi Tingyang, can you run other algos? Or they all failed? Also, please also try the MA2C codes in the google drive

Thank you for your prompt reply, running run_maacktr.py and run_mappo.py files are the same result, how to register an ID? If the normal result is normal, will the video file be generated in the result? How should Google Drive be used, I haven't used it before, can you give me some pointers, thank you very much.

Actually, running the codes in the correct manner may not lead to the error and you may see the videos after 200 episodes. You may try to run it under a different path. The link for the codes can be found at ReadMe.md. Please check the readme

@siddarth-mp
Copy link

siddarth-mp commented Nov 8, 2023 via email

@DongChen06
Copy link
Owner

@siddarth-mp Hi the figure was broken

@siddarth-mp
Copy link

siddarth-mp commented Nov 8, 2023 via email

@DongChen06
Copy link
Owner

Also, just a friendly reminder, we do not need to install highway-env with pip, since we have all the necessary components in the package.

@siddarth-mp
Copy link

siddarth-mp commented Nov 8, 2023 via email

@siddarth-mp
Copy link

siddarth-mp commented Nov 8, 2023 via email

@DongChen06
Copy link
Owner

Its fine, it worked, Thanks for ur time

On Wed, Nov 8, 2023 at 5:53 PM Siddarth Mp @.> wrote: ohk,so what's the issue On Wed, Nov 8, 2023 at 5:50 PM Dong Chen @.> wrote: > Also, just a friendly reminder, we do not need to install highway-env > with pip, since we have all the necessary components in the package. > > — > Reply to this email directly, view it on GitHub > <#2 (comment)>, > or unsubscribe > https://github.com/notifications/unsubscribe-auth/AR2ZYI2QZX4G2Q6DMV4HWKLYDN2IJAVCNFSM47X6KHG2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBQGE3TQMBVGM3Q > . > You are receiving this because you were mentioned.Message ID: > @.***> >

Great! What did you change to make it?

@siddarth-mp
Copy link

siddarth-mp commented Nov 8, 2023 via email

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

No branches or pull requests

4 participants