Skip to content

feat: pass config env kwargs to gymnax via envparams #152

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

Merged

Conversation

emergenz
Copy link
Contributor

In gymnax, environment parameters should be modified using EnvParams. In fact, currently a non-empty config.env.kwargs errors when used with gymnax.

@EdanToledo
Copy link
Owner

This is great, the only problem is that some environments do take init args that are not in the envparams. For example, minatar breakout. We would need to handle this as well somehow.

@emergenz
Copy link
Contributor Author

Hm, I see. Then maybe for now we need to hard-code for which gymnax envs to use EnvParams, and for which to use kwargs. We can't just do both since using kwargs when EnvParams should be used leads to an error due to the init method of those environments not taking any additional arguments.

@EdanToledo
Copy link
Owner

I'm sure there is an easy way to do it step by step and populate the env init kwargs first and then the env Params with the remainder.

@emergenz
Copy link
Contributor Author

Feel free to commit over this PR

@EdanToledo
Copy link
Owner

I've made the fix, once tests pass and im back at my pc ill merge.

@EdanToledo EdanToledo merged commit fffcb45 into EdanToledo:main Mar 31, 2025
2 checks passed
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.

2 participants