Skip to content

[RL-Kernel] Add consistency audit harness#32

Open
inaniloquentee wants to merge 1 commit into
feature/issue21-linear-logp-strict-modefrom
feature/issue29-consistency-audit-harness
Open

[RL-Kernel] Add consistency audit harness#32
inaniloquentee wants to merge 1 commit into
feature/issue21-linear-logp-strict-modefrom
feature/issue29-consistency-audit-harness

Conversation

@inaniloquentee

Copy link
Copy Markdown
Collaborator

Summary

Implements #29 as the Phase 3 consistency audit harness on top of the Phase 1/2 stack.

  • Adds a reusable vime.utils.consistency_audit path that composes Phase 1 consistency metadata validation with Phase 1 dlogp diagnostics instead of redefining either schema.
  • Adds replay/debug manifests, batch-invariance replay case descriptors, per-rank manifest attachment in rollout DP splits, and compact result-cube records.
  • Extends Megatron policy loss audit mode to use the shared harness and consume Phase 2 linear_logp runtime provenance when available.
  • Keeps audit mode read-only: no resampling, regeneration, optimizer step, model mutation, kernel replacement, or distributed operator sweep is introduced here.

Stack and final merge path

This PR is intentionally stacked on:

The final target is still RL-Align/vime rlk-main. Keeping this PR based on #28 avoids duplicating the unmerged Phase 1/2 diffs during review. After the dependency stack lands in rlk-main, this PR should be retargeted or rebased to rlk-main and then merged there.

Validation

  • py -3.13 -m compileall vime\utils\consistency_audit.py vime\backends\megatron_utils\loss.py vime\ray\rollout.py tests\utils\test_consistency_audit.py tests\utils\test_consistency_metadata.py tests\utils\test_consistency_metadata_rollout_integration.py tests\utils\test_dlogp_diagnostics.py tests\_unit_stubs.py
  • py -3.13 -m pytest tests\utils\test_consistency_audit.py tests\utils\test_consistency_metadata.py tests\utils\test_consistency_metadata_rollout_integration.py tests\utils\test_dlogp_diagnostics.py tests\utils\test_rl_kernel_execution.py tests\test_rl_kernel_operator_adapter.py tests\test_rl_kernel_linear_logp_integration.py tests\test_megatron_argument_validation.py tests\test_cp_utils.py tests\test_loss_cp_invariance.py tests\test_dp_schedule.py tests\test_sample.py -q
  • pre-commit run --all-files --show-diff-on-failure --color=always
  • git diff --check

Fixes #29.

@coderabbitai

coderabbitai Bot commented Jul 24, 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: 30b93cf2-dc1a-4795-b3e4-79203cf7a1ff

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/issue29-consistency-audit-harness

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.

Signed-off-by: inaniloquentee <3051000145@qq.com>
@inaniloquentee
inaniloquentee force-pushed the feature/issue29-consistency-audit-harness branch from dc5837d to ad10c53 Compare July 25, 2026 14:03
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