Skip to content

Make the installed TRL skill discoverable - #6745

Open
DaoyuanLi2816 wants to merge 1 commit into
huggingface:mainfrom
DaoyuanLi2816:agent/discoverable-skill
Open

Make the installed TRL skill discoverable#6745
DaoyuanLi2816 wants to merge 1 commit into
huggingface:mainfrom
DaoyuanLi2816:agent/discoverable-skill

Conversation

@DaoyuanLi2816

@DaoyuanLi2816 DaoyuanLi2816 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Moves TRL's packaged skill to the installed-library convention at trl/.agents/skills/trl/SKILL.md, where generic dependency scanners can discover it without copying a stale snapshot.

The skill is rewritten around the Python API, dataset contracts, custom reward functions, and the settings that materially affect correctness or throughput. This also removes the per-library trl skills installer and its implementation/tests; standard training CLI commands remain unchanged.

The wheel and sdist both include the new skill path.

Fixes #6743

Before submitting

Validation:

  • 9 focused CLI and packaged-skill tests passed
  • Ruff check and format check passed for changed Python files
  • sdist and wheel built successfully
  • wheel contains trl/.agents/skills/trl/SKILL.md and no legacy trl/skills/ files
  • all Python API fields referenced by the skill were checked against current main

AI writing disclosure

  • No AI usage: the PR was written entirely by a human.
  • AI-assisted: some parts were suggested or improved by AI, but the PR was written and reviewed by a human.
  • AI-generated: the PR was mostly or fully generated by an AI tool.

Who can review?

Anyone in the community is free to review the PR once the tests have passed.


Note

Medium Risk
Removes a public CLI subcommand and Python APIs (trl.skills), which is a breaking change for anyone using trl skills; training CLIs and core library behavior are unchanged.

Overview
Packaged skill location and content — The wheel/sdist now ship trl/.agents/skills/**/* (via MANIFEST.in) instead of trl/skills/**/*.md. A single skill lives at trl/.agents/skills/trl/SKILL.md (name trl), focused on the Python API (trainers, dataset columns, GRPO rewards, throughput/correctness knobs) rather than the old CLI-centric trl-training skill.

Removed custom skills tooling — The entire trl/skills package (skills.py, cli.py), SkillsCommand, and trl skills list/install/uninstall flow are deleted. get_commands() no longer registers skills; ruff’s per-file ignore for trl/skills/cli.py is dropped.

Teststests/test_skills.py and tests/test_skills_cli.py are removed. tests/test_packaged_skill.py now asserts the installed-library skill path/metadata and that no skills CLI command is registered.

Reviewed by Cursor Bugbot for commit 211bb1f. Bugbot is set up for automated code reviews on this repo. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make TRL's skill discoverable from an install, and drop trl skills install

1 participant