Skip to content

Conversation

@albertvillanova
Copy link
Member

Add support for testing experimental features.

This PR introduces a minimal testing workflow for the new experimental submodule:

  • Default behavior unchanged: pytest and make test now exclude experimental tests automatically via addopts = ["-k", "not experimental"] in pyproject.toml
  • New target: make test_experimental: runs only the experimental tests
  • Directory structure: All tests for features under the trl.experimental namespace should be placed in the directory:
    • tests/experimental/

This setup keeps CI fast and stable (running only the main test suite) while making it easy for contributors to run experimental tests locally (or in a future separate CI job).

Follow-up to:

@HuggingFaceDocBuilderDev

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.

@qgallouedec
Copy link
Member

I initially thought that a marker would be more suitable, but the subdirectory solution in test is also good IMO, as it allows the codebases to remain truly separate.

Copy link
Member

@qgallouedec qgallouedec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@albertvillanova albertvillanova merged commit 5139af3 into huggingface:main Sep 16, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants