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
1 change: 1 addition & 0 deletions .github/unittest/llm/scripts_llm/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ dependencies:
- transformers
- datasets
- vllm
- mcp
14 changes: 14 additions & 0 deletions .github/unittest/llm/scripts_llm/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,17 @@ python -m pip install -e . --no-build-isolation

# smoke test
python -c "import torchrl"

# Install MCP dependencies for tool execution tests
printf "* Installing MCP dependencies (uvx, Deno)\n"

# Install uvx (universal package runner)
pip install uvx

# Install Deno (required by mcp-run-python)
curl -fsSL https://deno.land/install.sh | sh
export PATH="$HOME/.deno/bin:$PATH"

# Verify installations
uvx --version || echo "Warning: uvx not installed"
deno --version || echo "Warning: Deno not installed"
1 change: 1 addition & 0 deletions docs/source/reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ API Reference
llms
modules
objectives
services
trainers
utils
config
5 changes: 4 additions & 1 deletion docs/source/reference/llms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,9 @@ Tools are usually implemented as transforms, and appended to a base environment
such as :class:`~torchrl.envs.llm.ChatEnv`.

An example of a tool transform is the :class:`~torchrl.envs.llm.transforms.PythonInterpreter` transform, which is used
to execute Python code in the context of the LLM.
to execute Python code in the context of the LLM. The PythonInterpreter can optionally use a shared
:class:`~torchrl.envs.llm.transforms.PythonExecutorService` for efficient resource usage across multiple environments.
See :ref:`ref_services` for more details on the service registry system.

>>> from torchrl.envs.llm.transforms import PythonInterpreter
>>> from torchrl.envs.llm import ChatEnv
Expand Down Expand Up @@ -1141,6 +1143,7 @@ By following these design principles, reward transforms can be effectively integ
KLRewardTransform
MCPToolTransform
PolicyVersion
PythonExecutorService
PythonInterpreter
RayDataLoadingPrimer
RetrieveKL
Expand Down
Loading
Loading