diff --git a/README.md b/README.md index 8e80cd9792c..f8fe9ce8de2 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/fern/versions/latest/pages/about/ecosystem.mdx b/fern/versions/latest/pages/about/ecosystem.mdx index 581d51864d8..45a5d40bfed 100644 --- a/fern/versions/latest/pages/about/ecosystem.mdx +++ b/fern/versions/latest/pages/about/ecosystem.mdx @@ -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)** diff --git a/responses_api_agents/harbor_agent/README.md b/responses_api_agents/harbor_agent/README.md index 0eabfbd95ce..a8d47bf038b 100644 --- a/responses_api_agents/harbor_agent/README.md +++ b/responses_api_agents/harbor_agent/README.md @@ -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. diff --git a/responses_api_agents/harbor_agent/app.py b/responses_api_agents/harbor_agent/app.py index 979ea6099d7..3014b6027a8 100644 --- a/responses_api_agents/harbor_agent/app.py +++ b/responses_api_agents/harbor_agent/app.py @@ -14,6 +14,7 @@ # limitations under the License. import asyncio import json +import logging import re import sys from asyncio import Semaphore @@ -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 @@ -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() diff --git a/responses_api_agents/harbor_agent/tests/test_app.py b/responses_api_agents/harbor_agent/tests/test_app.py index b9b5df4d6e1..8ea5e94dc4f 100644 --- a/responses_api_agents/harbor_agent/tests/test_app.py +++ b/responses_api_agents/harbor_agent/tests/test_app.py @@ -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 diff --git a/responses_api_agents/harbor_agent_general/README.md b/responses_api_agents/harbor_agent_general/README.md index 1218556094c..92ade5ca9ac 100644 --- a/responses_api_agents/harbor_agent_general/README.md +++ b/responses_api_agents/harbor_agent_general/README.md @@ -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) diff --git a/responses_api_agents/harbor_agent_general/app.py b/responses_api_agents/harbor_agent_general/app.py index 94f342b1dad..5770dd1124a 100644 --- a/responses_api_agents/harbor_agent_general/app.py +++ b/responses_api_agents/harbor_agent_general/app.py @@ -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.""" diff --git a/responses_api_agents/harbor_agent_general/tests/test_app.py b/responses_api_agents/harbor_agent_general/tests/test_app.py index 8bb4a1de763..cf486e3cc97 100644 --- a/responses_api_agents/harbor_agent_general/tests/test_app.py +++ b/responses_api_agents/harbor_agent_general/tests/test_app.py @@ -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