Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 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 environments/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ This folder contains installable example environments that showcase common usage
- **ToolEnv (native function-calling)**
- **tool_test**: Validates parallel tool calls and checks exact tool usage via `ToolRubric` + custom reward.
- **wiki_search**: Multi-tool retrieval (search/view/read) with `ToolEnv`; final judgment combined via `RubricGroup` with a `JudgeRubric`.
- **nemo_workplace_assistant**: NeMo Gym resource-server adapter example with dynamic per-row tools, session seeding, and `/verify`-based rewards.

### Sandboxes
- **PythonEnv (ipython-style REPL)**
Expand Down
23 changes: 23 additions & 0 deletions environments/nemo_arc_agi/nemo_arc_agi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from typing import Any

import verifiers as vf
from verifiers.envs.integrations.nemo_gym_env import (
NemoGymEnv,
_build_dataset,
_reward_from_verify,
)


def load_environment(
dataset_split: str = "example",
**kwargs: Any,
) -> vf.Environment:
dataset, _ = _build_dataset(resource_server="arc_agi", dataset_split=dataset_split)
rubric = vf.Rubric(funcs=[_reward_from_verify], weights=[1.0])
return NemoGymEnv(
resource_server="arc_agi",
dataset=dataset,
rubric=rubric,
max_turns=1,
**kwargs,
)
24 changes: 24 additions & 0 deletions environments/nemo_arc_agi/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[project]
name = "nemo-arc-agi"
description = "NeMo Gym arc_agi resource server (ARC-AGI visual grid pattern matching)"
tags = ["nemo-gym", "knowledge", "single-turn", "sandbox"]
version = "0.1.0"
requires-python = ">=3.10"
dependencies = [
"verifiers>=0.1.11.dev1",
"nemo-gym @ https://test-files.pythonhosted.org/packages/c0/58/451a826009a0b206c932e1ebde3dcff2a8b31152c77133fdde7e5f7ccd90/nemo_gym-0.2.9892rc0-py3-none-any.whl",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build]
include = ["nemo_arc_agi.py", "pyproject.toml"]

[tool.hatch.metadata]
allow-direct-references = true

[tool.verifiers.eval]
num_examples = 5
rollouts_per_example = 1
30 changes: 30 additions & 0 deletions environments/nemo_code_gen/nemo_code_gen.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
from typing import Any

import verifiers as vf
from verifiers.envs.integrations.nemo_gym_env import (
NemoGymEnv,
_build_dataset,
_reward_from_verify,
)


def load_environment(
dataset_split: str = "example",
**kwargs: Any,
) -> vf.Environment:
dataset, _ = _build_dataset(resource_server="code_gen", dataset_split=dataset_split)
rubric = vf.Rubric(funcs=[_reward_from_verify], weights=[1.0])
return NemoGymEnv(
resource_server="code_gen",
dataset=dataset,
rubric=rubric,
max_turns=1,
config_overrides={
"domain": "coding",
"num_processes": 8,
"unit_test_timeout_secs": 10,
"debug": False,
},
extra_pip_packages=["numpy==2.2.6"],
**kwargs,
)
24 changes: 24 additions & 0 deletions environments/nemo_code_gen/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[project]
name = "nemo-code-gen"
description = "NeMo Gym code_gen resource server (competitive coding with Ray execution)"
tags = ["nemo-gym", "coding", "single-turn", "sandbox"]
version = "0.1.0"
requires-python = ">=3.10"
dependencies = [
"verifiers>=0.1.11.dev1",
"nemo-gym @ https://test-files.pythonhosted.org/packages/c0/58/451a826009a0b206c932e1ebde3dcff2a8b31152c77133fdde7e5f7ccd90/nemo_gym-0.2.9892rc0-py3-none-any.whl",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build]
include = ["nemo_code_gen.py", "pyproject.toml"]

[tool.hatch.metadata]
allow-direct-references = true

[tool.verifiers.eval]
num_examples = 5
rollouts_per_example = 1
26 changes: 26 additions & 0 deletions environments/nemo_example_multi_step/nemo_example_multi_step.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from typing import Any

