Repository Analysis

verl-project/verl

verl/HybridFlow: A Flexible and Efficient RL Post-Training Framework

24.8 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of verl-project/verl, a Python project with 22,460 GitHub stars. SynthScan v2.0 examined 207,204 lines of code across 984 source files, recording 3768 pattern matches distributed across 22 syntactic categories. The overall adjusted score of 24.8 places this repository in the Moderate AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

24.8
Adjusted Score
24.8
Raw Score
100%
Time Factor
2026-07-14
Last Push
22.5K
Stars
Python
Language
207.2K
Lines of Code
984
Files
3.8K
Pattern Hits
2026-07-14
Scan Date
0.08
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 2HIGH 75MEDIUM 389LOW 3302

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 3768 distinct pattern matches across 22 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers1528 hits · 1540 pts
SeverityFileLineSnippetContext
LOWtests/test_protocol_v2_on_cpu.py67def test_tensor_dict_constructor():CODE
LOWtests/test_protocol_v2_on_cpu.py92def test_index_select_tensor_dict():CODE
LOWtests/test_protocol_v2_on_cpu.py152def test_tensordict_with_images():CODE
LOWtests/test_protocol_v2_on_cpu.py180def test_tensordict_with_packing():CODE
LOWtests/test_protocol_v2_on_cpu.py269def test_tensor_dict_make_iterator():CODE
LOWtests/test_protocol_v2_on_cpu.py509def test_torch_save_data_proto():CODE
LOWtests/test_protocol_v2_on_cpu.py654def test_dataproto_chunk_after_index():CODE
LOWtests/test_protocol_v2_on_cpu.py697def test_concat_nested_tensor():CODE
LOWtests/test_protocol_v2_on_cpu.py923def test_assign_non_tensor_stack_with_nested_lists():CODE
LOWtests/test_protocol_v2_on_cpu.py938def test_assign_non_tensor_stack_with_nested_dicts():CODE
LOWtests/test_protocol_v2_on_cpu.py953def test_assign_non_tensor_stack_with_complex_nested():CODE
LOWtests/test_protocol_v2_on_cpu.py972def test_assign_non_tensor_handles_wrappers():CODE
LOWtests/test_protocol_v2_on_cpu.py987def test_assign_non_tensor_stack_batch_size_check():CODE
LOWtests/test_protocol_v2_on_cpu.py995def test_assign_non_tensor_with_auto_detection():CODE
LOWtests/test_protocol_v2_on_cpu.py1018def test_get_tensordict_with_nested_lists():CODE
LOWtests/test_protocol_v2_on_cpu.py1033def test_get_tensordict_with_nested_dicts():CODE
LOWtests/test_protocol_v2_on_cpu.py1045def test_get_tensordict_with_complex_nested_structures():CODE
LOWtests/test_protocol_v2_on_cpu.py1060def test_get_tensordict_agent_loop_scenario():CODE
LOWtests/test_base_config_on_cpu.py33def test_getitem_nonexistent_attribute(base_config_mock):CODE
LOWtests/test_base_config_on_cpu.py39def test_getitem_invalid_key_type(base_config_mock):CODE
LOWtests/test_protocol_on_cpu.py141def test_tensor_dict_constructor():CODE
LOWtests/test_protocol_on_cpu.py155def test_tensor_dict_make_iterator():CODE
LOWtests/test_protocol_on_cpu.py219def test_concat_metrics_from_multiple_workers():CODE
LOWtests/test_protocol_on_cpu.py249def test_concat_with_empty_and_non_list_meta_info():CODE
LOWtests/test_protocol_on_cpu.py272def test_concat_first_worker_missing_metrics():CODE
LOWtests/test_protocol_on_cpu.py295def test_concat_non_list_metrics():CODE
LOWtests/test_protocol_on_cpu.py315def test_concat_merge_different_non_metric_keys():CODE
LOWtests/test_protocol_on_cpu.py339def test_concat_conflicting_non_metric_keys():CODE
LOWtests/test_protocol_on_cpu.py447def test_dataproto_fold_unfold():CODE
LOWtests/test_protocol_on_cpu.py470def test_torch_save_data_proto():CODE
LOWtests/test_protocol_on_cpu.py570def test_old_vs_new_from_single_dict():CODE
LOWtests/test_protocol_on_cpu.py642def test_dataproto_unfold_column_chunks():CODE
LOWtests/test_protocol_on_cpu.py708def test_dataproto_chunk_after_index():CODE
LOWtests/test_protocol_on_cpu.py785def test_to_tensordict_with_nested_lists():CODE
LOWtests/test_protocol_on_cpu.py810def test_to_tensordict_with_nested_dicts():CODE
LOWtests/test_protocol_on_cpu.py834def test_to_tensordict_with_complex_nested_structures():CODE
LOWtests/test_protocol_on_cpu.py862def test_to_tensordict_and_back_with_nested_data():CODE
LOWtests/test_protocol_on_cpu.py926def test_to_tensordict_agent_loop_scenario():CODE
LOWtests/test_protocol_on_cpu.py993def test_serialize_deserialize_single_tensor():CODE
LOWtests/test_protocol_on_cpu.py1010def test_serialize_deserialize_tensordict_regular_tensors():CODE
LOWtests/test_protocol_on_cpu.py1039def test_serialize_deserialize_tensordict_nested_tensors():CODE
LOWtests/test_protocol_on_cpu.py1092def test_serialize_deserialize_tensordict_mixed_types():CODE
LOWtests/test_protocol_on_cpu.py1177def test_serialize_deserialize_tensordict_with_device():CODE
LOWtests/test_protocol_on_cpu.py1208def test_serialize_dataproto_with_empty_tensordict():CODE
LOW…l/fully_async_policy/test_async_genrm_config_on_cpu.py76 def _validate_async_rm_config(config):CODE
LOW…l/fully_async_policy/test_async_genrm_config_on_cpu.py92 def test_rm_enabled_standalone_passes(self):CODE
LOW…l/fully_async_policy/test_async_genrm_config_on_cpu.py98 def test_rm_enabled_colocate_fails(self):CODE
LOWtests/experimental/vla/test_sim_envs.py37def test_sim_env_creation_and_step(simulator_type):CODE
LOW…ts/experimental/reward_loop/test_reward_model_disrm.py107def test_reward_model_manager():CODE
LOW…reward_loop/test_rate_limited_reward_manager_on_cpu.py71def mock_sync_reward_function(CODE
LOW…reward_loop/test_rate_limited_reward_manager_on_cpu.py83async def mock_async_reward_function(CODE
LOW…reward_loop/test_rate_limited_reward_manager_on_cpu.py106async def mock_failing_api_function(CODE
LOW…reward_loop/test_rate_limited_reward_manager_on_cpu.py114async def mock_dict_result_function(CODE
LOW…reward_loop/test_rate_limited_reward_manager_on_cpu.py169 async def test_basic_reward_computation(self, tokenizer):CODE
LOW…reward_loop/test_rate_limited_reward_manager_on_cpu.py258 async def test_concurrency_limiting(self, tokenizer):CODE
LOW…reward_loop/test_rate_limited_reward_manager_on_cpu.py351 async def test_sync_reward_function(self, tokenizer):CODE
LOW…reward_loop/test_rate_limited_reward_manager_on_cpu.py366 async def test_combined_rate_limits(self, tokenizer):CODE
LOW…reward_loop/test_rate_limited_reward_manager_on_cpu.py402 async def test_correct_vs_incorrect_answers(self, tokenizer):CODE
LOW…reward_loop/test_rate_limited_reward_manager_on_cpu.py463 async def test_class_initialization_once(self, tokenizer):CODE
LOW…reward_loop/test_rate_limited_reward_manager_on_cpu.py482 async def mock_reward_with_extra_info(CODE
1468 more matches not shown…
Decorative Section Separators296 hits · 1126 pts
SeverityFileLineSnippetContext
MEDIUMpyproject.toml1# -------------------------------COMMENT
MEDIUMpyproject.toml3# -------------------------------COMMENT
MEDIUMpyproject.toml11# -------------------------------COMMENT
MEDIUMpyproject.toml13# -------------------------------COMMENT
MEDIUMpyproject.toml26# -------------------------------COMMENT
MEDIUMpyproject.toml28# -------------------------------COMMENT
MEDIUMpyproject.toml68# -------------------------------COMMENT
MEDIUMpyproject.toml70# -------------------------------COMMENT
MEDIUMpyproject.toml90# -------------------------------COMMENT
MEDIUMpyproject.toml92# -------------------------------COMMENT
MEDIUMtests/experimental/agent_loop/test_basic_agent_loop.py414# ──────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/experimental/agent_loop/test_basic_agent_loop.py416# ──────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/tools/test_function_tool_on_cpu.py52# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/tools/test_function_tool_on_cpu.py54# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/tools/test_function_tool_on_cpu.py331# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/tools/test_function_tool_on_cpu.py333# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/tools/test_function_tool_on_cpu.py491# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/tools/test_function_tool_on_cpu.py493# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/tools/test_function_tool_on_cpu.py586# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/tools/test_function_tool_on_cpu.py588# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/utils/test_bucketed_weight_transfer.py122# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/utils/test_bucketed_weight_transfer.py124# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/utils/test_bucketed_weight_transfer.py156# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/utils/test_bucketed_weight_transfer.py158# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/utils/test_bucketed_weight_transfer.py206# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/utils/test_bucketed_weight_transfer.py208# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/utils/test_bucketed_weight_transfer.py242# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/utils/test_bucketed_weight_transfer.py244# ---------------------------------------------------------------------------COMMENT
MEDIUM…/utils/ckpt/test_megatron_checkpoint_manager_on_cpu.py217# ===========================================================================COMMENT
MEDIUM…/utils/ckpt/test_megatron_checkpoint_manager_on_cpu.py219# ===========================================================================COMMENT
MEDIUM…/utils/ckpt/test_megatron_checkpoint_manager_on_cpu.py267# ===========================================================================COMMENT
MEDIUM…/utils/ckpt/test_megatron_checkpoint_manager_on_cpu.py269# ===========================================================================COMMENT
MEDIUM…/utils/ckpt/test_megatron_checkpoint_manager_on_cpu.py602# ===========================================================================COMMENT
MEDIUM…/utils/ckpt/test_megatron_checkpoint_manager_on_cpu.py604# ===========================================================================COMMENT
MEDIUM…/utils/ckpt/test_megatron_checkpoint_manager_on_cpu.py36# ---------------------------------------------------------------------------COMMENT
MEDIUM…/utils/ckpt/test_megatron_checkpoint_manager_on_cpu.py38# ---------------------------------------------------------------------------COMMENT
MEDIUM…/utils/ckpt/test_megatron_checkpoint_manager_on_cpu.py66# ---------------------------------------------------------------------------COMMENT
MEDIUM…/utils/ckpt/test_megatron_checkpoint_manager_on_cpu.py68# ---------------------------------------------------------------------------COMMENT
MEDIUM…/utils/ckpt/test_megatron_checkpoint_manager_on_cpu.py156# ===========================================================================COMMENT
MEDIUM…/utils/ckpt/test_megatron_checkpoint_manager_on_cpu.py158# ===========================================================================COMMENT
MEDIUM…/utils/ckpt/test_megatron_checkpoint_manager_on_cpu.py407# ===========================================================================COMMENT
MEDIUM…/utils/ckpt/test_megatron_checkpoint_manager_on_cpu.py409# ===========================================================================COMMENT
MEDIUM…/utils/ckpt/test_megatron_checkpoint_manager_on_cpu.py557# ===========================================================================COMMENT
MEDIUM…/utils/ckpt/test_megatron_checkpoint_manager_on_cpu.py559# ===========================================================================COMMENT
MEDIUMtests/utils/veomni/test_router_replay_on_cpu.py103# ===========================================================COMMENT
MEDIUMtests/utils/veomni/test_router_replay_on_cpu.py105# ===========================================================COMMENT
MEDIUMtests/utils/veomni/test_router_replay_on_cpu.py123# ===========================================================COMMENT
MEDIUMtests/utils/veomni/test_router_replay_on_cpu.py125# ===========================================================COMMENT
MEDIUMtests/utils/veomni/test_router_replay_on_cpu.py142# ===========================================================COMMENT
MEDIUMtests/utils/veomni/test_router_replay_on_cpu.py144# ===========================================================COMMENT
MEDIUMtests/utils/veomni/test_router_replay_on_cpu.py292# ===========================================================COMMENT
MEDIUMtests/utils/veomni/test_router_replay_on_cpu.py294# ===========================================================COMMENT
MEDIUMtests/utils/veomni/test_router_replay_on_cpu.py317# ===========================================================COMMENT
MEDIUMtests/utils/veomni/test_router_replay_on_cpu.py319# ===========================================================COMMENT
MEDIUMtests/utils/veomni/test_router_replay_on_cpu.py333# ===========================================================COMMENT
MEDIUMtests/utils/veomni/test_router_replay_on_cpu.py335# ===========================================================COMMENT
MEDIUMtests/utils/veomni/test_router_replay_on_cpu.py348# ===========================================================COMMENT
MEDIUMtests/utils/veomni/test_router_replay_on_cpu.py350# ===========================================================COMMENT
MEDIUMtests/models/test_fused_kernels_ulysses_sp_on_cpu.py50# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/models/test_fused_kernels_ulysses_sp_on_cpu.py52# ---------------------------------------------------------------------------COMMENT
236 more matches not shown…
Over-Commented Block745 hits · 732 pts
SeverityFileLineSnippetContext
LOWsetup.py1# Copyright 2024 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/test_protocol_v2_on_cpu.py1# Copyright 2024 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/test_protocol_v2_on_cpu.py581 # assert result_np_bool.keys() == data.keys()COMMENT
LOWtests/test_base_config_on_cpu.py1# Copyright 2024 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/__init__.py1# Copyright 2024 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/test_protocol_on_cpu.py1# Copyright 2024 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/experimental/fully_async_policy/__init__.py1# Copyright 2025 Bytedance Ltd. and/or its affiliatesCOMMENT
LOW…l/fully_async_policy/test_async_genrm_config_on_cpu.py1# Copyright 2025 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/experimental/vla/test_sim_envs.py1# Copyright 2024 Bytedance Ltd. and/or its affiliatesCOMMENT
LOW…xperimental/reward_loop/run_determinism_e2e_with_rm.py1#!/usr/bin/env python3COMMENT
LOW…ts/experimental/reward_loop/test_reward_model_disrm.py1# Copyright 2024 Bytedance Ltd. and/or its affiliatesCOMMENT
LOW…reward_loop/test_rate_limited_reward_manager_on_cpu.py1# Copyright 2024 Bytedance Ltd. and/or its affiliatesCOMMENT
LOW…ental/reward_loop/test_agent_reward_loop_standalone.py1# Copyright 2024 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/experimental/reward_loop/test_math_verify.py1# Copyright 2024 Bytedance Ltd. and/or its affiliatesCOMMENT
LOW…imental/reward_loop/test_agent_reward_loop_colocate.py1# Copyright 2024 Bytedance Ltd. and/or its affiliatesCOMMENT
LOW…ts/experimental/reward_loop/test_reward_model_genrm.py1# Copyright 2024 Bytedance Ltd. and/or its affiliatesCOMMENT
LOW…rimental/reward_loop/test_async_token_bucket_on_cpu.py1# Copyright 2024 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/experimental/reward_loop/reward_fn.py1# Copyright 2025 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/experimental/agent_loop/test_multi_modal.py1# Copyright 2024 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/experimental/agent_loop/test_call_tool_on_cpu.py1# Copyright 2025 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/experimental/agent_loop/test_basic_agent_loop.py1# Copyright 2024 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/experimental/agent_loop/agent_utils.py1# Copyright 2024 Bytedance Ltd. and/or its affiliatesCOMMENT
LOW…sts/experimental/agent_loop/test_standalone_rollout.py1# Copyright 2024 Bytedance Ltd. and/or its affiliatesCOMMENT
LOW…mental/agent_loop/test_audio_server_contract_on_cpu.py1# Copyright 2024 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/experimental/agent_loop/function_tool_examples.py1# Copyright 2026 Bytedance Ltd. and/or its affiliatesCOMMENT
LOW…ent_loop/test_agent_loop_extra_fields_schema_on_cpu.py1# Copyright 2026 Bytedance Ltd. and/or its affiliatesCOMMENT
LOW…ts/experimental/agent_loop/test_tool_call_id_on_cpu.py1# Copyright 2026 Bytedance Ltd. and/or its affiliatesCOMMENT
LOW…perimental/agent_loop/test_qwen3_tool_parser_on_cpu.py1# Copyright 2024 Bytedance Ltd. and/or its affiliatesCOMMENT
LOW…ts/experimental/agent_loop/test_gpt_oss_tool_parser.py1# Copyright 2024 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/tools/test_mixed_tools_on_cpu.py1# Copyright 2025 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/tools/__init__.py1# Copyright 2026 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/tools/test_function_tool_on_cpu.py1# Copyright 2025 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/tools/_stub_search_tools.py1# Copyright 2025 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/special_sanity/check_docstrings.py1# Copyright 2025 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/special_sanity/check_device_api_usage.py1# Copyright 2025 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/special_sanity/check_dataproto_usage.py1# Copyright 2025 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/special_sanity/test_check_example_naming.py1# Copyright 2026 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/special_sanity/check_license.py1# Copyright 2024 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/special_sanity/check_api_docs.py1# Copyright 2024 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/special_sanity/check_pr_description.py1# Copyright 2025 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/special_sanity/validate_imported_docs.py1# Copyright 2025 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/special_sanity/check_example_naming.py1# Copyright 2026 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/special_sanity/test_import.py1# Copyright 2024 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/special_sanity/check_docs_time_info.py1# Copyright 2025 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/special_sanity/test_config_docs.py1# Copyright 2025 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/special_sanity/type_coverage_check.py1# Copyright 2025 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/special_sanity/validate_structure.py1# Copyright 2025 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/special_sanity/check_pr_title.py1# Copyright 2025 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/utils/test_bucketed_weight_transfer.py1# Copyright 2025 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/utils/test_continuous_token_on_cpu.py1# Copyright 2025 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/utils/test_linear_cross_entropy.py1#COMMENT
LOWtests/utils/test_fsdp_wrap_policy_on_cpu.py1# Copyright 2025 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/utils/test_shared_memory.py1# Copyright 2024 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/utils/test_config_on_cpu.py1# Copyright 2025 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/utils/test_torch_profile.py1# Copyright 2026 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/utils/test_rollout_trace_on_cpu.py1# Copyright 2025 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/utils/test_temp_env_on_cpu.py1# Copyright 2024 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/utils/test_timeout_decorator_cpu.py1# Copyright 2024 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/utils/test_nvtx_profile.py1# Copyright 2024 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWtests/utils/test_nvtx_profile.py101COMMENT
685 more matches not shown…
Excessive Try-Catch Wrapping243 hits · 272 pts
SeverityFileLineSnippetContext
LOWtests/test_protocol_on_cpu.py1115 except Exception:CODE
LOWtests/test_protocol_on_cpu.py1228 except Exception as e:CODE
LOWtests/experimental/reward_loop/reward_fn.py50 except Exception as e:STRING
LOWtests/experimental/reward_loop/reward_fn.py82 except Exception:CODE
LOWtests/experimental/agent_loop/test_multi_modal.py123 except Exception as e:CODE
LOWtests/experimental/agent_loop/test_basic_agent_loop.py157 except Exception as e:CODE
LOWtests/experimental/agent_loop/test_basic_agent_loop.py189 except Exception as e:CODE
LOWtests/experimental/agent_loop/function_tool_examples.py69 except Exception as e:CODE
LOWtests/special_sanity/check_docstrings.py83 except Exception as e:CODE
MEDIUMtests/special_sanity/check_docstrings.py84 print(f"Error processing {filepath}: {e}")CODE
LOWtests/special_sanity/check_api_docs.py68 except Exception as exc:CODE
LOWtests/special_sanity/check_pr_description.py54 except Exception as e:CODE
LOWtests/special_sanity/check_pr_description.py63 except Exception as e:CODE
MEDIUMtests/special_sanity/check_pr_description.py58def load_pr_body(event_path):CODE
LOWtests/special_sanity/validate_imported_docs.py88 except Exception: # pragma: no cover – wide net for import quirksCODE
MEDIUMtests/special_sanity/check_docs_time_info.py54 print(f"Error: Documentation directory '{DOCS_DIR}' does not exist.", file=sys.stderr)CODE
LOWtests/special_sanity/type_coverage_check.py50 except Exception:CODE
LOWtests/utils/test_shared_memory.py218 except Exception as e:CODE
MEDIUMtests/utils/test_shared_memory.py219 print(f"Error in child process: {e}")CODE
LOWtests/utils/test_timeout_decorator_cpu.py77 except Exception as e:CODE
LOWtests/utils/test_timeout_decorator_cpu.py170 except Exception as e:CODE
LOWtests/utils/test_timeout_decorator_cpu.py182 except Exception as e:CODE
LOWtests/utils/test_timeout_decorator_cpu.py211 except Exception as e:CODE
LOWtests/utils/test_timeout_decorator_cpu.py223 except Exception as e:CODE
MEDIUMtests/utils/test_timeout_decorator_cpu.py164def slow_task_in_thread():CODE
MEDIUMtests/utils/test_timeout_decorator_cpu.py176def thread_target():CODE
MEDIUMtests/utils/test_timeout_decorator_cpu.py205def slow_task_in_thread():CODE
MEDIUMtests/utils/test_timeout_decorator_cpu.py217def thread_target():CODE
LOWtests/utils/test_check_profiler_output.py147 except Exception as e:CODE
LOW…kers/rollout/rollout_sglang/test_http_server_engine.py902 except Exception:CODE
LOWtests/special_e2e/check_results.py30 except Exception:CODE
LOWtests/trainer/ppo/test_rollout_corr.py458 except Exception as e:CODE
MEDIUMtests/trainer/ppo/v1/test_replay_buffer_on_cpu.py161def run(self) -> None:CODE
MEDIUMtests/trainer/ppo/v1/test_replay_buffer_on_cpu.py204def run(self) -> None:CODE
LOWtests/trainer/ppo/v1/test_replay_buffer_on_cpu.py180 except Exception as e: # surfaced to the test via join_and_check()CODE
LOWtests/trainer/ppo/v1/test_replay_buffer_on_cpu.py211 except Exception as e:CODE
LOWverl/__init__.py64 except Exception as _e:CODE
LOW…rl/experimental/fully_async_policy/fully_async_main.py194 except Exception as e:CODE
LOW…rl/experimental/fully_async_policy/fully_async_main.py202 except Exception as e:CODE
LOWverl/experimental/fully_async_policy/detach_utils.py354 except Exception as e:CODE
LOWverl/experimental/fully_async_policy/message_queue.py159 except Exception:CODE
LOW…perimental/fully_async_policy/fully_async_rollouter.py241 except Exception as e:CODE
LOW…perimental/fully_async_policy/fully_async_rollouter.py186 except Exception as e:CODE
LOW…perimental/fully_async_policy/fully_async_rollouter.py895 except Exception as e:CODE
LOW…perimental/fully_async_policy/fully_async_rollouter.py941 except Exception as e:CODE
LOW…experimental/fully_async_policy/fully_async_trainer.py266 except Exception as e:CODE
LOW…l/fully_async_policy/unittest/simple_streaming_demo.py111 except Exception as e:CODE
LOWverl/experimental/reward_loop/reward_loop.py181 except Exception as e:CODE
LOWverl/experimental/reward_loop/reward_manager/limited.py460 except Exception as e:CODE
LOWverl/experimental/reward_loop/router/naive_router.py40 except Exception:CODE
LOWverl/experimental/reward_loop/router/naive_router.py43 except Exception:CODE
LOWverl/experimental/reward_loop/router/naive_router.py165 except Exception as e:CODE
LOWverl/experimental/agent_loop/tool_parser.py123 except Exception as e:CODE
LOWverl/experimental/agent_loop/tool_parser.py180 except Exception as e:CODE
LOWverl/experimental/agent_loop/tool_parser.py250 except Exception:CODE
LOWverl/experimental/agent_loop/tool_parser.py262 except Exception:CODE
LOWverl/experimental/agent_loop/tool_parser.py281 except Exception:CODE
LOWverl/experimental/agent_loop/tool_parser.py291 except Exception:CODE
LOWverl/experimental/agent_loop/tool_parser.py358 except Exception as e:CODE
LOWverl/experimental/agent_loop/tool_parser.py390 except Exception:CODE
183 more matches not shown…
Unused Imports238 hits · 234 pts
SeverityFileLineSnippetContext
LOW…mental/agent_loop/test_audio_server_contract_on_cpu.py15CODE
LOW…ent_loop/test_agent_loop_extra_fields_schema_on_cpu.py15CODE
LOWtests/tools/test_mixed_tools_on_cpu.py22CODE
LOWtests/tools/test_function_tool_on_cpu.py16CODE
LOWtests/tools/_stub_search_tools.py18CODE
LOWtests/special_sanity/test_check_example_naming.py17CODE
LOWtests/special_sanity/check_api_docs.py28CODE
LOWtests/special_sanity/validate_imported_docs.py22CODE
LOWtests/special_sanity/check_example_naming.py41CODE
LOWtests/special_sanity/validate_structure.py32CODE
LOWtests/utils/test_utils_skip.py17CODE
LOWtests/workers/test_engine_workers_lora_sync.py26CODE
LOW…/workers/rollout/test_vllm_pd_disaggregation_on_cpu.py27CODE
LOW…rkers/rollout/test_vision_placeholder_tokens_on_cpu.py21CODE
LOWtests/workers/rollout/test_pd_disaggregation.py16CODE
LOW…orkers/rollout/rollout_sglang/test_lora_sleep_level.py22CODE
LOWtests/special_e2e/envs/__init__.py15CODE
LOWtests/special_e2e/envs/digit_completion/__init__.py17CODE
LOWtests/special_e2e/envs/digit_completion/__init__.py17CODE
LOWverl/__init__.py21CODE
LOWverl/experimental/teacher_loop/__init__.py15CODE
LOWverl/experimental/reward_loop/__init__.py15CODE
LOWverl/experimental/reward_loop/__init__.py15CODE
LOWverl/experimental/reward_loop/__init__.py15CODE
LOWverl/experimental/reward_loop/__init__.py16CODE
LOW…rl/experimental/reward_loop/reward_manager/__init__.py15CODE
LOW…rl/experimental/reward_loop/reward_manager/__init__.py15CODE
LOW…rl/experimental/reward_loop/reward_manager/__init__.py16CODE
LOW…rl/experimental/reward_loop/reward_manager/__init__.py17CODE
LOW…rl/experimental/reward_loop/reward_manager/__init__.py18CODE
LOW…rl/experimental/reward_loop/reward_manager/__init__.py19CODE
LOW…rl/experimental/reward_loop/reward_manager/__init__.py20CODE
LOWverl/experimental/agent_loop/__init__.py15CODE
LOWverl/experimental/agent_loop/__init__.py15CODE
LOWverl/experimental/agent_loop/__init__.py15CODE
LOWverl/experimental/agent_loop/__init__.py15CODE
LOWverl/experimental/agent_loop/__init__.py15CODE
LOWverl/tools/tool_registry.py15CODE
LOWverl/tools/function_tool.py18CODE
LOWverl/plugin/platform/__init__.py16CODE
LOWverl/plugin/platform/__init__.py17CODE
LOWverl/plugin/platform/__init__.py17CODE
LOWverl/plugin/platform/__init__.py17CODE
LOWverl/plugin/platform/platform_manager.py172CODE
LOWverl/plugin/platform/platform_manager.py173CODE
LOWverl/plugin/platform/platform_manager.py174CODE
LOWverl/plugin/platform/platform_npu.py26CODE
LOWverl/model_merger/megatron_model_merger.py28CODE
LOWverl/utils/transformers_compat.py28CODE
LOWverl/utils/groupwise.py41CODE
LOWverl/utils/ulysses.py29CODE
LOWverl/utils/__init__.py16CODE
LOWverl/utils/__init__.py16CODE
LOWverl/utils/__init__.py17CODE
LOWverl/utils/__init__.py17CODE
LOWverl/utils/__init__.py18CODE
LOWverl/utils/__init__.py18CODE
LOWverl/utils/__init__.py18CODE
LOWverl/utils/__init__.py18CODE
LOWverl/utils/__init__.py18CODE
178 more matches not shown…
Deep Nesting246 hits · 219 pts
SeverityFileLineSnippetContext
LOWtests/test_protocol_v2_on_cpu.py802CODE
LOWtests/test_protocol_on_cpu.py1092CODE
LOW…xperimental/reward_loop/run_determinism_e2e_with_rm.py50CODE
LOWtests/experimental/agent_loop/test_multi_modal.py77CODE
LOW…mental/agent_loop/test_audio_server_contract_on_cpu.py31CODE
LOWtests/special_sanity/check_pr_description.py40CODE
LOWtests/special_sanity/validate_imported_docs.py63CODE
LOWtests/special_sanity/test_config_docs.py19CODE
LOWtests/special_sanity/type_coverage_check.py34CODE
LOWtests/special_sanity/type_coverage_check.py87CODE
LOWtests/utils/test_linear_cross_entropy.py113CODE
LOWtests/utils/test_special_linear_cross_entropy_tp.py207CODE
LOWtests/utils/test_fsdp_lora_merge.py37CODE
LOWtests/utils/test_fsdp_lora_merge.py225CODE
LOWtests/utils/test_turn_separator_on_cpu.py117CODE
LOWtests/utils/test_turn_separator_on_cpu.py62CODE
LOWtests/utils/test_turn_separator_on_cpu.py138CODE
LOWtests/utils/test_special_megatron_kl_loss_tp.py55CODE
LOW…sts/utils/dataset/test_multiturn_sft_dataset_on_cpu.py245CODE
LOW…ts/utils/veomni/test_special_export_unfused_experts.py58CODE
LOWtests/utils/megatron/test_optimizer_offload_and_load.py76CODE
LOW…eward_score/reward_score/test_sandbox_fusion_on_cpu.py127CODE
LOWtests/special_distributed/test_tensor_dict.py28CODE
LOW…ts/workers/rollout/rollout_trtllm/test_trtllm_abort.py32CODE
LOWtests/workers/rollout/rollout_vllm/test_vllm_abort.py29CODE
LOWverl/protocol.py546CODE
LOWverl/protocol.py917CODE
LOW…rl/experimental/fully_async_policy/fully_async_main.py176CODE
LOWverl/experimental/fully_async_policy/detach_utils.py253CODE
LOW…perimental/fully_async_policy/fully_async_rollouter.py749CODE
LOW…l/fully_async_policy/unittest/simple_streaming_demo.py85CODE
LOWverl/experimental/reward_loop/router/naive_router.py135CODE
LOW…experimental/reward_loop/router/inner_sglang_router.py30CODE
LOWverl/experimental/agent_loop/tool_parser.py211CODE
LOWverl/experimental/agent_loop/tool_parser.py660CODE
LOWverl/experimental/agent_loop/tool_parser.py222CODE
LOWverl/experimental/agent_loop/tool_agent_loop.py125CODE
LOWverl/experimental/agent_loop/tool_agent_loop.py307CODE
LOWverl/experimental/separation/ray_trainer.py494CODE
LOWverl/plugin/platform/platform_rocm.py30CODE
LOWverl/plugin/platform/platform_cuda.py41CODE
LOWverl/model_merger/megatron_model_merger.py358CODE
LOWverl/model_merger/base_model_merger.py204CODE
LOWverl/model_merger/fsdp_model_merger.py143CODE
LOWverl/utils/torch_functional.py507CODE
LOWverl/utils/torch_functional.py1008CODE
LOWverl/utils/megatron_utils.py220CODE
LOWverl/utils/megatron_utils.py525CODE
LOWverl/utils/megatron_utils.py615CODE
LOWverl/utils/megatron_utils.py663CODE
LOWverl/utils/megatron_utils.py704CODE
LOWverl/utils/megatron_utils.py745CODE
LOWverl/utils/megatron_utils.py795CODE
LOWverl/utils/megatron_utils.py966CODE
LOWverl/utils/megatron_utils.py1251CODE
LOWverl/utils/megatron_utils.py1396CODE
LOWverl/utils/megatron_utils.py1541CODE
LOWverl/utils/megatron_utils.py1740CODE
LOWverl/utils/megatron_utils.py1800CODE
LOWverl/utils/megatron_utils.py1848CODE
186 more matches not shown…
Docstring Block Structure39 hits · 195 pts
SeverityFileLineSnippetContext
HIGHdocs/data/transfer_queue.md239Sample a batch of indices from the ready indices. Args: ready_indexes: List of global indices for which allSTRING
HIGHverl/base_config.py56Implement the [] operator for the class. Allows accessing attributes like dictionary items. Args: kSTRING
HIGHverl/protocol.py676 Slice the DataProto and return a new DataProto object. This is an improved version of direct slicing whSTRING
HIGHverl/experimental/fully_async_policy/detach_utils.py87 Assemble gen_batch_output from RolloutSample objects Assembles batches from RolloutSample objects, similar to tSTRING
HIGHverl/experimental/reward_loop/reward_manager/limited.py91Acquire tokens from the bucket, waiting if necessary. This method will block (using asyncio.sleep) until sufficSTRING
HIGHverl/experimental/agent_loop/utils.py20Resolve agent loop configuration file path. In multi-node Ray training, relative paths may not resolve correctly STRING
HIGHverl/tools/base_tool.py63Execute the tool. Args: instance_id: The instance id of the tool. parameters: The json STRING
HIGHverl/utils/seqlen_balancing.py214 Calculates partitions of indices from seqlen_list such that the sum of sequence lengths in each partition is baSTRING
HIGHverl/utils/torch_functional.py106Compute log-probabilities using Flash Attention's optimized cross-entropy. Uses the Flash Attention library's TritoSTRING
HIGHverl/utils/py_functional.py57 Decorator to add a timeout to a function. Args: seconds: The timeout duration in seconds. use_STRING
HIGHverl/utils/device.py270Check if the given software and CANN versions support IPC. Compares the software version and CANN toolkit version aSTRING
HIGHverl/utils/model.py806 Extract LoRA rank from adapter configuration file. Args: adapter_path: Path to LoRA adapter directory STRING
HIGHverl/utils/import_utils.py209Load a class from its fully qualified name. Args: fqn: Fully qualified class name (e.g., 'mypackage.module.STRING
HIGHverl/utils/tensordict_utils.py186Concatenate multiple nested tensors along the batch dimension. Takes a list of nested tensors with jagged layout anSTRING
HIGHverl/utils/tensordict_utils.py222Handle concatenation of TensorDicts with empty batch size. For TensorDicts that contain only metadata (NonTensorDatSTRING
HIGHverl/utils/tensordict_utils.py248Concatenate multiple TensorDicts along dimension zero. Combines a list of TensorDicts into a single TensorDict by cSTRING
HIGHverl/utils/tensordict_utils.py303Split a TensorDict into equal-sized chunks with special nested tensor handling. Divides a TensorDict into the speciSTRING
HIGHverl/utils/tensordict_utils.py459Select rows from a TensorDict using indices. Creates a new TensorDict containing only the rows specified by indicesSTRING
HIGHverl/utils/tensordict_utils.py514Merge two TensorDicts, adding keys from the second to the first. Performs an in-place union of two TensorDicts. KeySTRING
HIGHverl/utils/tensordict_utils.py560Create an iterator that yields mini-batches from a TensorDict. Wraps a TensorDict in a DataLoader-style iterator thSTRING
HIGHverl/utils/tensordict_utils.py699Extract a subset of keys from a TensorDict into a new TensorDict. Creates a new TensorDict containing only the specSTRING
HIGHverl/utils/tensordict_utils.py773Remove multiple keys from a TensorDict and return them as a new TensorDict. Removes the specified keys from the souSTRING
HIGHverl/utils/tensordict_utils.py814Pad a TensorDict's batch dimension to be divisible by a given divisor. If the TensorDict's length is not evenly divSTRING
HIGHverl/utils/fsdp_utils.py441 Get the full state dict from an FSDP model. Args: model (torch.nn.Module): The FSDP model to get stateSTRING
HIGHverl/utils/dataset/rl_dataset.py511 split the dataset into num_splits sub-datasets Args: num_splits: specified number of splitsSTRING
HIGHverl/utils/kernel/fp8_kernel.py177High-performance FP8 blockwise quantization using Triton kernel. This is the recommended function to use for FP8 quSTRING
HIGHverl/utils/megatron/router_replay_utils.py406 Reorder and merge per-VPP layer blocks into a contiguous layer dimension. Given a tensor shaped as [bs*vpp_sizSTRING
HIGHverl/utils/reward_score/__init__.py29Compute the score for a given solution based on the data source. Args: data_source (str): The source dataseSTRING
HIGHverl/workers/config/optimizer.py243Build an optimizer based on the configuration. Dynamically imports and instantiates an optimizer class from the speSTRING
HIGHverl/workers/rollout/trtllm_rollout/trtllm_rollout.py178Make an async HTTP request with retry logic and consistent error handling. Args: endpoint (str): ThSTRING
HIGH…l/workers/rollout/sglang_rollout/http_server_engine.py110Launch an SGLang HTTP server process and wait for it to be ready. This function starts a new process running an SGLSTRING
HIGH…l/workers/rollout/sglang_rollout/http_server_engine.py296Make a HTTP request with retry logic and consistent error handling. Args: endpoint (str): The API eSTRING
HIGH…l/workers/rollout/sglang_rollout/http_server_engine.py664Make an async HTTP request with retry logic and consistent error handling. Args: endpoint (str): ThSTRING
HIGHverl/workers/engine/base.py363 Function to create a new training engine instance based on the provided config. Args: key: STRING
HIGHverl/workers/engine/fsdp/utils.py57 Determine the appropriate sharding strategy based on the number of dimensions of the device mesh. Args: STRING
HIGHverl/workers/engine/torchtitan/utils.py81Derive torchtitan model name and flavor from a HuggingFace config. The name is mapped from ``hf_config.model_type``STRING
HIGHverl/trainer/ppo/reward.py51Load and return a custom reward function from external file. Dynamically imports a reward function from a specifiedSTRING
HIGHverl/trainer/ppo/core_algos.py194Factory function to create appropriate KL controller based on configuration. Args: kl_ctrl: Configuration oSTRING
HIGHverl/trainer/ppo/core_algos.py2231Compute importance weights for resampling based on scores. Args: scores (torch.Tensor): Tensor of sSTRING
Cross-File Repetition35 hits · 175 pts
SeverityFileLineSnippetContext
HIGHdocs/blog/v0.7.md0send the weights of the model. args: weights: a generator that yields the name of the weight tensor and the tensor itselSTRING
HIGHverl/checkpoint_engine/nccl_checkpoint_engine.py0send the weights of the model. args: weights: a generator that yields the name of the weight tensor and the tensor itselSTRING
HIGHverl/checkpoint_engine/nixl_checkpoint_engine.py0send the weights of the model. args: weights: a generator that yields the name of the weight tensor and the tensor itselSTRING
HIGHverl/checkpoint_engine/kimi_checkpoint_engine.py0send the weights of the model. args: weights: a generator that yields the name of the weight tensor and the tensor itselSTRING
HIGHverl/checkpoint_engine/hccl_checkpoint_engine.py0send the weights of the model. args: weights: a generator that yields the name of the weight tensor and the tensor itselSTRING
HIGHdocs/blog/v0.7.md0receive the weights of the model. yields: a tuple of the name of the weight tensor and the tensor itself.STRING
HIGHverl/checkpoint_engine/nccl_checkpoint_engine.py0receive the weights of the model. yields: a tuple of the name of the weight tensor and the tensor itself.STRING
HIGHverl/checkpoint_engine/nixl_checkpoint_engine.py0receive the weights of the model. yields: a tuple of the name of the weight tensor and the tensor itself.STRING
HIGHverl/checkpoint_engine/kimi_checkpoint_engine.py0receive the weights of the model. yields: a tuple of the name of the weight tensor and the tensor itself.STRING
HIGHverl/checkpoint_engine/hccl_checkpoint_engine.py0receive the weights of the model. yields: a tuple of the name of the weight tensor and the tensor itself.STRING
HIGH…perimental/fully_async_policy/fully_async_rollouter.py0initialize distributed training workers using ray backend. creates: 1. ray resource pools from configuration 2. worker gSTRING
HIGH…experimental/fully_async_policy/fully_async_trainer.py0initialize distributed training workers using ray backend. creates: 1. ray resource pools from configuration 2. worker gSTRING
HIGHverl/experimental/separation/ray_trainer.py0initialize distributed training workers using ray backend. creates: 1. ray resource pools from configuration 2. worker gSTRING
HIGHverl/trainer/ppo/ray_trainer.py0initialize distributed training workers using ray backend. creates: 1. ray resource pools from configuration 2. worker gSTRING
HIGH…experimental/fully_async_policy/fully_async_trainer.py0the training loop of ppo. the driver process only need to call the compute functions of the worker group through rpc to STRING
HIGHverl/experimental/one_step_off_policy/ray_trainer.py0the training loop of ppo. the driver process only need to call the compute functions of the worker group through rpc to STRING
HIGHverl/trainer/ppo/ray_trainer.py0the training loop of ppo. the driver process only need to call the compute functions of the worker group through rpc to STRING
HIGH…experimental/fully_async_policy/fully_async_trainer.py0single-step training template method. handles all logic for one training step. flow: 1. pre-step processing -> 2. get baSTRING
HIGHverl/experimental/separation/ray_trainer.py0single-step training template method. handles all logic for one training step. flow: 1. pre-step processing -> 2. get baSTRING
HIGHverl/experimental/one_step_off_policy/ray_trainer.py0single-step training template method. handles all logic for one training step. flow: 1. pre-step processing -> 2. get baSTRING
HIGHverl/workers/reward_manager/prime.py0we will expand this function gradually based on the available datasetsSTRING
HIGHverl/workers/reward_manager/naive.py0we will expand this function gradually based on the available datasetsSTRING
HIGHverl/workers/reward_manager/dapo.py0we will expand this function gradually based on the available datasetsSTRING
HIGH…/workers/rollout/trtllm_rollout/trtllm_async_server.py0restore kv_cache gpu memory after a weight sync. counterpart to release_kv_cache().STRING
HIGH…/workers/rollout/sglang_rollout/async_sglang_server.py0restore kv_cache gpu memory after a weight sync. counterpart to release_kv_cache().STRING
HIGHverl/workers/rollout/vllm_rollout/vllm_async_server.py0restore kv_cache gpu memory after a weight sync. counterpart to release_kv_cache().STRING
HIGHverl/workers/engine/base.py0whether the current rank is the first rank in model parallel group that contains model outputsSTRING
HIGHverl/workers/engine/veomni/transformer_impl.py0whether the current rank is the first rank in model parallel group that contains model outputsSTRING
HIGHverl/workers/engine/torchtitan/transformer_impl.py0whether the current rank is the first rank in model parallel group that contains model outputsSTRING
HIGHverl/workers/engine/veomni/transformer_impl.py0move model parameters, optimizer states, or both to the specified device. note that this function executes irrespective STRING
HIGHverl/workers/engine/mindspeed/transformer_impl.py0move model parameters, optimizer states, or both to the specified device. note that this function executes irrespective STRING
HIGHverl/workers/engine/megatron/transformer_impl.py0move model parameters, optimizer states, or both to the specified device. note that this function executes irrespective STRING
HIGHverl/checkpoint_engine/nccl_checkpoint_engine.py0hccl checkpoint engine with collective communication. args: bucket_size (int): bucket size in bytes to transfer multipleSTRING
HIGHverl/checkpoint_engine/kimi_checkpoint_engine.py0hccl checkpoint engine with collective communication. args: bucket_size (int): bucket size in bytes to transfer multipleSTRING
HIGHverl/checkpoint_engine/hccl_checkpoint_engine.py0hccl checkpoint engine with collective communication. args: bucket_size (int): bucket size in bytes to transfer multipleSTRING
Modern Structural Boilerplate129 hits · 130 pts
SeverityFileLineSnippetContext
LOWtests/special_e2e/envs/__init__.py17__all__ = ["DigitCompletion"]CODE
LOWtests/special_e2e/envs/digit_completion/__init__.py22__all__ = ["DigitCompletion", "generate_ground_truth_response", "CharTokenizer"]CODE
LOWtests/trainer/ppo/v1/test_replay_buffer_on_cpu.py112def _set_prompt_status(partition_id: str, uid: str, status: str, global_steps: int) -> None:CODE
LOWverl/protocol.py43__all__ = ["DataProto", "union_tensor_dict"]CODE
LOWverl/__init__.py35__all__ = ["DataProto", "__version__"]CODE
LOWverl/experimental/teacher_loop/__init__.py17__all__ = ["MultiTeacherModelManager"]CODE
LOW…rl/experimental/fully_async_policy/fully_async_main.py159 def _setup_hybrid_worker_group(self, config) -> None:CODE
LOWverl/experimental/fully_async_policy/message_queue.py23logger = logging.getLogger(__name__)CODE
LOW…experimental/fully_async_policy/fully_async_trainer.py43logger = logging.getLogger(__name__)CODE
LOWverl/experimental/reward_loop/__init__.py18__all__ = ["RewardModelManager", "RewardLoopWorker", "RewardLoopManager", "migrate_legacy_reward_impl"]CODE
LOW…rl/experimental/reward_loop/reward_manager/registry.py19__all__ = ["register", "get_reward_manager_cls"]CODE
LOW…rl/experimental/reward_loop/reward_manager/__init__.py22__all__ = [CODE
LOWverl/experimental/reward_loop/router/naive_router.py30logger = logging.getLogger(__name__)CODE
LOW…experimental/reward_loop/router/inner_sglang_router.py26logger = logging.getLogger(__name__)CODE
LOWverl/experimental/agent_loop/__init__.py27__all__ = [CODE
LOWverl/experimental/separation/engine_workers.py33__all__ = ["DetachActorWorker"]CODE
LOWverl/plugin/platform/__init__.py19__all__ = ["PlatformBase", "PlatformRegistry", "get_platform", "set_platform"]CODE
LOWverl/plugin/platform/platform_manager.py23logger = logging.getLogger(__name__)CODE
LOWverl/plugin/platform/platform_manager.py150def set_platform(platform: PlatformBase) -> None:CODE
LOWverl/plugin/platform/platform_cuda.py78 def set_device(self, device_index: int) -> None:CODE
LOWverl/plugin/platform/platform_cuda.py98 def set_allocator_settings(self, settings: str) -> None:CODE
LOWverl/plugin/platform/platform_npu.py80 def set_device(self, device_index: int) -> None:CODE
LOWverl/plugin/platform/platform_npu.py100 def set_allocator_settings(self, settings: str) -> None:CODE
LOWverl/plugin/platform/platform_npu.py15logger = logging.getLogger(__name__)CODE
LOWverl/plugin/platform/platform_base.py109 def set_device(self, device_index: int) -> None:CODE
LOWverl/plugin/platform/platform_base.py137 def set_allocator_settings(self, settings: str) -> None:CODE
LOWverl/utils/transferqueue_utils.py67logger = logging.getLogger(__name__)CODE
LOWverl/utils/megatron_peft_utils.py185__all__ = [CODE
LOWverl/utils/config.py20__all__ = ["omega_conf_to_dataclass", "validate_config"]CODE
LOWverl/utils/device.py28logger = logging.getLogger(__name__)CODE
LOWverl/utils/device.py136def set_expandable_segments(enable: bool) -> None:CODE
LOWverl/utils/groupwise.py51__all__ = ["as_torch_index", "group_mean_std"]CODE
LOWverl/utils/fs.py29__all__ = ["copy", "exists", "makedirs"]CODE
LOWverl/utils/tracking.py29logger = logging.getLogger(__name__)CODE
LOWverl/utils/attention_utils.py100__all__ = ["index_first_axis", "pad_input", "rearrange", "unpad_input"]CODE
LOWverl/utils/fsdp_utils.py40logger = logging.getLogger(__name__)CODE
LOWverl/utils/fsdp_utils.py808def set_reshard_after_forward(module: FSDPModule, reshard_after_forward: bool, recurse: bool = True) -> None:CODE
LOWverl/utils/checkpoint/__init__.py17__all__ = ["CheckpointHandler", "OrchestrationMode"]CODE
LOWverl/utils/qat/linear.py27__all__ = ["QATLinear", "QATMode"]CODE
LOWverl/utils/qat/__init__.py46__all__ = [CODE
LOWverl/utils/qat/core.py27logger = logging.getLogger(__name__)CODE
LOWverl/utils/qat/quantizer.py40logger = logging.getLogger(__name__)CODE
LOWverl/utils/qat/quantizer.py306__all__ = [CODE
LOWverl/utils/qat/vllm_patch.py35logger = logging.getLogger(__name__)CODE
LOWverl/utils/qat/vllm_patch.py824__all__ = [CODE
LOWverl/utils/logger/__init__.py25__all__ = [CODE
LOWverl/utils/dataset/__init__.py18__all__ = ["RLHFDataset", "RMDataset"]CODE
LOWverl/utils/dataset/rl_dataset.py38logger = logging.getLogger(__name__)CODE
LOWverl/utils/tokenizer/continuous_token_wiring.py32logger = logging.getLogger(__name__)CODE
LOWverl/utils/tokenizer/continuous_token.py32logger = logging.getLogger(__name__)CODE
LOWverl/utils/tokenizer/__init__.py23__all__ = [CODE
LOWverl/utils/tokenizer/chat_template.py9logger = logging.getLogger(__name__)CODE
LOWverl/utils/tokenizer/tokenizer.py19__all__ = [CODE
LOWverl/utils/modelopt/__init__.py27__all__ = [CODE
LOWverl/utils/vllm/vllm_fp8_utils.py41logger = logging.getLogger(__name__)CODE
LOWverl/utils/vllm/__init__.py23__all__ = [CODE
LOWverl/utils/veomni/router_replay.py81__all__ = ["RouterReplayAction", "VeOmniRouterReplay"]CODE
LOWverl/utils/skip/__init__.py22__all__ = [CODE
LOWverl/utils/profiler/precision_debugger_profile.py24logger = logging.getLogger(__name__)CODE
LOWverl/utils/profiler/__init__.py30__all__ = [CODE
69 more matches not shown…
Self-Referential Comments44 hits · 118 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_protocol_v2_on_cpu.py434 # Create a DataProto object with some batch and non-tensor dataCOMMENT
MEDIUMtests/test_protocol_v2_on_cpu.py629 # Create a DataProto object with some batch and non-tensor dataCOMMENT
MEDIUMtests/test_protocol_on_cpu.py133 # Create a circular reference and a non-circular one.COMMENT
MEDIUMtests/test_protocol_on_cpu.py371 # Create a DataProto object with some batch and non-tensor dataCOMMENT
MEDIUMtests/test_protocol_on_cpu.py618 # Create a DataProto object with some batch and non-tensor dataCOMMENT
MEDIUMtests/test_protocol_on_cpu.py1220 # Create a DataProto with an empty TensorDict but with a batch sizeCOMMENT
MEDIUMtests/experimental/agent_loop/test_multi_modal.py88 # Create a simple colored image for testingCOMMENT
MEDIUMtests/experimental/agent_loop/test_multi_modal.py330 # Create a simple test imageCOMMENT
MEDIUMtests/experimental/agent_loop/test_basic_agent_loop.py399 # Initialize the class to set up class-level attributesCOMMENT
MEDIUMtests/utils/test_nvtx_profile.py57 # Create a new ProfilerConfig instanceCOMMENT
MEDIUMtests/utils/test_model_on_cpu.py35 # Create a fresh mock config object for each test caseCOMMENT
MEDIUMtests/utils/test_import_utils_on_cpu.py84 # Create a temporary file with syntax errorsCOMMENT
MEDIUMtests/utils/test_special_linear_cross_entropy_tp.py273 # Create a tensor to hold the gathered weights from all ranksCOMMENT
MEDIUMtests/utils/test_special_linear_cross_entropy_tp.py277 # Create a single contiguous tensor to hold all gathered weightsCOMMENT
MEDIUM…sts/utils/dataset/test_multiturn_sft_dataset_on_cpu.py49 # Create a temporary parquet file with test dataCOMMENT
MEDIUM…eward_score/reward_score/test_sandbox_fusion_on_cpu.py338# Define a low global concurrency limit to test the semaphore's effectSTRING
MEDIUM…eward_score/reward_score/test_sandbox_fusion_on_cpu.py340# Define the number of processes used in the testSTRING
MEDIUM…eward_score/reward_score/test_sandbox_fusion_on_cpu.py342# Define the number of tasks processed by check_correctness in each process (i.e., internalSTRING
MEDIUM…eward_score/reward_score/test_sandbox_fusion_on_cpu.py470 # Create a multiprocessing.Semaphore instance, this is the global semaphore we are testing.STRING
MEDIUM…kers/rollout/rollout_sglang/test_http_server_engine.py17# This file is adapted from multiple sources:COMMENT
MEDIUMtests/single_controller/test_decorator_on_cpu.py38# Define a simple worker for testingCOMMENT
MEDIUMtests/trainer/ppo/test_metric_utils_on_cpu.py297 # Create a mock DataProto objectCOMMENT
MEDIUMtests/trainer/ppo/test_metric_utils_on_cpu.py358 # Create a mock DataProto objectCOMMENT
MEDIUMtests/trainer/ppo/test_metric_utils_on_cpu.py435 # Create a mock DataProto objectCOMMENT
MEDIUMverl/protocol.py703 # Create a slice objectCOMMENT
MEDIUM…perimental/fully_async_policy/fully_async_rollouter.py934 # Create the main asynchronous taskCOMMENT
MEDIUMverl/experimental/one_step_off_policy/ray_trainer.py221 # Create the initial batch from the data loaderCOMMENT
MEDIUMverl/utils/megatron_utils.py1591 # Create a dummy total_loss_dict to collect MTP metricsCOMMENT
MEDIUMverl/utils/tensordict_utils.py281 # Create a list of tensordicts containing only non-nested tensors for concatenationCOMMENT
MEDIUMverl/utils/tensordict_utils.py287 # Create a new TensorDict with non-nested items without modifying the originalCOMMENT
MEDIUMverl/utils/tracking.py444 # Create a new table with same columns and existing dataCOMMENT
MEDIUMverl/utils/vllm/vllm_fp8_utils.py347 """This function is used to process the weights after loading for a Linear layer, it is used for vllm v0.10STRING
MEDIUMverl/utils/vllm/vllm_fp8_utils.py402 """This function is used to process the weights after loading for a Linear layer, it is used for vllm 0.11STRING
MEDIUMverl/utils/vllm/vllm_fp8_utils.py464 """This function is used to process the weights after loading for a Linear layer, it is used for vllm v0.14-v0.19.STRING
MEDIUMverl/utils/vllm/vllm_fp8_utils.py526 """This function is used to process the weights after loading for a FusedMoE layer, it is used for vllm v0.10"""STRING
MEDIUMverl/utils/vllm/vllm_fp8_utils.py602 """This function is used to process the weights after loading for a FusedMoE layer, it is used for vllm 0.11"""STRING
MEDIUMverl/utils/debug/performance.py16# This file is deprecated, for new features please develop in profiler/performance.pyCOMMENT
MEDIUMverl/workers/rollout/trtllm_rollout/trtllm_rollout.py153 # Create a new session for each request to avoid resource competitionCOMMENT
MEDIUM…l/workers/rollout/sglang_rollout/http_server_engine.py17# This file is adapted from multiple sources:COMMENT
MEDIUM…l/workers/rollout/sglang_rollout/http_server_engine.py639 # Create a new session for each request to avoid resource competitionCOMMENT
MEDIUMverl/trainer/main_ppo.py32# Define a function to run the PPO-like training processCOMMENT
MEDIUMverl/trainer/main_ppo.py72 # Create a remote instance of the TaskRunner class, andCOMMENT
MEDIUMverl/trainer/main_ppo.py92 # This file is used for performance analysisCOMMENT
MEDIUMverl/trainer/ppo/reward.py140 # Create a semaphore to control concurrent access to the sandboxCOMMENT
Structural Annotation Overuse54 hits · 98 pts
SeverityFileLineSnippetContext
LOWtests/utils/test_activation_offload.py113 # Step 1: Initial update and save checkpointCOMMENT
LOWtests/utils/test_activation_offload.py126 # Step 2: Second update and forward passCOMMENT
LOWtests/utils/test_activation_offload.py138 # Step 3: wrap module with activation offloading and load checkpointCOMMENT
LOWtests/utils/test_activation_offload.py142 # Step 4: Repeat the second update with same inputCOMMENT
LOWtests/utils/test_activation_offload.py154 # Step 4: Verify outputs matchCOMMENT
LOWtests/special_distributed/test_fsdp_ckpt.py107 # Step 1: Initial update and save checkpointCOMMENT
LOWtests/special_distributed/test_fsdp_ckpt.py121 # Step 2: Second update and forward passCOMMENT
LOWtests/special_distributed/test_fsdp_ckpt.py133 # Step 3: Load checkpoint and repeat second updateCOMMENT
LOWtests/special_distributed/test_fsdp_ckpt.py152 # Step 4: Verify outputs matchCOMMENT
LOWdocs/advance/grafana_prometheus.md39### Step 1: Environment Variables and Start Ray ClusterCOMMENT
LOWdocs/advance/grafana_prometheus.md64### Step 2: Start Grafana (Visualization Dashboard)COMMENT
LOWdocs/advance/grafana_prometheus.md80### Step 3: Start Prometheus (Metrics Collection)COMMENT
LOWdocs/advance/grafana_prometheus.md154### Step 6: View Metrics in PrometheusCOMMENT
LOWdocs/advance/grafana_prometheus.md169### Step 7: View Metrics in GrafanaCOMMENT
LOW…experimental/fully_async_policy/fully_async_trainer.py237 # Step 3: Sleep all hybrid replicasCOMMENT
LOWverl/experimental/reward_loop/reward_manager/limited.py269 # NOTE: This class owns a *global*, class-level set of rate limiters. Once the class has beenCOMMENT
LOWverl/utils/megatron/router_replay_patch.py395 # Step 1: Patch TransformerConfig to include the feature flagCOMMENT
LOWverl/utils/megatron/router_replay_patch.py446 # Step 2: Patch TopKRouter only once to ensure idempotency.COMMENT
LOWverl/utils/megatron/router_replay_patch.py452 # Step 3: Define the new __init__ methodCOMMENT
LOWverl/utils/megatron/router_replay_patch.py459 # Step 4: Apply the patchesCOMMENT
LOWverl/models/README.md4### Step 1: Copy the model file from HF to verlCOMMENT
LOWverl/models/README.md8### Step 2: Modify the model file to use packed inputsCOMMENT
LOWverl/models/README.md20### Step 3: Add a function to apply tensor parallelismCOMMENT
LOWverl/models/README.md27### Step 4: Add a function to apply data parallelismCOMMENT
LOWverl/models/README.md31### Step 5: Add a function to apply pipeline parallelismCOMMENT
LOWverl/models/transformers/monkey_patch.py411 # Step 3: patch input for multimodal sequence parallelismCOMMENT
LOWverl/models/transformers/monkey_patch.py417 # Step 1: patch model to support image-text mixed dataCOMMENT
LOWverl/models/transformers/monkey_patch.py450 # Step 2: patch input for multimodal sequence parallelismCOMMENT
LOWverl/models/transformers/monkey_patch.py456 # Step 1: patch model to support image-text mixed dataCOMMENT
LOWverl/models/transformers/monkey_patch.py471 # Step 2: patch attention to support ulysses parallelismCOMMENT
LOWverl/models/transformers/monkey_patch.py478 # Step 3: patch input for multimodal sequence parallelismCOMMENT
LOWverl/models/transformers/monkey_patch.py363 # Step 1: patch model to support image-text mixed dataCOMMENT
LOWverl/models/transformers/monkey_patch.py392 # Step 2: patch attention to support ulysses parallelismCOMMENT
LOWverl/models/transformers/monkey_patch.py498 # Step 1: patch model to support image-text mixed dataCOMMENT
LOWverl/models/transformers/monkey_patch.py524 # Step 2: patch vision model to fix fsdp2 cpu_offload bug.COMMENT
LOWverl/trainer/ppo/rollout_corr_helper.py846 # Step 1: Compute log ratio (log(π_train / π_rollout))COMMENT
LOWverl/trainer/ppo/rollout_corr_helper.py850 # Step 2: Compute IS weights (if enabled)COMMENT
LOWverl/trainer/ppo/rollout_corr_helper.py878 # Step 4: Compute off-policy metrics (KL, PPL, χ², etc.)COMMENT
LOWverl/trainer/ppo/rollout_corr_helper.py886 # Step 6: Add "rollout_corr/" prefix to all metrics for logging consistencyCOMMENT
LOWverl/trainer/ppo/rollout_corr_helper.py894 # Step 7: Wrap IS weights in DataProto for consistency with APICOMMENT
LOWverl/trainer/ppo/rollout_corr_helper.py862 # Step 3: Compute rejection mask (if enabled)COMMENT
LOWverl/trainer/ppo/core_algos.py924 # Step 1: Compute w_per_timestep = 1 - 2π_t + Σπ²)COMMENT
LOWverl/trainer/ppo/core_algos.py928 # Step 2: Apply rollout importance sampling correction (if enabled)COMMENT
LOWverl/trainer/ppo/core_algos.py933 # Step 3: Compute cumulative path-variance proxy: W_t = Σ_{j=1}^t w_jCOMMENT
LOWverl/trainer/ppo/core_algos.py1040 # Step 1: Compute w_per_timestep = 1 - 2π_t + Σπ²)COMMENT
LOWverl/trainer/ppo/core_algos.py1044 # Step 2: Apply rollout importance sampling correction (if enabled)COMMENT
LOWverl/trainer/ppo/core_algos.py1049 # Step 3: Compute cumulative path-variance proxy: W_t = Σ_{j=1}^t w_jCOMMENT
LOWverl/trainer/ppo/core_algos.py1053 # Step 4: Concatenate returns and w_cumulative for each trajectoryCOMMENT
LOWexamples/tutorial/skypilot/README.md7### Step 1: Install SkyPilotCOMMENT
LOWexamples/tutorial/skypilot/README.md28### Step 2: Configure Your PlatformCOMMENT
LOWexamples/tutorial/skypilot/README.md32### Step 3: Set Up Environment VariablesCOMMENT
LOWexamples/data_preprocess/tinyllava_video_r1.py23 # Step 1: DownloadSTRING
LOWexamples/data_preprocess/tinyllava_video_r1.py28 # Step 2: Extract videosSTRING
LOWexamples/data_preprocess/tinyllava_video_r1.py31 # Step 3: PreprocessSTRING
Verbosity Indicators40 hits · 75 pts
SeverityFileLineSnippetContext
LOWtests/utils/test_activation_offload.py113 # Step 1: Initial update and save checkpointCOMMENT
LOWtests/utils/test_activation_offload.py126 # Step 2: Second update and forward passCOMMENT
LOWtests/utils/test_activation_offload.py138 # Step 3: wrap module with activation offloading and load checkpointCOMMENT
LOWtests/utils/test_activation_offload.py142 # Step 4: Repeat the second update with same inputCOMMENT
LOWtests/utils/test_activation_offload.py154 # Step 4: Verify outputs matchCOMMENT
LOWtests/special_distributed/test_fsdp_ckpt.py107 # Step 1: Initial update and save checkpointCOMMENT
LOWtests/special_distributed/test_fsdp_ckpt.py121 # Step 2: Second update and forward passCOMMENT
LOWtests/special_distributed/test_fsdp_ckpt.py133 # Step 3: Load checkpoint and repeat second updateCOMMENT
LOWtests/special_distributed/test_fsdp_ckpt.py152 # Step 4: Verify outputs matchCOMMENT
LOW…experimental/fully_async_policy/fully_async_trainer.py237 # Step 3: Sleep all hybrid replicasCOMMENT
LOWverl/utils/megatron/router_replay_patch.py395 # Step 1: Patch TransformerConfig to include the feature flagCOMMENT
LOWverl/utils/megatron/router_replay_patch.py446 # Step 2: Patch TopKRouter only once to ensure idempotency.COMMENT
LOWverl/utils/megatron/router_replay_patch.py452 # Step 3: Define the new __init__ methodCOMMENT
LOWverl/utils/megatron/router_replay_patch.py459 # Step 4: Apply the patchesCOMMENT
LOWverl/models/transformers/monkey_patch.py411 # Step 3: patch input for multimodal sequence parallelismCOMMENT
LOWverl/models/transformers/monkey_patch.py417 # Step 1: patch model to support image-text mixed dataCOMMENT
LOWverl/models/transformers/monkey_patch.py450 # Step 2: patch input for multimodal sequence parallelismCOMMENT
LOWverl/models/transformers/monkey_patch.py456 # Step 1: patch model to support image-text mixed dataCOMMENT
LOWverl/models/transformers/monkey_patch.py471 # Step 2: patch attention to support ulysses parallelismCOMMENT
LOWverl/models/transformers/monkey_patch.py478 # Step 3: patch input for multimodal sequence parallelismCOMMENT
LOWverl/models/transformers/monkey_patch.py363 # Step 1: patch model to support image-text mixed dataCOMMENT
LOWverl/models/transformers/monkey_patch.py392 # Step 2: patch attention to support ulysses parallelismCOMMENT
LOWverl/models/transformers/monkey_patch.py498 # Step 1: patch model to support image-text mixed dataCOMMENT
LOWverl/models/transformers/monkey_patch.py524 # Step 2: patch vision model to fix fsdp2 cpu_offload bug.COMMENT
LOWverl/trainer/ppo/rollout_corr_helper.py846 # Step 1: Compute log ratio (log(π_train / π_rollout))COMMENT
LOWverl/trainer/ppo/rollout_corr_helper.py850 # Step 2: Compute IS weights (if enabled)COMMENT
LOWverl/trainer/ppo/rollout_corr_helper.py878 # Step 4: Compute off-policy metrics (KL, PPL, χ², etc.)COMMENT
LOWverl/trainer/ppo/rollout_corr_helper.py886 # Step 6: Add "rollout_corr/" prefix to all metrics for logging consistencyCOMMENT
LOWverl/trainer/ppo/rollout_corr_helper.py894 # Step 7: Wrap IS weights in DataProto for consistency with APICOMMENT
LOWverl/trainer/ppo/rollout_corr_helper.py862 # Step 3: Compute rejection mask (if enabled)COMMENT
LOWverl/trainer/ppo/core_algos.py924 # Step 1: Compute w_per_timestep = 1 - 2π_t + Σπ²)COMMENT
LOWverl/trainer/ppo/core_algos.py928 # Step 2: Apply rollout importance sampling correction (if enabled)COMMENT
LOWverl/trainer/ppo/core_algos.py933 # Step 3: Compute cumulative path-variance proxy: W_t = Σ_{j=1}^t w_jCOMMENT
LOWverl/trainer/ppo/core_algos.py1040 # Step 1: Compute w_per_timestep = 1 - 2π_t + Σπ²)COMMENT
LOWverl/trainer/ppo/core_algos.py1044 # Step 2: Apply rollout importance sampling correction (if enabled)COMMENT
LOWverl/trainer/ppo/core_algos.py1049 # Step 3: Compute cumulative path-variance proxy: W_t = Σ_{j=1}^t w_jCOMMENT
LOWverl/trainer/ppo/core_algos.py1053 # Step 4: Concatenate returns and w_cumulative for each trajectoryCOMMENT
LOWexamples/data_preprocess/tinyllava_video_r1.py23 # Step 1: DownloadSTRING
LOWexamples/data_preprocess/tinyllava_video_r1.py28 # Step 2: Extract videosSTRING
LOWexamples/data_preprocess/tinyllava_video_r1.py31 # Step 3: PreprocessSTRING
Redundant / Tautological Comments44 hits · 66 pts
SeverityFileLineSnippetContext
LOWtests/test_protocol_on_cpu.py1073 # Check if it's a nested tensorCOMMENT
LOWtests/experimental/agent_loop/test_multi_modal.py417 # Check if this sample should have image pads (samples with index 1 and 2 in each repeat have images)COMMENT
LOWtests/special_sanity/test_config_docs.py35 # Check if there's a comment aboveCOMMENT
LOWtests/utils/test_special_linear_cross_entropy_tp.py494 # Check if running with torchrun (distributed mode)COMMENT
LOWtests/models/test_tiled_mlp_accuracy.py95 # Check if within tolerance (1e-2 for bf16)COMMENT
LOWverl/protocol.py379 # Check if batch is empty to avoid torch.cat error in consolidateCOMMENT
LOW…perimental/fully_async_policy/fully_async_rollouter.py734 # Check if have reached the last stepCOMMENT
LOW…experimental/fully_async_policy/fully_async_trainer.py549 # Check if validation is neededCOMMENT
LOW…experimental/fully_async_policy/fully_async_trainer.py611 # Check if the ESI (Elastic Server Instance)/training plan is close to expiration.COMMENT
LOW…experimental/fully_async_policy/fully_async_trainer.py616 # Check if the conditions for saving a checkpoint are met.COMMENT
LOWverl/experimental/reward_loop/reward_manager/limited.py267 # Check if already initialized before calling parent.COMMENT
LOWverl/experimental/separation/ray_trainer.py669 # Check if the ESI (Elastic Server Instance)/training plan is close to expiration.COMMENT
LOWverl/experimental/separation/ray_trainer.py674 # Check if the conditions for saving a checkpoint are met.COMMENT
LOWverl/utils/transferqueue_utils.py196 # Check if collect_fn is a functools.partial and handle gracefullyCOMMENT
LOWverl/utils/fp8_utils.py56 # Check if matches exclude patternsCOMMENT
LOWverl/utils/fp8_utils.py76 # Check if matches include patternsCOMMENT
LOWverl/utils/fp8_utils.py106 # Check if quantization is neededCOMMENT
LOWverl/utils/fsdp_utils.py1026 # Check if module is a PEFT modelCOMMENT
LOWverl/utils/qat/vllm_patch.py130 # Check if we have metadata for this layerCOMMENT
LOWverl/utils/qat/vllm_patch.py138 # Check if this param needs rebuildCOMMENT
LOWverl/utils/qat/vllm_patch.py182 # Check if can rebuild from metadataCOMMENT
LOWverl/utils/dataset/multiturn_sft_dataset.py334 # Check if all tensors in the list have the same shapeCOMMENT
LOWverl/utils/dataset/rl_dataset.py576 # Check if a custom dataset class is specified in the data configurationCOMMENT
LOWverl/utils/kernel/fp8_kernel.py22# Check if Triton is availableCOMMENT
LOWverl/models/mcore/mtp_patch.py244 # Check if GPTModel has MTP and find the layersCOMMENT
LOWverl/models/mcore/mtp_patch.py250 # Check if any layer in the model is MultiTokenPredictionLayerCOMMENT
LOWverl/models/mcore/mtp_patch.py283 # Check if GPTModel has MTP and find the layersCOMMENT
LOWverl/models/mcore/mtp_patch.py289 # Check if any layer in the model is MultiTokenPredictionLayerCOMMENT
LOWverl/models/mcore/mtp_patch.py328 # Check if GPTModel has MTP and find the layersCOMMENT
LOWverl/models/mcore/mtp_patch.py334 # Check if any layer in the model is MultiTokenPredictionLayerCOMMENT
LOWverl/models/mcore/mtp_patch.py366 # Check if GPTModel has MTP and find the layersCOMMENT
LOWverl/models/mcore/mtp_patch.py372 # Check if any layer in the model is MultiTokenPredictionLayerCOMMENT
LOW…third_party/torch/distributed/checkpoint/state_dict.py479 # Verify if the model_state_dict and optim_state_dict are valid. This APICOMMENT
LOWverl/workers/rollout/llm_server.py88 # Check if server is still in the active poolCOMMENT
LOW…kers/rollout/trtllm_rollout/trtllm_worker_extension.py153 # Check if model supports partial loading and use appropriate strategyCOMMENT
LOWverl/workers/rollout/vllm_rollout/utils.py365 # Check if FP8 quantization is enabled and apply appropriate weight loadingCOMMENT
LOWverl/workers/engine/veomni/utils.py74 # Check if this is a MultiOptimizer (for ep and non-ep parameters when ep+fsdp2 is enabled)COMMENT
LOWverl/workers/engine/veomni/utils.py94 # Check if this is a MultiOptimizer (for ep and non-ep parameters when ep+fsdp2 is enabled)COMMENT
LOWverl/trainer/main_ppo.py51 # Check if Ray is not initializedCOMMENT
LOWverl/trainer/ppo/metric_utils.py690 # Check if we have the necessary data (sum_pi_squared is required for W-score)COMMENT
LOWverl/trainer/ppo/ray_trainer.py266 # Check if sum_pi_squared is availableCOMMENT
LOWverl/trainer/ppo/ray_trainer.py1655 # Check if the ESI (Elastic Server Instance)/training plan is close to expiration.COMMENT
LOWverl/trainer/ppo/ray_trainer.py1660 # Check if the conditions for saving a checkpoint are met.COMMENT
LOWexamples/tutorial/skypilot/verl-ppo.yaml22 # Check if the script exists and use absolute pathCOMMENT
AI Structural Patterns52 hits · 46 pts
SeverityFileLineSnippetContext
LOW…perimental/agent_loop/test_qwen3_tool_parser_on_cpu.py55CODE
LOWtests/single_controller/test_worker_group_basics.py103CODE
LOWtests/special_e2e/envs/digit_completion/task.py136CODE
LOWverl/protocol.py1126CODE
LOWverl/protocol.py1195CODE
LOWverl/experimental/agent_loop/agent_loop.py659CODE
LOWverl/experimental/separation/ray_trainer.py59CODE
LOWverl/utils/torch_functional.py69CODE
LOWverl/utils/torch_functional.py638CODE
LOWverl/utils/torch_functional.py669CODE
LOWverl/utils/torch_functional.py1004CODE
LOWverl/utils/checkpoint/megatron_checkpoint_manager.py307CODE
LOWverl/utils/qat/linear.py345CODE
LOWverl/utils/dataset/rm_dataset.py41CODE
LOWverl/utils/megatron/tensor_parallel.py233CODE
LOWverl/utils/megatron/router_replay_utils.py448CODE
LOWverl/utils/reward_score/rlla.py248CODE
LOWverl/models/mcore/patch.py231CODE
LOWverl/models/mcore/model_forward_fused.py231CODE
LOWverl/models/mcore/model_forward.py264CODE
LOWverl/models/mcore/mtp_patch.py73CODE
LOWverl/models/mcore/model_forward_1f1b_overlap.py62CODE
LOWverl/models/mcore/model_forward_1f1b_overlap.py245CODE
LOWverl/models/transformers/dense_common.py29CODE
LOWverl/models/transformers/dense_common.py71CODE
LOWverl/models/transformers/dense_common.py139CODE
LOWverl/models/transformers/npu_patch.py99CODE
LOWverl/third_party/torch/distributed/_state_dict_utils.py394CODE
LOWverl/third_party/torch/distributed/_state_dict_utils.py526CODE
LOWverl/workers/utils/padding.py143CODE
LOWverl/workers/rollout/hf_rollout.py51CODE
LOW…l/workers/rollout/sglang_rollout/http_server_engine.py214CODE
LOW…l/workers/rollout/sglang_rollout/http_server_engine.py422CODE
LOW…l/workers/rollout/sglang_rollout/http_server_engine.py585CODE
LOW…l/workers/rollout/sglang_rollout/http_server_engine.py866CODE
LOW…l/workers/rollout/sglang_rollout/http_server_engine.py831CODE
LOW…l/workers/rollout/sglang_rollout/http_server_engine.py868CODE
LOW…l/workers/rollout/sglang_rollout/http_server_engine.py947CODE
LOWverl/workers/engine/utils.py159CODE
LOWverl/single_controller/ray/base.py426CODE
LOWverl/single_controller/base/worker.py348CODE
LOWverl/trainer/ppo/metric_utils.py839CODE
LOWexamples/data_preprocess/full_hh_rlhf.py118CODE
LOWexamples/data_preprocess/gsm8k.py85CODE
LOWexamples/data_preprocess/gsm8k_multiturn_w_tool.py106CODE
LOWexamples/data_preprocess/openr1mm.py75CODE
LOWexamples/data_preprocess/gsm8k_multiturn_sft.py79CODE
LOWexamples/data_preprocess/math_dataset.py78CODE
LOWexamples/data_preprocess/gsm8k_tool_agent_loop.py107CODE
LOWexamples/data_preprocess/geo3k.py83CODE
LOWexamples/data_preprocess/hellaswag.py81CODE
LOWexamples/data_preprocess/geo3k_multiturn_w_tool.py102CODE
AI Slop Vocabulary13 hits · 34 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_protocol_on_cpu.py98 # 4D object array to ensure deep recursion is robustCOMMENT
MEDIUM…fully_async_policy/config/fully_async_ppo_trainer.yaml66# And it can be used in conjunction with other rollout_correction algorithms.COMMENT
MEDIUM…nc_policy/config/fully_async_ppo_megatron_trainer.yaml65# And it can be used in conjunction with other rollout_correction algorithms.COMMENT
MEDIUM…f_policy/config/one_step_off_ppo_megatron_trainer.yaml28# And it can be used in conjunction with other rollout_correction algorithms.COMMENT
MEDIUM…e_step_off_policy/config/one_step_off_ppo_trainer.yaml28# And it can be used in conjunction with other rollout_correction algorithms.COMMENT
MEDIUMverl/utils/vllm/vllm_fp8_utils.py713 # robust than version string comparison, especially for dev/pre-release versions.COMMENT
MEDIUMverl/utils/reward_score/math_dapo.py14# Adapted from https://github.com/EleutherAI/lm-evaluation-harness/blob/main/lm_eval/tasks/hendrycks_math/utils.pyCOMMENT
MEDIUMverl/utils/reward_score/math_reward.py14# Adapted from https://github.com/EleutherAI/lm-evaluation-harness/blob/main/lm_eval/tasks/hendrycks_math/utils.pyCOMMENT
MEDIUMverl/utils/reward_score/math_reward.py31# string normalization from https://github.com/EleutherAI/lm-evaluation-harness/blob/master/lm_eval/tasks/hendrycks_mathCOMMENT
LOW…third_party/torch/distributed/checkpoint/state_dict.py1180 >>> # if we simply call ddp_model.state_dict() and fsdp_model.state_dict(),STRING
MEDIUMverl/single_controller/ray/base.py207 # that can utilize different WorkerGroup for differnt modelsCOMMENT
MEDIUMverl/trainer/ppo/rollout_corr_helper.py667 """Compute comprehensive metrics for truncated importance sampling weights.STRING
MEDIUMverl/trainer/ppo/utils.py156 # Use a sampler to facilitate checkpoint resumption.COMMENT
Hallucination Indicators2 hits · 30 pts
SeverityFileLineSnippetContext
CRITICALtests/trainer/ppo/test_core_algos_on_cpu.py42 verl.trainer.ppo.core_algos.ADV_ESTIMATOR_REGISTRY.clear()CODE
CRITICALtests/trainer/ppo/test_core_algos_on_cpu.py50 verl.trainer.ppo.core_algos.ADV_ESTIMATOR_REGISTRY.clear()CODE
Modern AI Meta-Vocabulary9 hits · 29 pts
SeverityFileLineSnippetContext
MEDIUMREADME.md288- [DART-GUI](https://github.com/Computer-use-agents/dart-gui): a decoupled agentic RL framework for Computer Use Agents,CODE
MEDIUMtests/utils/test_turn_separator_on_cpu.py39# Thinking model (e.g. Qwen3): assistant turns are wrapped in ``<think></think>`` scaffolding. TheCOMMENT
MEDIUMtests/utils/test_turn_separator_on_cpu.py41# the scaffold, which is why the helper probes user turns instead.COMMENT
MEDIUMtests/utils/test_turn_separator_on_cpu.py200 # The template really does inject scaffolding, so a naive assistant-turn probe is wrong: this isCOMMENT
MEDIUMtests/utils/test_turn_separator_on_cpu.py209 # The real helper avoids the scaffold and recovers the true separator.COMMENT
MEDIUM…les/grpo_trainer/run_kimi_k2_6_glm5_1_megatron_lite.sh4# Megatron Lite is Megatron's agentic experimental path. Its upstream home isCOMMENT
MEDIUMexamples/grpo_trainer/run_qwen3_5_35b_megatron_lite.sh4# Megatron Lite is Megatron's agentic experimental path. Its upstream home isCOMMENT
MEDIUMexamples/grpo_trainer/run_deepseek_v4_megatron_lite.sh4# Megatron Lite is Megatron's agentic experimental path. Its upstream home isCOMMENT
MEDIUMexamples/sft/gsm8k/run_deepseek_v4_megatron_lite.sh4# Megatron Lite is Megatron's agentic experimental path. Its upstream home isCOMMENT
Slop Phrases3 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUMverl/models/mcore/mtp_patch.py443 # embedding computation - you can modify this partCOMMENT
MEDIUMverl/trainer/config/rollout/rollout.yaml56# you can use smaller batch size to save memory used in cuda graph, eg: [1 ,2, 4, 8, 16, 32]COMMENT
MEDIUMexamples/grpo_trainer/run_gpt_oss_20b_fsdp.sh63# or you can use lmsys/gpt-oss-20b-bf16COMMENT
Overly Generic Function Names4 hits · 4 pts
SeverityFileLineSnippetContext
LOWtests/utils/test_rollout_trace_on_cpu.py67 async def my_method(self, a, b="default"):CODE
LOWtests/utils/test_rollout_trace_on_cpu.py90 async def my_method(self, x):CODE
LOWtests/utils/_test_module.py30def test_function():CODE
LOWverl/utils/activation_offload.py457 def my_function(*inputs):CODE
TODO Padding2 hits · 3 pts
SeverityFileLineSnippetContext
LOWverl/experimental/separation/ray_trainer.py722 # TODO: implement actual tflpo and theoretical tflpoCOMMENT
LOWverl/trainer/ppo/ray_trainer.py1736 # TODO: implement actual tflpo and theoretical tflpoCOMMENT
Cross-Language Confusion1 hit · 2 pts
SeverityFileLineSnippetContext
HIGHverl/trainer/ppo/rollout_corr_helper.py920 - kl: Direct KL divergence estimator KL(π_rollout || π_training)STRING
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOWtests/special_e2e/run_fully_async_policy_opd.sh24# Usage:COMMENT