Skip to content

Environment registry#2

Open
adzcai wants to merge 12 commits intoEdanToledo:mainfrom
adzcai:main
Open

Environment registry#2
adzcai wants to merge 12 commits intoEdanToledo:mainfrom
adzcai:main

Conversation

@adzcai
Copy link

@adzcai adzcai commented Oct 6, 2025

Closes #1. I've copied over stoix.utils.make_env and some of its dependencies. The tricky part is getting rid of the hydra dependency since requiring the user to put all the arguments in a DictConfig is poor UX -- plain keyword arguments are more Pythonic. This means that some hydra.utils.instantiate calls will need to get called downstream, i.e. in Stoix.

@EdanToledo
Copy link
Owner

Hey, so this is great but a few points. I dont think we should include any envpool or gymnasium dependencies into stoa as its designed mainly for JAX envs. The envpool and gymnasium wrappers should remain in stoix. Second, i think the application of wrappers should also be on the stoix side. My thoughts for the registry in stoa would be more simple such e.g. stoa.make('brax/ant', env_kwargs), this would only make the base environment and wrap it with the adapter. I dont think we want to be applying any wrappers on top. As you did in this PR though, it would be nice to have an extra utility function for core wrappers.

@EdanToledo
Copy link
Owner

Let me know when this is ready for review

@adzcai
Copy link
Author

adzcai commented Nov 25, 2025

Sorry for the delay -- I think this works! In the README.md, we would just replace

gymnax_env, env_params = gymnax.make("CartPole-v1")
env = GymnaxToStoa(gymnax_env, env_params)

with

env = stoa.make("gymnax", "CartPole-v1")

The stoa environment doesn't have an extra "params" object, so only the environment is returned.

@EdanToledo
Copy link
Owner

Amazing! Let me give it one last look but i think its good.

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.

gymnasium-like environment registry

2 participants