import verifiers as vf
from verifiers.envs.integrations.nemo_gym_env import (
NemoGymEnv,
_build_dataset,
_reward_from_verify,
)


def load_environment(
dataset_split: str = "example",
max_turns: int = 8,
**kwargs: Any,
) -> vf.Environment:
dataset, _ = _build_dataset(
resource_server="example_multi_step", dataset_split=dataset_split
)
rubric = vf.Rubric(funcs=[_reward_from_verify], weights=[1.0])
return NemoGymEnv(
resource_server="example_multi_step",
dataset=dataset,
rubric=rubric,
max_turns=max_turns,
**kwargs,
)
24 changes: 24 additions & 0 deletions environments/nemo_example_multi_step/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[project]
name = "nemo-example-multi-step"
description = "NeMo Gym example_multi_step resource server (multi-tool synonym lookup)"
tags = ["nemo-gym", "agent", "tools", "multi-turn", "sandbox"]
version = "0.1.0"
requires-python = ">=3.10"
dependencies = [
"verifiers>=0.1.11.dev1",
"nemo-gym @ https://test-files.pythonhosted.org/packages/c0/58/451a826009a0b206c932e1ebde3dcff2a8b31152c77133fdde7e5f7ccd90/nemo_gym-0.2.9892rc0-py3-none-any.whl",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build]
include = ["nemo_example_multi_step.py", "pyproject.toml"]

[tool.hatch.metadata]
allow-direct-references = true

[tool.verifiers.eval]
num_examples = 5
rollouts_per_example = 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from typing import Any

import verifiers as vf
from verifiers.envs.integrations.nemo_gym_env import (
NemoGymEnv,
_build_dataset,
_reward_from_verify,
)


def load_environment(
dataset_split: str = "example",
max_turns: int = 4,
**kwargs: Any,
) -> vf.Environment:
dataset, _ = _build_dataset(
resource_server="example_single_tool_call", dataset_split=dataset_split
)
rubric = vf.Rubric(funcs=[_reward_from_verify], weights=[1.0])
return NemoGymEnv(
resource_server="example_single_tool_call",
dataset=dataset,
rubric=rubric,
max_turns=max_turns,
**kwargs,
)
24 changes: 24 additions & 0 deletions environments/nemo_example_single_tool_call/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[project]
name = "nemo-example-single-tool-call"
description = "NeMo Gym example_single_tool_call resource server (simple weather tool)"
tags = ["nemo-gym", "agent", "tools", "sandbox"]
version = "0.1.0"
requires-python = ">=3.10"
dependencies = [
"verifiers>=0.1.11.dev1",
"nemo-gym @ https://test-files.pythonhosted.org/packages/c0/58/451a826009a0b206c932e1ebde3dcff2a8b31152c77133fdde7e5f7ccd90/nemo_gym-0.2.9892rc0-py3-none-any.whl",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build]
include = ["nemo_example_single_tool_call.py", "pyproject.toml"]

[tool.hatch.metadata]
allow-direct-references = true

[tool.verifiers.eval]
num_examples = 5
rollouts_per_example = 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
from typing import Any

import verifiers as vf
from verifiers.envs.integrations.nemo_gym_env import (
NemoGymEnv,
_build_dataset,
_reward_from_verify,
)


def load_environment(
dataset_split: str = "example",
**kwargs: Any,
) -> vf.Environment:
dataset, _ = _build_dataset(
resource_server="instruction_following", dataset_split=dataset_split
)
rubric = vf.Rubric(funcs=[_reward_from_verify], weights=[1.0])
return NemoGymEnv(
resource_server="instruction_following",
dataset=dataset,
rubric=rubric,
max_turns=1,
extra_pip_packages=[
"git+https://github.com/abukharin-nv/verifiable-instructions.git",
"https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.8.0/en_core_web_sm-3.8.0-py3-none-any.whl",
],
**kwargs,
)
24 changes: 24 additions & 0 deletions environments/nemo_instruction_following/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[project]
name = "nemo-instruction-following"
description = "NeMo Gym instruction_following resource server (IFEval/IFBench instruction following)"
tags = ["nemo-gym", "instruction-following", "single-turn", "sandbox"]
version = "0.1.0"
requires-python = ">=3.10"
dependencies = [
"verifiers>=0.1.11.dev1",
"nemo-gym @ https://test-files.pythonhosted.org/packages/c0/58/451a826009a0b206c932e1ebde3dcff2a8b31152c77133fdde7e5f7ccd90/nemo_gym-0.2.9892rc0-py3-none-any.whl",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build]
include = ["nemo_instruction_following.py", "pyproject.toml"]

