Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ We're excited about contributions that expand NeMo Gym's capabilities and improv
git clone [email protected]:NVIDIA-NeMo/Gym.git
cd Gym
curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.local/bin/env
export PATH=$HOME/.local/bin/env/bin:$PATH # or
Copy link
Contributor

Choose a reason for hiding this comment

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

can we avoid this temporary environment variable export? and also why did the source not work for you?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So the issue here is that for the newest version of uv, they changed the way the tool is installed, now I don't see a $HOME/.local/bin/env anymore, instead the tool is installed as uv and uvx in /home/ffrujeri/.local/bin/

(nemo-gym) ffrujeri@40cec8e-lcedt:~/nemo-gym$ which uv
/home/ffrujeri/.local/bin/uv

# echo 'export PATH=$HOME/.local/bin/env/bin:$PATH' >> ~/.bashrc
uv venv --python 3.12
source .venv/bin/activate
uv sync --extra dev --group docs
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ cd Gym

# Install dependencies
curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.local/bin/env
export PATH=$HOME/.local/bin/env/bin:$PATH # or
# echo 'export PATH=$HOME/.local/bin/env/bin:$PATH' >> ~/.bashrc
uv venv --python 3.12 && source .venv/bin/activate
uv sync --extra dev --group docs

Expand Down Expand Up @@ -59,7 +60,7 @@ python responses_api_agents/simple_agent/client.py
**Terminal 2** (keep servers running in Terminal 1):
```bash
# Create a simple dataset with one query
echo '{"responses_create_params":{"input":[{"role":"developer","content":"You are a helpful assistant."},{"role":"user","content":"What is the weather in Seattle?"}]}}' > weather_query.jsonl
echo '{"responses_create_params":{"input":[{"role":"developer","content":"You are a helpful assistant."},{"role":"user","content":"What is the weather in Seattle?"}],"tools":[{"type":"function","name":"get_weather","description":"","parameters":{"type":"object","properties":{"city":{"type":"string","description":""}},"required":["city"],"additionalProperties":false},"strict":true}]}}' > weather_query.jsonl

# Collect verified rollouts
ng_collect_rollouts \
Expand Down
3 changes: 2 additions & 1 deletion docs/get-started/setup-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ cd Gym

# Install UV (Python package manager)
curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.local/bin/env
export PATH=$HOME/.local/bin/env/bin:$PATH # or
# echo 'export PATH=$HOME/.local/bin/env/bin:$PATH' >> ~/.bashrc

# Create virtual environment
uv venv --python 3.12
Expand Down
7 changes: 4 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# NeMo Gym Documentation

NeMo Gym is a framework for building reinforcement learning (RL) training environments large language models (LLMs). Gym provides training environment development scaffolding and training environment patterns such as multi-step, multi-turn, and user modeling scenarios.
NeMo Gym is a framework for building reinforcement learning (RL) training environments for large language models (LLMs). Gym provides training environment development scaffolding and training environment patterns such as multi-step, multi-turn, and user modeling scenarios.

At the core of NeMo Gym are three server concepts: **Responses API Model servers** are model endpoints, **Resources servers** contain tool implementations and verification logic, and **Response API Agent servers** orchestrate the interaction between models and resources.

Expand All @@ -21,7 +21,8 @@ cd Gym

# Install UV if not already available
curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.local/bin/env
export PATH=$HOME/.local/bin/env/bin:$PATH # or
# echo 'export PATH=$HOME/.local/bin/env/bin:$PATH' >> ~/.bashrc

# Create a virtual environment and install Gym
uv venv --python 3.12 && source .venv/bin/activate
Expand Down Expand Up @@ -64,7 +65,7 @@ python responses_api_agents/simple_agent/client.py

```bash
# Create a simple dataset with one query
echo '{"responses_create_params":{"input":[{"role":"developer","content":"You are a helpful assistant."},{"role":"user","content":"What is the weather in Seattle?"}]}}' > weather_query.jsonl
echo '{"responses_create_params":{"input":[{"role":"developer","content":"You are a helpful assistant."},{"role":"user","content":"What is the weather in Seattle?"}],"tools":[{"type":"function","name":"get_weather","description":"","parameters":{"type":"object","properties":{"city":{"type":"string","description":""}},"required":["city"],"additionalProperties":false},"strict":true}]}}' > weather_query.jsonl

# Collect verified rollouts
ng_collect_rollouts \
Expand Down
4 changes: 4 additions & 0 deletions nemo_gym/rollout_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,7 @@ def collect_rollouts(): # pragma: no cover
rch = RolloutCollectionHelper()

asyncio.run(rch.run_from_config(config))


if __name__ == "__main__":
Copy link
Contributor

Choose a reason for hiding this comment

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

does ng_collect_rollouts not work? is the command not discoverable? why do we need this section here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So, the entry points for scripts is mainly when we are trying to launch debug.py I was thinking and there is no harm on also giving this entry point, is there?

collect_rollouts()
1 change: 1 addition & 0 deletions responses_api_agents/simple_agent/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"content": "You are a helpful personal assistant that aims to be helpful and reduce any pain points the user has.",
},
{"role": "user", "content": "going out in sf tn"},
# {"role": "user", "content": "What is the weather in San Francisco?"}, # If you want to force the weather tool call, replace the above user query with this one
],
tools=[
{
Expand Down