-
Notifications
You must be signed in to change notification settings - Fork 615
feat: nemo gym integration #1053
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
Closed
Closed
Changes from 17 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
c8bd393
first nemo gym port
eligotts 25152e6
nemo gym adapter with lots of examples
eligotts cf4cc8f
ty
eligotts ba30931
reorganize
eligotts c1eadaf
draft
cmunley1 a8e5238
updates
cmunley1 682c720
rename
cmunley1 ede6284
tidy
cmunley1 73e9f0f
updates
cmunley1 3acac67
readme
cmunley1 893bbcc
readme
cmunley1 51f4bd1
drop some args
cmunley1 6c566fe
rename nemo to nemo_gym
cmunley1 fb5c918
add more env examples
cmunley1 757c2ff
revert endpoints
cmunley1 7647929
skip nemo_gym parent dir in tests, remove python path war, cache agen…
cmunley1 8145b83
import top and comment
cmunley1 d0cb639
multi endpoint support
cmunley1 bb22743
docs
cmunley1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
environments/nemo_gym/nemo_gym_arc_agi/nemo_gym_arc_agi.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| from typing import Any | ||
|
|
||
| import verifiers as vf | ||
| from verifiers.envs.integrations.nemo_gym import ( | ||
| NemoGymEnv, | ||
| _build_dataset, | ||
| _resolve_gym_config, | ||
| ) | ||
|
|
||
|
|
||
| def load_environment( | ||
| dataset_path: str | None = None, | ||
| **kwargs: Any, | ||
| ) -> vf.Environment: | ||
| dataset, _ = _build_dataset("arc_agi", "example", dataset_path=dataset_path) | ||
| return NemoGymEnv( | ||
| gym_configs=[_resolve_gym_config("arc_agi")], | ||
| dataset=dataset, | ||
| **kwargs, | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| [project] | ||
| name = "nemo-gym-arc-agi" | ||
| description = "NeMo Gym ARC AGI 1 and 2 environment" | ||
| tags = ["nemo-gym", "knowledge", "single-turn"] | ||
| version = "0.1.0" | ||
| requires-python = ">=3.12" | ||
| dependencies = [ | ||
| "verifiers>=0.1.11.dev1", | ||
| "nemo-gym>=0.2.0", | ||
| ] | ||
|
|
||
| [build-system] | ||
| requires = ["hatchling"] | ||
| build-backend = "hatchling.build" | ||
|
|
||
| [tool.hatch.build] | ||
| include = ["nemo_gym_arc_agi.py", "pyproject.toml"] | ||
|
|
||
| [tool.verifiers.eval] | ||
| num_examples = 5 | ||
| rollouts_per_example = 1 |
20 changes: 20 additions & 0 deletions
20
environments/nemo_gym/nemo_gym_code_gen/nemo_gym_code_gen.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| from typing import Any | ||
|
|
||
| import verifiers as vf | ||
| from verifiers.envs.integrations.nemo_gym import ( | ||
| NemoGymEnv, | ||
| _build_dataset, | ||
| _resolve_gym_config, | ||
| ) | ||
|
|
||
|
|
||
| def load_environment( | ||
| dataset_path: str | None = None, | ||
| **kwargs: Any, | ||
| ) -> vf.Environment: | ||
| dataset, _ = _build_dataset("code_gen", "example", dataset_path=dataset_path) | ||
| return NemoGymEnv( | ||
| gym_configs=[_resolve_gym_config("code_gen")], | ||
| dataset=dataset, | ||
| **kwargs, | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| [project] | ||
| name = "nemo-gym-code-gen" | ||
| description = "NeMo Gym code generation environment" | ||
| tags = ["nemo-gym"] | ||
| version = "0.1.0" | ||
| requires-python = ">=3.12" | ||
| dependencies = [ | ||
| "verifiers>=0.1.11.dev1", | ||
| "nemo-gym>=0.2.0", | ||
| ] | ||
|
|
||
| [build-system] | ||
| requires = ["hatchling"] | ||
| build-backend = "hatchling.build" | ||
|
|
||
| [tool.hatch.build] | ||
| include = ["nemo_gym_code_gen.py", "pyproject.toml"] | ||
|
|
||
| [tool.verifiers.eval] | ||
| num_examples = 5 | ||
| rollouts_per_example = 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| from typing import Any | ||
|
|
||
| import verifiers as vf | ||
| from verifiers.envs.integrations.nemo_gym import ( | ||
| NemoGymEnv, | ||
| _build_dataset, | ||
| _resolve_gym_config, | ||
| ) | ||
|
|
||
|
|
||
| def load_environment( | ||
| dataset_path: str | None = None, | ||
| **kwargs: Any, | ||
| ) -> vf.Environment: | ||
| dataset, _ = _build_dataset("mcqa", "example", dataset_path=dataset_path) | ||
| return NemoGymEnv( | ||
| gym_configs=[_resolve_gym_config("mcqa")], | ||
| dataset=dataset, | ||
| **kwargs, | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| [project] | ||
| name = "nemo-gym-mcqa" | ||
| description = "NeMo Gym mcqa environment" | ||
| tags = ["nemo-gym"] | ||
| version = "0.1.0" | ||
| requires-python = ">=3.12" | ||
| dependencies = [ | ||
| "verifiers>=0.1.11.dev1", | ||
| "nemo-gym>=0.2.0", | ||
| ] | ||
|
|
||
| [build-system] | ||
| requires = ["hatchling"] | ||
| build-backend = "hatchling.build" | ||
|
|
||
| [tool.hatch.build] | ||
| include = ["nemo_gym_mcqa.py", "pyproject.toml"] | ||
|
|
||
| [tool.verifiers.eval] | ||
| num_examples = 5 | ||
| rollouts_per_example = 1 |
20 changes: 20 additions & 0 deletions
20
environments/nemo_gym/nemo_gym_reasoning_gym/nemo_gym_reasoning_gym.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| from typing import Any | ||
|
|
||
| import verifiers as vf | ||
| from verifiers.envs.integrations.nemo_gym import ( | ||
| NemoGymEnv, | ||
| _build_dataset, | ||
| _resolve_gym_config, | ||
| ) | ||
|
|
||
|
|
||
| def load_environment( | ||
| dataset_path: str | None = None, | ||
| **kwargs: Any, | ||
| ) -> vf.Environment: | ||
| dataset, _ = _build_dataset("reasoning_gym", "example", dataset_path=dataset_path) | ||
| return NemoGymEnv( | ||
| gym_configs=[_resolve_gym_config("reasoning_gym")], | ||
| dataset=dataset, | ||
| **kwargs, | ||
| ) |
21 changes: 21 additions & 0 deletions
21
environments/nemo_gym/nemo_gym_reasoning_gym/pyproject.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| [project] | ||
| name = "nemo-gym-reasoning-gym" | ||
| description = "NeMo Gym Reasoning Gym simple agent environment" | ||
| tags = ["nemo-gym"] | ||
| version = "0.1.0" | ||
| requires-python = ">=3.12" | ||
| dependencies = [ | ||
| "verifiers>=0.1.11.dev1", | ||
| "nemo-gym>=0.2.0", | ||
| ] | ||
|
|
||
| [build-system] | ||
| requires = ["hatchling"] | ||
| build-backend = "hatchling.build" | ||
|
|
||
| [tool.hatch.build] | ||
| include = ["nemo_gym_reasoning_gym.py", "pyproject.toml"] | ||
|
|
||
| [tool.verifiers.eval] | ||
| num_examples = 5 | ||
| rollouts_per_example = 1 |
20 changes: 20 additions & 0 deletions
20
..._gym/nemo_gym_reasoning_gym_parallel_thinking/nemo_gym_reasoning_gym_parallel_thinking.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| from typing import Any | ||
|
|
||
| import verifiers as vf | ||
| from verifiers.envs.integrations.nemo_gym import ( | ||
| NemoGymEnv, | ||
| _build_dataset, | ||
| _resolve_gym_config, | ||
| ) | ||
|
|
||
|
|
||
| def load_environment( | ||
| dataset_path: str | None = None, | ||
| **kwargs: Any, | ||
| ) -> vf.Environment: | ||
| dataset, _ = _build_dataset("reasoning_gym", "example", dataset_path=dataset_path) | ||
| return NemoGymEnv( | ||
| gym_configs=[_resolve_gym_config("reasoning_gym", "parallel_thinking_agent")], | ||
| dataset=dataset, | ||
| **kwargs, | ||
| ) |
21 changes: 21 additions & 0 deletions
21
environments/nemo_gym/nemo_gym_reasoning_gym_parallel_thinking/pyproject.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| [project] | ||
| name = "nemo-gym-reasoning-gym-parallel-thinking" | ||
| description = "NeMo Gym Reasoning Gym environment with LangGraph parallel thinking agent" | ||
| tags = ["nemo-gym"] | ||
| version = "0.1.0" | ||
| requires-python = ">=3.12" | ||
| dependencies = [ | ||
| "verifiers>=0.1.11.dev1", | ||
| "nemo-gym>=0.2.0", | ||
| ] | ||
|
|
||
| [build-system] | ||
| requires = ["hatchling"] | ||
| build-backend = "hatchling.build" | ||
|
|
||
| [tool.hatch.build] | ||
| include = ["nemo_gym_reasoning_gym_parallel_thinking.py", "pyproject.toml"] | ||
|
|
||
| [tool.verifiers.eval] | ||
| num_examples = 5 | ||
| rollouts_per_example = 1 |
20 changes: 20 additions & 0 deletions
20
environments/nemo_gym/nemo_gym_reasoning_gym_reflection/nemo_gym_reasoning_gym_reflection.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| from typing import Any | ||
|
|
||
| import verifiers as vf | ||
| from verifiers.envs.integrations.nemo_gym import ( | ||
| NemoGymEnv, | ||
| _build_dataset, | ||
| _resolve_gym_config, | ||
| ) | ||
|
|
||
|
|
||
| def load_environment( | ||
| dataset_path: str | None = None, | ||
| **kwargs: Any, | ||
| ) -> vf.Environment: | ||
| dataset, _ = _build_dataset("reasoning_gym", "example", dataset_path=dataset_path) | ||
| return NemoGymEnv( | ||
| gym_configs=[_resolve_gym_config("reasoning_gym", "reflection_agent")], | ||
| dataset=dataset, | ||
| **kwargs, | ||
| ) |
21 changes: 21 additions & 0 deletions
21
environments/nemo_gym/nemo_gym_reasoning_gym_reflection/pyproject.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| [project] | ||
| name = "nemo-gym-reasoning-gym-reflection" | ||
| description = "NeMo Gym Reasoning Gym environment with LangGraph reflection agent" | ||
| tags = ["nemo-gym"] | ||
| version = "0.1.0" | ||
| requires-python = ">=3.12" | ||
| dependencies = [ | ||
| "verifiers>=0.1.11.dev1", | ||
| "nemo-gym>=0.2.0", | ||
| ] | ||
|
|
||
| [build-system] | ||
| requires = ["hatchling"] | ||
| build-backend = "hatchling.build" | ||
|
|
||
| [tool.hatch.build] | ||
| include = ["nemo_gym_reasoning_gym_reflection.py", "pyproject.toml"] | ||
|
|
||
| [tool.verifiers.eval] | ||
| num_examples = 5 | ||
| rollouts_per_example = 1 |
24 changes: 24 additions & 0 deletions
24
environments/nemo_gym/nemo_gym_structured_outputs/nemo_gym_structured_outputs.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| from typing import Any | ||
|
|
||
| import verifiers as vf | ||
| from verifiers.envs.integrations.nemo_gym import ( | ||
| NemoGymEnv, | ||
| _build_dataset, | ||
| _resolve_gym_config, | ||
| ) | ||
|
|
||
|
|
||
| def load_environment( | ||
| dataset_path: str | None = None, | ||
| **kwargs: Any, | ||
| ) -> vf.Environment: | ||
| dataset, _ = _build_dataset( | ||
| "structured_outputs", "example", dataset_path=dataset_path | ||
| ) | ||
| return NemoGymEnv( | ||
| gym_configs=[ | ||
| _resolve_gym_config("structured_outputs", "structured_outputs_json") | ||
| ], | ||
| dataset=dataset, | ||
| **kwargs, | ||
| ) |
21 changes: 21 additions & 0 deletions
21
environments/nemo_gym/nemo_gym_structured_outputs/pyproject.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| [project] | ||
| name = "nemo-gym-structured-outputs" | ||
| description = "NeMo Gym structured outputs environment" | ||
| tags = ["nemo-gym"] | ||
| version = "0.1.0" | ||
| requires-python = ">=3.12" | ||
| dependencies = [ | ||
| "verifiers>=0.1.11.dev1", | ||
| "nemo-gym>=0.2.0", | ||
| ] | ||
|
|
||
| [build-system] | ||
| requires = ["hatchling"] | ||
| build-backend = "hatchling.build" | ||
|
|
||
| [tool.hatch.build] | ||
| include = ["nemo_gym_structured_outputs.py", "pyproject.toml"] | ||
|
|
||
| [tool.verifiers.eval] | ||
| num_examples = 5 | ||
| rollouts_per_example = 1 |
22 changes: 22 additions & 0 deletions
22
environments/nemo_gym/nemo_gym_workplace_assistant/nemo_gym_workplace_assistant.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| from typing import Any | ||
|
|
||
| import verifiers as vf | ||
| from verifiers.envs.integrations.nemo_gym import ( | ||
| NemoGymEnv, | ||
| _build_dataset, | ||
| _resolve_gym_config, | ||
| ) | ||
|
|
||
|
|
||
| def load_environment( | ||
| dataset_path: str | None = None, | ||
| **kwargs: Any, | ||
| ) -> vf.Environment: | ||
| dataset, _ = _build_dataset( | ||
| "workplace_assistant", "example", dataset_path=dataset_path | ||
| ) | ||
| return NemoGymEnv( | ||
| gym_configs=[_resolve_gym_config("workplace_assistant")], | ||
| dataset=dataset, | ||
| **kwargs, | ||
| ) |
21 changes: 21 additions & 0 deletions
21
environments/nemo_gym/nemo_gym_workplace_assistant/pyproject.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| [project] | ||
| name = "nemo-gym-workplace-assistant" | ||
| description = "NeMo Gym workplace assistant environment" | ||
| tags = ["nemo-gym", "agent", "tools", "multi-turn"] | ||
| version = "0.1.0" | ||
| requires-python = ">=3.12" | ||
| dependencies = [ | ||
| "verifiers>=0.1.11.dev1", | ||
| "nemo-gym>=0.2.0", | ||
| ] | ||
|
|
||
| [build-system] | ||
| requires = ["hatchling"] | ||
| build-backend = "hatchling.build" | ||
|
|
||
| [tool.hatch.build] | ||
| include = ["nemo_gym_workplace_assistant.py", "pyproject.toml"] | ||
|
|
||
| [tool.verifiers.eval] | ||
| num_examples = 5 | ||
| rollouts_per_example = 1 |
20 changes: 20 additions & 0 deletions
20
environments/nemo_gym/nemo_gym_xlam_fc/nemo_gym_xlam_fc.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| from typing import Any | ||
|
|
||
| import verifiers as vf | ||
| from verifiers.envs.integrations.nemo_gym import ( | ||
| NemoGymEnv, | ||
| _build_dataset, | ||
| _resolve_gym_config, | ||
| ) | ||
|
|
||
|
|
||
| def load_environment( | ||
| dataset_path: str | None = None, | ||
| **kwargs: Any, | ||
| ) -> vf.Environment: | ||
| dataset, _ = _build_dataset("xlam_fc", "example", dataset_path=dataset_path) | ||
| return NemoGymEnv( | ||
| gym_configs=[_resolve_gym_config("xlam_fc")], | ||
| dataset=dataset, | ||
| **kwargs, | ||
| ) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.