Remove the experimental Harbor integration (superseded by OpenEnv) - #6948
Remove the experimental Harbor integration (superseded by OpenEnv)#6948adithya-s-k wants to merge 1 commit into
Conversation
Removes trl.experimental.harbor and everything that hung off it. Harbor support now lives in OpenEnv (huggingface/OpenEnv#1036) and is reached through the environment/harness surface rather than through a TRL-side integration, so keeping an in-tree copy means maintaining two paths to the same framework and having to say which one a reader should use. The in-tree path was also the more limited of the two. It supported Harbor's EXTERNAL agents only, because TRL had to drive generation turn-by-turn to capture the policy's tokens, logprobs and env mask -- which an opaque in-container agent cannot expose. OpenEnv's capture proxy does expose exactly that, so the installed agents that ship with Harbor become trainable there without being reimplemented. Removed: trl/experimental/harbor/{__init__,_env,_spec}.py examples/grpo_harbor/ (script plus the bash, jupyter and terminal_notes harnesses) tests/experimental/test_harbor.py is_harbor_available() in trl/import_utils.py, and require_harbor in tests/testing_utils.py (defined but never referenced by any test) the public trl[harbor] extra in pyproject.toml docs/source/harbor.md, its _toctree entry, and its rows in example_overview.md and grpo_trainer.md docs/source/openenv.md said 'Two further integrations' and now names only OpenReward. SECURITY.md is untouched: its 'Safe harbor' section is the legal term, not the framework.
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0729015. Configure here.
|
|
||
| ## Depends on | ||
|
|
||
| **[huggingface/OpenEnv#1036](https://github.com/huggingface/OpenEnv/pull/1036)**, which adds `envs/harbor_env` and the capture layer this example is built on. The PEP 723 header references it by git subdirectory, so the example is not installable until that lands. |
There was a problem hiding this comment.
Scaffolding file accidentally committed
Low Severity
examples/async_grpo_harbor/PR_DESCRIPTION.md is scaffolding that the file itself says to delete or leave untracked. The directory has no async_grpo_harbor.py and this removal PR does not add that example, so the leftover draft ships as an empty examples folder.
Reviewed by Cursor Bugbot for commit 0729015. Configure here.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0729015743
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| <!-- PR description for examples/async_grpo_harbor. Scaffolding — delete before pushing, or keep it | ||
| untracked. --> |
There was a problem hiding this comment.
Remove the tracked scaffold directory
Tracking this scaffold creates an examples/async_grpo_harbor directory even though no corresponding row is added to docs/source/example_overview.md. tests/test_examples_index.py::test_examples_index_matches_folders enumerates every example directory and therefore reports async_grpo_harbor in missing_rows, causing the test suite to fail; delete or keep this scaffold untracked, as its own comment instructs, or add the actual indexed example.
Useful? React with 👍 / 👎.


Removes
trl.experimental.harborand everything that hung off it (added in #6018).Harbor support now lives in OpenEnv — see huggingface/OpenEnv#1036 — and is reached through the environment/harness surface rather than a TRL-side integration. Keeping an in-tree copy means maintaining two paths to the same framework and having to explain which one a reader should use.
The in-tree path was also the more limited of the two. It supported Harbor's external agents only, because TRL had to drive generation turn-by-turn to capture the policy's tokens, logprobs and env mask — which an opaque in-container agent cannot expose. OpenEnv's capture proxy exposes exactly that, so the installed agents Harbor ships become trainable without being reimplemented. #6947 is the replacement example.
Removed
trl/experimental/harbor/__init__.py,_env.py,_spec.pyexamples/grpo_harbor/bash,jupyterandterminal_notesharnessestests/experimental/test_harbor.pytrl/import_utils.pyis_harbor_available()tests/testing_utils.pyrequire_harbor— defined but never referenced by any testpyproject.tomltrl[harbor]extraharbor.md, its_toctreeentry, and its rows inexample_overview.mdandgrpo_trainer.mddocs/source/openenv.mdsaid "Two further integrations" and now names only OpenReward.SECURITY.mdis deliberately untouched — its "Safe harbor" section is the legal term, not the framework.Note
This drops a public extra (
trl[harbor]), so it is a breaking change for anyone importingtrl.experimental.harbor. Happy to land it as a deprecation first if you'd prefer a release of warning.Note
Medium Risk
Breaking removal of a public optional extra and experimental API; core GRPO trainers are unchanged, but Harbor users must migrate to OpenEnv.
Overview
Removes the experimental
trl.experimental.harborintegration and everything tied to it:HarborSpec/HarborEnv, theexamples/grpo_harborGRPO script and custom harnesses,tests/experimental/test_harbor.py, thetrl[harbor]optional extra, andis_harbor_available/require_harbor. Harbor training is expected to go through OpenEnv instead of an in-process TRL path.Documentation drops
harbor.mdfrom the docs toctree and strips Harbor from the examples index, GRPO environment-integration table, andopenenv.md(OpenReward is now the only other namedenvironment_factoryintegration in that guide).Adds
examples/async_grpo_harbor/PR_DESCRIPTION.mdas scaffolding for a follow-up AsyncGRPO + OpenEnv Harbor example (capture proxy, loop-owning harnesses); the diff does not include the actualasync_grpo_harbor.pyscript.This is a breaking change for
pip install trl[harbor]andfrom trl.experimental.harbor import ....Reviewed by Cursor Bugbot for commit 0729015. Bugbot is set up for automated code reviews on this repo. Configure here.