[tool.hatch.metadata]
allow-direct-references = true

[tool.verifiers.eval]
num_examples = 5
rollouts_per_example = 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from typing import Any

import verifiers as vf
from verifiers.envs.integrations.nemo_gym_env import (
NemoGymEnv,
_build_dataset,
_reward_from_verify,
)


def load_environment(
dataset_split: str = "example",
max_turns: int = 8,
**kwargs: Any,
) -> vf.Environment:
dataset, _ = _build_dataset(
resource_server="math_advanced_calculations", dataset_split=dataset_split
)
rubric = vf.Rubric(funcs=[_reward_from_verify], weights=[1.0])
return NemoGymEnv(
resource_server="math_advanced_calculations",
dataset=dataset,
rubric=rubric,
max_turns=max_turns,
**kwargs,
)
24 changes: 24 additions & 0 deletions environments/nemo_math_advanced_calculations/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[project]
name = "nemo-math-advanced-calculations"
description = "NeMo Gym math_advanced_calculations resource server (counter-intuitive calculator tools)"
tags = ["nemo-gym", "agent", "multi-turn", "sandbox"]
version = "0.1.0"
requires-python = ">=3.10"
dependencies = [
"verifiers>=0.1.11.dev1",
"nemo-gym @ https://test-files.pythonhosted.org/packages/c0/58/451a826009a0b206c932e1ebde3dcff2a8b31152c77133fdde7e5f7ccd90/nemo_gym-0.2.9892rc0-py3-none-any.whl",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build]
include = ["nemo_math_advanced_calculations.py", "pyproject.toml"]

[tool.hatch.metadata]
allow-direct-references = true

[tool.verifiers.eval]
num_examples = 5
rollouts_per_example = 1
28 changes: 28 additions & 0 deletions environments/nemo_math_with_code/nemo_math_with_code.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
from typing import Any

import verifiers as vf
from verifiers.envs.integrations.nemo_gym_env import (
NemoGymEnv,
_build_dataset,
_reward_from_verify,
)


def load_environment(
dataset_split: str = "example",
max_turns: int = 8,
**kwargs: Any,
) -> vf.Environment:
dataset, _ = _build_dataset(
resource_server="math_with_code", dataset_split=dataset_split
)
rubric = vf.Rubric(funcs=[_reward_from_verify], weights=[1.0])
return NemoGymEnv(
resource_server="math_with_code",
dataset=dataset,
rubric=rubric,
max_turns=max_turns,
config_overrides={"max_execution_time": 10},
extra_pip_packages=["numpy", "scipy", "pandas"],
**kwargs,
)
24 changes: 24 additions & 0 deletions environments/nemo_math_with_code/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[project]
name = "nemo-math-with-code"
description = "NeMo Gym math_with_code resource server (math with Python code execution)"
tags = ["nemo-gym", "math", "multi-turn", "sandbox"]
version = "0.1.0"
requires-python = ">=3.10"
dependencies = [
"verifiers>=0.1.11.dev1",
"nemo-gym @ https://test-files.pythonhosted.org/packages/c0/58/451a826009a0b206c932e1ebde3dcff2a8b31152c77133fdde7e5f7ccd90/nemo_gym-0.2.9892rc0-py3-none-any.whl",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build]
include = ["nemo_math_with_code.py", "pyproject.toml"]

[tool.hatch.metadata]
allow-direct-references = true

[tool.verifiers.eval]
num_examples = 5
rollouts_per_example = 1
Loading
Loading