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

[Question] Passing arguments to environment #352

Open
2 of 3 tasks
zhalehmehrabi opened this issue Sep 26, 2024 · 1 comment
Open
2 of 3 tasks

[Question] Passing arguments to environment #352

zhalehmehrabi opened this issue Sep 26, 2024 · 1 comment
Labels
question Further information is requested

Comments

@zhalehmehrabi
Copy link

zhalehmehrabi commented Sep 26, 2024

Required prerequisites

Questions

Hello,
Thank you for your handy library.
I have an environment which I have to pass multiple arguments. in your tutorials LINK it was mentioned to use the following code:

custom_cfgs.update({'env_cfgs': {'num_agents': 2}})
agent = omnisafe.Agent('PPOLag', 'NewExample-v0', custom_cfgs=custom_cfgs)

However, when I used it I got this error:
KeyError: 'Invalid key: env_cfgs'

Please help with it.
thanks

@zhalehmehrabi zhalehmehrabi added the question Further information is requested label Sep 26, 2024
@Gaiejj
Copy link
Member

Gaiejj commented Oct 2, 2024

I'm sorry, but it's quite difficult for me to resolve your issue with just this limited information. You can successfully run the examples in the tutorial, but you're not able to implement them in your own code, right? To achieve your goal, I suggest you consider manually editing the omnisafe/configs/on-policy/PPOLag.yaml file to make the necessary changes. Hope it can work.

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

No branches or pull requests

2 participants