Skip to content
Merged
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ If you're scoring model outputs with a stateless check and don't need scale or t
NeMo Gym is a component of [NVIDIA NeMo](https://docs.nvidia.com/nemo/gym/main/about/ecosystem#related-nemo-libraries), a GPU-accelerated platform for training generative AI models and optimizing AI agents. NeMo Gym is integrated with the broader agentic ecosystem - see the [Ecosystem](https://docs.nvidia.com/nemo/gym/main/about/ecosystem) page for more details.

**Environment Libraries:** Seamlessly combine environments and benchmarks from other libraries alongside NeMo Gym environments. Examples:
[Aviary](https://github.com/NVIDIA-NeMo/Gym/tree/main/resources_servers/aviary) • [Harbor](https://github.com/NVIDIA-NeMo/Gym/tree/main/responses_api_agents/harbor_agent) • [OpenEnv](https://github.com/NVIDIA-NeMo/Gym/tree/main/resources_servers/openenv) • [Reasoning Gym](https://github.com/NVIDIA-NeMo/Gym/tree/main/resources_servers/reasoning_gym) • [Verifiers](https://github.com/NVIDIA-NeMo/Gym/tree/main/responses_api_agents/verifiers_agent)
[Aviary](https://github.com/NVIDIA-NeMo/Gym/tree/main/resources_servers/aviary) • [Harbor](https://github.com/NVIDIA-NeMo/Gym/tree/main/environment_servers/harbor) • [OpenEnv](https://github.com/NVIDIA-NeMo/Gym/tree/main/resources_servers/openenv) • [Reasoning Gym](https://github.com/NVIDIA-NeMo/Gym/tree/main/resources_servers/reasoning_gym) • [Verifiers](https://github.com/NVIDIA-NeMo/Gym/tree/main/responses_api_agents/verifiers_agent)

**Training Framework Libraries:** Use environments for SFT and RL training.
[NeMo RL](https://docs.nvidia.com/nemo/gym/tutorials/training-tutorials/nemo-rl-grpo) • [Unsloth](https://docs.nvidia.com/nemo/gym/tutorials/training-tutorials/unsloth) • [VeRL](https://docs.nvidia.com/nemo/gym/tutorials/training-tutorials)
Expand Down
2 changes: 1 addition & 1 deletion fern/versions/latest/pages/about/ecosystem.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ NVIDIA NeMo is a GPU-accelerated platform for training generative AI models and
Seamlessly combine environments and benchmarks from other libraries alongside NeMo Gym environments, with access to over 1,000 community-contributed environments across integrated libraries.

- **[Aviary](https://github.com/NVIDIA-NeMo/Gym/tree/main/resources_servers/aviary)**
- **[Harbor](https://github.com/NVIDIA-NeMo/Gym/tree/main/responses_api_agents/harbor_agent)**
- **[Harbor](https://github.com/NVIDIA-NeMo/Gym/tree/main/environment_servers/harbor)**
- **[OpenEnv](https://github.com/NVIDIA-NeMo/Gym/tree/main/resources_servers/openenv)**
- **[Reasoning Gym](https://github.com/NVIDIA-NeMo/Gym/tree/main/resources_servers/reasoning_gym)**
- **[Verifiers](https://github.com/NVIDIA-NeMo/Gym/tree/main/responses_api_agents/verifiers_agent)**
Expand Down
10 changes: 10 additions & 0 deletions responses_api_agents/harbor_agent/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Harbor Agent for NeMo Gym

> [!warning]
> **Deprecated.** This agent is superseded by the Harbor task format, where Harbor tasks run through the Harbor
> environment server with NeMo Gym's own sandboxed harnesses and the `harbor_oracle` agent, with no Harbor
> dependency. The built-in benchmarks that still run through this agent (biomnibench_da, biomysterybench,
> bixbench_hypothesis, genebench_pro, labbench2_pdf, legal_agent_bench, openthoughts_tblite and skillsbench) will be
> migrated to the
> [`harbor` environment server](https://github.com/NVIDIA-NeMo/Gym/tree/main/environment_servers/harbor); no action is
> needed from you yet, and they keep working as they are. New work should use the `harbor` environment server, whose
> README links to its documentation.

This agent integrates [Harbor](https://github.com/laude-institute/harbor) into NeMo Gym.
It runs Harbor agents (e.g., `terminus-2`) in Harbor-managed environments and returns NeMo Gym-compatible outputs.

Expand Down
9 changes: 9 additions & 0 deletions responses_api_agents/harbor_agent/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# limitations under the License.
import asyncio
import json
import logging
import re
import sys
from asyncio import Semaphore
Expand Down Expand Up @@ -46,6 +47,9 @@
from responses_api_agents.harbor_agent.utils import HarborAgentUtils


LOGGER = logging.getLogger(__name__)


class HarborDatasetSourceConfig(BaseModel):
local_dataset_path: Optional[str] = None
dataset_name: Optional[str] = None
Expand Down Expand Up @@ -230,6 +234,11 @@ class HarborAgent(SimpleResponsesAPIAgent):

def model_post_init(self, __context: Any) -> None:
self.sem = Semaphore(self.config.concurrency)
LOGGER.warning(
"responses_api_agents/harbor_agent is deprecated. The built-in benchmarks that use it will be migrated to "
"the harbor environment server (environment_servers/harbor, see its README.md); no action is needed "
"from you yet. New work should use the harbor environment server."
)

def setup_webserver(self) -> FastAPI:
app = FastAPI()
Expand Down
17 changes: 17 additions & 0 deletions responses_api_agents/harbor_agent/tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -914,3 +914,20 @@ async def test_aclose_closes_and_clears_http_client(self) -> None:
# Idempotent: a second close is a no-op (no underlying client to touch).
await llm.aclose()
client.aclose.assert_awaited_once()


def test_startup_logs_the_deprecation_notice(caplog) -> None:
"""The server says on startup that it is deprecated, where its replacement lives, and that users need not act yet."""
server = _make_server()
with caplog.at_level("WARNING", logger="responses_api_agents.harbor_agent.app"):
server.model_post_init(None)
notices = {record.getMessage() for record in caplog.records if "deprecated" in record.getMessage()}
assert len(notices) == 1
(notice,) = notices
assert "responses_api_agents/harbor_agent is deprecated" in notice
assert "environment_servers/harbor" in notice
# The notice names the repo path, not a docs URL, so it does not break when the docs pages move.
assert "docs.nvidia.com" not in notice
# Users of the built-in benchmarks did not pick this agent, so the notice says no action is needed yet.
assert "no action is needed" in notice
assert server.sem is not None
10 changes: 10 additions & 0 deletions responses_api_agents/harbor_agent_general/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Harbor Agent for NeMo Gym

> [!warning]
> **Deprecated.** This agent is superseded by the Harbor task format, where Harbor tasks run through the Harbor
> environment server with NeMo Gym's own sandboxed harnesses and the `harbor_oracle` agent, with no Harbor
> dependency. The built-in benchmarks that still run through this agent (biomnibench_da, biomysterybench,
> bixbench_hypothesis, genebench_pro, labbench2_pdf, legal_agent_bench, openthoughts_tblite and skillsbench) will be
> migrated to the
> [`harbor` environment server](https://github.com/NVIDIA-NeMo/Gym/tree/main/environment_servers/harbor); no action is
> needed from you yet, and they keep working as they are. New work should use the `harbor` environment server, whose
> README links to its documentation.

This agent integrates the [Harbor Framework](https://www.harborframework.com/) into NeMo Gym.
The rollouts are compeletely owned by Harbor and NeMo Gym acts as the orchestrator,
converting the [Agent Trajectory Format](https://www.harborframework.com/docs/agents/trajectory-format) (ATIF)
Expand Down
5 changes: 5 additions & 0 deletions responses_api_agents/harbor_agent_general/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,11 @@ def model_post_init(self, context) -> None:
global_config = get_global_config_dict()
self._sem = asyncio.Semaphore(global_config.get(NUM_SAMPLES_IN_PARALLEL_KEY_NAME) or 1)
self._worker_http_config = GlobalAIOHTTPAsyncClientConfig.model_validate(global_config)
logger.warning(
"responses_api_agents/harbor_agent_general is deprecated. The built-in benchmarks that use it will be migrated to "
"the harbor environment server (environment_servers/harbor, see its README.md); no action is needed "
"from you yet. New work should use the harbor environment server."
)

def _configure_job_for_run(self, job_config: JobConfig, body: HarborRunRequest) -> None:
"""Customize a request's copied job without modifying the shared template."""
Expand Down
15 changes: 15 additions & 0 deletions responses_api_agents/harbor_agent_general/tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,3 +628,18 @@ async def test_a_failed_trial_names_the_phase_it_was_in(tmp_path, monkeypatch, r
message = str(raised.value)
assert message.startswith(f"[sandbox phase={phase} ")
assert " reason=SandboxApiException] Harbor trial failed with SandboxApiException: sandbox ended" in message


def test_startup_logs_the_deprecation_notice(agent: HarborAgent, caplog: pytest.LogCaptureFixture) -> None:
"""The server says on startup that it is deprecated, where its replacement lives, and that users need not act yet."""
with caplog.at_level("WARNING", logger="responses_api_agents.harbor_agent_general.app"):
agent.model_post_init(None)
notices = {record.getMessage() for record in caplog.records if "deprecated" in record.getMessage()}
assert len(notices) == 1
(notice,) = notices
assert "responses_api_agents/harbor_agent_general is deprecated" in notice
assert "environment_servers/harbor" in notice
# The notice names the repo path, not a docs URL, so it does not break when the docs pages move.
assert "docs.nvidia.com" not in notice
# Users of the built-in benchmarks did not pick this agent, so the notice says no action is needed yet.
assert "no action is needed" in notice
Loading