DongChen06 / MARL_CAVs

MARL for Autonomous Vehicles

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UnregisteredEnv

Meta-YZ opened this issue · comments

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

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

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

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.

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'.

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

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

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

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

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.

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

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

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

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

The figures are not shown correctly

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

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

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.

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?

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

@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.

@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 Hi the figure was broken

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.

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?