Skip to content

[Core] Add RL-Kernel consistency metadata fingerprints - #18

Open
inaniloquentee wants to merge 2 commits into
rlk-mainfrom
feature/issue10-consistency-metadata
Open

[Core] Add RL-Kernel consistency metadata fingerprints#18
inaniloquentee wants to merge 2 commits into
rlk-mainfrom
feature/issue10-consistency-metadata

Conversation

@inaniloquentee

Copy link
Copy Markdown
Collaborator

Closes #10.

Summary

  • Add �ime.utils.consistency_metadata for compact rollout consistency fingerprints, active-token accounting, requested-vs-actual provenance, audit warnings, and strict failures.
  • Add Sample.consistency_metadata and carry metadata through Sample.to_dict/from_dict, default sample-to-train-data conversion, DP partition packaging, and batch-layout fingerprints.
  • Annotate default vLLM/custom-generate samples when RL-Kernel consistency mode is enabled, and record dynamic-sampling keep/drop decisions without changing behavior when consistency is off.
  • Add focused CPU tests for metadata schema, validation, provenance mismatch handling, zero-active-token reporting, Data Buffer preservation, rollout conversion integration, and Sample round-trip behavior.

Testing

  • pre-commit run --all-files --show-diff-on-failure --color=always passed.
  • python -m pytest tests/utils/test_consistency_metadata.py tests/utils/test_consistency_metadata_rollout_integration.py tests/test_sample.py -m unit passed: 31 tests.
  • python -m pytest tests/plugin_contracts/test_plugin_generate_contracts.py tests/plugin_contracts/test_plugin_rollout_contracts.py tests/plugin_contracts/test_plugin_path_loading_contracts.py passed: 24 tests.
  • python -m pytest tests/utils -m unit ran 135 selected tests: 133 passed, 2 failed in local vLLM argument tests because the installed/stubbed vLLM surface does not expose --vllm-tool-call-parser; this is unrelated to the consistency metadata changes.
  • python -m pytest tests/plugin_contracts/test_plugin_generate_contracts.py tests/plugin_contracts/test_plugin_rollout_contracts.py tests/plugin_contracts/test_plugin_path_loading_contracts.py tests/test_vllm_rollout.py -m unit showed 30 passed and 3 existing ests/test_vllm_rollout.py local failures unrelated to this PR.

AI assistance

Implemented with OpenAI Codex assistance; commit includes Co-authored-by: OpenAI Codex codex@openai.com and DCO signoff.

Co-authored-by: OpenAI Codex <codex@openai.com>
Signed-off-by: inaniloquentee <3051000145@qq.com>
@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5b5a873c-71c8-49d9-9ba2-8d3ae13bebbe

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/issue10-consistency-metadata

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant