Skip to content

Conversation

@sergiopaniego
Copy link
Member

@sergiopaniego sergiopaniego commented Oct 31, 2025

What does this PR do?

I'm playing with the OpenEnv integration and I'd like to add some more details about how to setup up everything.
For example:

  • What to do with the envs in the Hub?
  • How to setup the env (via Docker, via uvicorn, via HF Space)
  • Adapt the examples a bit to handle args and connection from Docker.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a GitHub issue? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

Who can review?

@qgallouedec @burtenshaw


# Create HTTP client for Echo Environment
client = EchoEnv.from_docker_image("echo-env:latest")
client = EchoEnv.from_docker_image("echo-env:latest") # or client = EchoEnv(base_url=f"{ENV_URL}")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could also use a separate snippet for the client and thenhfoptions to expose the options as tabs.

@sergiopaniego sergiopaniego marked this pull request as ready for review November 4, 2025 12:31
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Collaborator

@burtenshaw burtenshaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some small changes and check. Also, note that there are PRs on OpenEnv that impact this flow and be merged in the coming days. Maybe we should hold back?

docker run -d -p 8001:8001 registry.hf.space/openenv-echo-env:latest
```
![open_env_launch_docker](https://huggingface.co/datasets/trl-lib/documentation-images/resolve/main/open_env_launch_docker.png)
2. **Local Python process**: Launch the environment directly using Uvicorn.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The user will need to know to be in the OpenEnv repo for this to work.


Example:
```bash
docker run -d -p 8001:8001 registry.hf.space/openenv-echo-env:latest
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure that this port mapping will work because the env doesn't use 8001, it uses 8000.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8000 is for vLLM in the snippets we provide 🤔

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for the late reply. I meant that the internal port in the mapping needs to match what the container is using (8000). the external post can be changed to match the host network.

```
Alternatively, you can manually start the Echo environment in a Docker container before running the training.
In this case, initialize the client with
Copy link
Collaborator

@burtenshaw burtenshaw Nov 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should the start docker snippet should come before the change EchoEnv change.

```bash
# Launch the Echo environment
docker run -d -p 8001:8001 registry.hf.space/openenv-echo-env:latest
Copy link
Collaborator

@burtenshaw burtenshaw Nov 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as above, I think we should double check this port mapping.

@sergiopaniego
Copy link
Member Author

Updated!

Just some small changes and check. Also, note that there are PRs on OpenEnv that impact this flow and be merged in the coming days. Maybe we should hold back?

Since this belongs to the Experimental section, I assume it's expected to be updated frequently.
The PR we're waiting for is this one, right? Are there any others?

Copy link
Member

@qgallouedec qgallouedec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I'm mostly relying on you for this part, so feel free to make updates whenever you think it makes sense

@sergiopaniego sergiopaniego merged commit 810daa2 into main Nov 5, 2025
11 checks passed
@sergiopaniego sergiopaniego deleted the openenv-docs-improvement branch November 5, 2025 10:55
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.

5 participants