Skip to content

style: format Python sources and benchmark results - #408

Open
maxiaosong1124 wants to merge 1 commit into
RL-Align:mainfrom
maxiaosong1124:fix/ci-lint-baseline
Open

style: format Python sources and benchmark results#408
maxiaosong1124 wants to merge 1 commit into
RL-Align:mainfrom
maxiaosong1124:fix/ci-lint-baseline

Conversation

@maxiaosong1124

@maxiaosong1124 maxiaosong1124 commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator

Full-repository pre-commit checks encounter existing formatting violations on the main-branch baseline. Apply Black 24.4.2 formatting to 40 Python files, wrap long report strings without changing their values, and add the missing final newline to the ROCm benchmark results JSON.

Validation against base commit 6ceeb62:

  • All 40 Python ASTs, import sequences, and comment sequences are identical.
  • JSON data is identical; its only change is the final newline.
  • Black, end-of-file-fixer, and trailing-whitespace checks pass.

Black also normalizes mixed LF/CRLF endings in tests/test_framework_runtime_adapters.py, accounting for much of that file's textual diff. Documentation, test assertions, type annotations, and CI configuration are unchanged.

This PR is limited to formatting. Existing isort, Flake8, and MyPy issues remain unresolved, so the complete CI pipeline is not expected to pass yet. Related: #407.

Summary by CodeRabbit

  • Style

    • Reformatted benchmark, example, runtime, kernel, and test code for more consistent line wrapping and readability.
    • Normalized whitespace and equivalent expression layouts without changing application behavior.
  • Chores

    • Corrected the closing structure of a benchmark results file without changing its recorded data.

Signed-off-by: maxiaosong1124 <maxiaosong7890@outlook.com>
@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: de611e46-fb8b-4c2c-ba07-9a721cf99062

📥 Commits

Reviewing files that changed from the base of the PR and between 6ceeb62 and fd54735.

📒 Files selected for processing (41)
  • benchmarks/benchmark_rocm_det_gemm_leaf.py
  • benchmarks/benchmark_rocm_det_gemm_root_output.py
  • benchmarks/benchmark_rocm_ffn.py
  • benchmarks/profile_rocm_ffn.py
  • benchmarks/results/ws2_rocm_mi300x/results.json
  • examples/vime_qwen3_8b_tp4_cp2_200/analyze_performance.py
  • examples/vime_qwen3_8b_tp4_cp2_200/collect_results.py
  • examples/vime_qwen3_8b_tp4_cp2_200/plot_results.py
  • examples/vime_qwen3_8b_tp4_cp2_200/prepare_dapo_data.py
  • examples/vime_qwen3_8b_tp4_cp2_200/run.py
  • examples/vime_qwen3_8b_tp4_cp2_200/validate_artifacts.py
  • examples/vime_qwen3_8b_tp4_cp2_200/validate_run.py
  • examples/vime_rocm_attention_ablation/run.py
  • examples/vime_rocm_attention_ablation/run_full_pp_200.py
  • examples/vime_rocm_attention_ablation/tis_metrics.py
  • examples/vime_rocm_attention_ablation/validate_artifacts.py
  • rl_engine/distributed/collectives.py
  • rl_engine/distributed/rocm_collectives.py
  • rl_engine/integrations/framework_operators.py
  • rl_engine/integrations/linear_logp.py
  • rl_engine/integrations/megatron_runtime.py
  • rl_engine/integrations/rocm_ablation.py
  • rl_engine/integrations/runtime.py
  • rl_engine/integrations/vime/linear_logp_provider.py
  • rl_engine/integrations/vllm_runtime.py
  • rl_engine/kernels/ops/pytorch/ffn/ffn.py
  • rl_engine/kernels/ops/rocm/attention/paged_gather.py
  • rl_engine/kernels/ops/rocm/attention/strict_runtime.py
  • rl_engine/kernels/ops/rocm/loss/vocab_parallel_logp.py
  • rl_engine/kernels/ops/rocm/matmul/det_gemm.py
  • rl_engine/kernels/ops/rocm/rotary_embedding/rope.py
  • rl_engine/kernels/ops/triton/activation/swiglu.py
  • rl_engine/kernels/ops/triton/ffn/ffn.py
  • rl_engine/kernels/ops/triton/matmul/det_gemm.py
  • tests/distributed/test_qwen_ffn_topology.py
  • tests/test_det_gemm.py
  • tests/test_framework_runtime_adapters.py
  • tests/test_qwen_ffn.py
  • tests/test_rocm_e2e_ablation.py
  • tests/test_rocm_packed_ffn.py
  • tests/test_vime_linear_logp_provider.py

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The pull request applies formatting-only changes across benchmarks, examples, runtime integrations, kernels, and tests. It also adds the closing delimiter to one JSON result file. Runtime behavior and public interfaces remain unchanged.

Changes

Formatting normalization

Layer / File(s) Summary
Benchmark and result formatting
benchmarks/*, benchmarks/results/ws2_rocm_mi300x/results.json
Reformats benchmark calculations, calls, reports, plots, profiling expressions, and the result JSON delimiter without changing values or behavior.
Qwen example formatting
examples/vime_qwen3_8b_tp4_cp2_200/*
Reflows analysis, collection, plotting, preparation, execution, and validation expressions without changing control flow or output.
Attention ablation example formatting
examples/vime_rocm_attention_ablation/*
Reformats launch, metrics, and artifact-validation code without changing validation or runtime behavior.
Distributed and integration formatting
rl_engine/distributed/*, rl_engine/integrations/*
Reformats collective calls, runtime expressions, metadata construction, error messages, and type annotations without changing semantics.
Kernel and operator formatting
rl_engine/kernels/*
Reflows PyTorch, ROCm, Triton, attention, loss, GEMM, and rotary operator code without changing calculations or control flow.
Test formatting
tests/*
Reformats assertions, imports, setup, and test declarations while preserving existing test logic and coverage.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to fd547

This is a formatting-only change with no identified behavioral regression or merge-blocking risk.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 21.58% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 190 functions across 40 files. (1 skipped… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main changes: formatting Python sources and benchmark results.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 21.58% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 190 functions across 40 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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