-
Notifications
You must be signed in to change notification settings - Fork 93
(WIP) add HuggingFace-style AutoEnv and AutoAction classes
#171
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really cool, but the mapping in registry concerns me because we would need to maintain this here.
To give more context, we expect for there to be thousands of envs on registries like the hf hub, and just a few gold standard examples in the repo. Could we implement AutoEnv without the registry mapping? For example, by using a remote_code style extraction of the client class from the space repo on hf?
Thanks for the suggestion, let me take a close look at how HF |
Yes, potentially. But the envs already contain the client classes and use a consistent structure. So we could leverage that. You might want to take a look at #160 . Also, because the envs will be python projects, it is possible to install them via pip. |
Thanks for pointing out this PR #160, after reviewing it, I think I will wait for this PR to be merged into main then add my feature on top of it then. |
This PR creates HuggingFace-style
AutoEnvandAutoActionclasses, so that it will be easier for a general training framework (eg.TorchForge) to import any env from a modular yaml like:Details for this PR:
1.
AutoEnvclass with HuggingFace-style APIfrom_docker_image()- Create env from image (with custom timeout!)from_hub()- Create env from HuggingFace Hublist_environments()- Show all available environmentsget_env_info()- Get detailed environment informationfrom_name()- Create env from nameAutoActionclass for automatic Action class retrievalfrom_env()- Get Action class by environment namefrom_image()- Get Action class from Docker imagelist_actions()- Show all available Action classesget_action_info()- Get Action class informationwait_timeoutparameter** (default: 30.0 seconds)Before (Old Way)
After (New HuggingFace-Style API)
Let me know if there is any suggestions on this feature, I just want to make OpenEnv user-friendly for RL training.
TODO: