Repository Analysis

verl-project/verl

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

21.0 Moderate AI signal View on GitHub
21.0
Adjusted Score
21.0
Raw Score
100%
Time Factor
2026-05-29
Last Push
21,654
Stars
Python
Language
182,936
Lines of Code
893
Files
2866
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 3HIGH 70MEDIUM 259LOW 2534

Pattern Findings

2866 matches across 17 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers1138 hits · 1166 pts
SeverityFileLineSnippet
LOWtests/test_protocol_v2_on_cpu.py67def test_tensor_dict_constructor():
LOWtests/test_protocol_v2_on_cpu.py92def test_index_select_tensor_dict():
LOWtests/test_protocol_v2_on_cpu.py152def test_tensordict_with_images():
LOWtests/test_protocol_v2_on_cpu.py180def test_tensordict_with_packing():
LOWtests/test_protocol_v2_on_cpu.py269def test_tensor_dict_make_iterator():
LOWtests/test_protocol_v2_on_cpu.py509def test_torch_save_data_proto():
LOWtests/test_protocol_v2_on_cpu.py654def test_dataproto_chunk_after_index():
LOWtests/test_protocol_v2_on_cpu.py697def test_concat_nested_tensor():
LOWtests/test_protocol_v2_on_cpu.py923def test_assign_non_tensor_stack_with_nested_lists():
LOWtests/test_protocol_v2_on_cpu.py938def test_assign_non_tensor_stack_with_nested_dicts():
LOWtests/test_protocol_v2_on_cpu.py953def test_assign_non_tensor_stack_with_complex_nested():
LOWtests/test_protocol_v2_on_cpu.py972def test_assign_non_tensor_handles_wrappers():
LOWtests/test_protocol_v2_on_cpu.py987def test_assign_non_tensor_stack_batch_size_check():
LOWtests/test_protocol_v2_on_cpu.py995def test_assign_non_tensor_with_auto_detection():
LOWtests/test_protocol_v2_on_cpu.py1018def test_get_tensordict_with_nested_lists():
LOWtests/test_protocol_v2_on_cpu.py1033def test_get_tensordict_with_nested_dicts():
LOWtests/test_protocol_v2_on_cpu.py1045def test_get_tensordict_with_complex_nested_structures():
LOWtests/test_protocol_v2_on_cpu.py1060def test_get_tensordict_agent_loop_scenario():
LOWtests/test_base_config_on_cpu.py33def test_getitem_nonexistent_attribute(base_config_mock):
LOWtests/test_base_config_on_cpu.py39def test_getitem_invalid_key_type(base_config_mock):
LOWtests/test_protocol_on_cpu.py141def test_tensor_dict_constructor():
LOWtests/test_protocol_on_cpu.py155def test_tensor_dict_make_iterator():
LOWtests/test_protocol_on_cpu.py219def test_concat_metrics_from_multiple_workers():
LOWtests/test_protocol_on_cpu.py249def test_concat_with_empty_and_non_list_meta_info():
LOWtests/test_protocol_on_cpu.py272def test_concat_first_worker_missing_metrics():
LOWtests/test_protocol_on_cpu.py295def test_concat_non_list_metrics():
LOWtests/test_protocol_on_cpu.py315def test_concat_merge_different_non_metric_keys():
LOWtests/test_protocol_on_cpu.py339def test_concat_conflicting_non_metric_keys():
LOWtests/test_protocol_on_cpu.py447def test_dataproto_fold_unfold():
LOWtests/test_protocol_on_cpu.py470def test_torch_save_data_proto():
LOWtests/test_protocol_on_cpu.py570def test_old_vs_new_from_single_dict():
LOWtests/test_protocol_on_cpu.py642def test_dataproto_unfold_column_chunks():
LOWtests/test_protocol_on_cpu.py708def test_dataproto_chunk_after_index():
LOWtests/test_protocol_on_cpu.py785def test_to_tensordict_with_nested_lists():
LOWtests/test_protocol_on_cpu.py810def test_to_tensordict_with_nested_dicts():
LOWtests/test_protocol_on_cpu.py834def test_to_tensordict_with_complex_nested_structures():
LOWtests/test_protocol_on_cpu.py862def test_to_tensordict_and_back_with_nested_data():
LOWtests/test_protocol_on_cpu.py926def test_to_tensordict_agent_loop_scenario():
LOWtests/test_protocol_on_cpu.py993def test_serialize_deserialize_single_tensor():
LOWtests/test_protocol_on_cpu.py1010def test_serialize_deserialize_tensordict_regular_tensors():
LOWtests/test_protocol_on_cpu.py1039def test_serialize_deserialize_tensordict_nested_tensors():
LOWtests/test_protocol_on_cpu.py1092def test_serialize_deserialize_tensordict_mixed_types():
LOWtests/test_protocol_on_cpu.py1177def test_serialize_deserialize_tensordict_with_device():
LOWtests/test_protocol_on_cpu.py1208def test_serialize_dataproto_with_empty_tensordict():
LOW…l/fully_async_policy/test_async_genrm_config_on_cpu.py76 def _validate_async_rm_config(config):
LOW…l/fully_async_policy/test_async_genrm_config_on_cpu.py92 def test_rm_enabled_standalone_passes(self):
LOW…l/fully_async_policy/test_async_genrm_config_on_cpu.py98 def test_rm_enabled_colocate_fails(self):
LOWtests/experimental/vla/test_sim_envs.py37def test_sim_env_creation_and_step(simulator_type):
LOW…ts/experimental/reward_loop/test_reward_model_disrm.py107def test_reward_model_manager():
LOW…reward_loop/test_rate_limited_reward_manager_on_cpu.py71def mock_sync_reward_function(
LOW…reward_loop/test_rate_limited_reward_manager_on_cpu.py83async def mock_async_reward_function(
LOW…reward_loop/test_rate_limited_reward_manager_on_cpu.py106async def mock_failing_api_function(
LOW…reward_loop/test_rate_limited_reward_manager_on_cpu.py114async def mock_dict_result_function(
LOW…reward_loop/test_rate_limited_reward_manager_on_cpu.py169 async def test_basic_reward_computation(self, tokenizer):
LOW…reward_loop/test_rate_limited_reward_manager_on_cpu.py258 async def test_concurrency_limiting(self, tokenizer):
LOW…reward_loop/test_rate_limited_reward_manager_on_cpu.py351 async def test_sync_reward_function(self, tokenizer):
LOW…reward_loop/test_rate_limited_reward_manager_on_cpu.py366 async def test_combined_rate_limits(self, tokenizer):
LOW…reward_loop/test_rate_limited_reward_manager_on_cpu.py402 async def test_correct_vs_incorrect_answers(self, tokenizer):
LOW…reward_loop/test_rate_limited_reward_manager_on_cpu.py463 async def test_class_initialization_once(self, tokenizer):
LOW…reward_loop/test_rate_limited_reward_manager_on_cpu.py482 async def mock_reward_with_extra_info(
1078 more matches not shown…
Decorative Section Separators177 hits · 662 pts
SeverityFileLineSnippet
MEDIUMpyproject.toml1# -------------------------------
MEDIUMpyproject.toml3# -------------------------------
MEDIUMpyproject.toml11# -------------------------------
MEDIUMpyproject.toml13# -------------------------------
MEDIUMpyproject.toml26# -------------------------------
MEDIUMpyproject.toml28# -------------------------------
MEDIUMpyproject.toml68# -------------------------------
MEDIUMpyproject.toml70# -------------------------------
MEDIUMpyproject.toml90# -------------------------------
MEDIUMpyproject.toml92# -------------------------------
MEDIUMtests/experimental/agent_loop/test_basic_agent_loop.py411# ──────────────────────────────────────────────────────────────────────
MEDIUMtests/experimental/agent_loop/test_basic_agent_loop.py413# ──────────────────────────────────────────────────────────────────────
MEDIUMtests/tools/test_function_tool_on_cpu.py52# ---------------------------------------------------------------------------
MEDIUMtests/tools/test_function_tool_on_cpu.py54# ---------------------------------------------------------------------------
MEDIUMtests/tools/test_function_tool_on_cpu.py331# ---------------------------------------------------------------------------
MEDIUMtests/tools/test_function_tool_on_cpu.py333# ---------------------------------------------------------------------------
MEDIUMtests/tools/test_function_tool_on_cpu.py491# ---------------------------------------------------------------------------
MEDIUMtests/tools/test_function_tool_on_cpu.py493# ---------------------------------------------------------------------------
MEDIUMtests/tools/test_function_tool_on_cpu.py586# ---------------------------------------------------------------------------
MEDIUMtests/tools/test_function_tool_on_cpu.py588# ---------------------------------------------------------------------------
MEDIUMtests/utils/test_bucketed_weight_transfer.py61# ---------------------------------------------------------------------------
MEDIUMtests/utils/test_bucketed_weight_transfer.py63# ---------------------------------------------------------------------------
MEDIUMtests/utils/test_bucketed_weight_transfer.py95# ---------------------------------------------------------------------------
MEDIUMtests/utils/test_bucketed_weight_transfer.py97# ---------------------------------------------------------------------------
MEDIUMtests/utils/test_bucketed_weight_transfer.py145# ---------------------------------------------------------------------------
MEDIUMtests/utils/test_bucketed_weight_transfer.py147# ---------------------------------------------------------------------------
MEDIUMtests/utils/test_bucketed_weight_transfer.py181# ---------------------------------------------------------------------------
MEDIUMtests/utils/test_bucketed_weight_transfer.py183# ---------------------------------------------------------------------------
MEDIUMtests/utils/veomni/test_router_replay_on_cpu.py103# ===========================================================
MEDIUMtests/utils/veomni/test_router_replay_on_cpu.py105# ===========================================================
MEDIUMtests/utils/veomni/test_router_replay_on_cpu.py123# ===========================================================
MEDIUMtests/utils/veomni/test_router_replay_on_cpu.py125# ===========================================================
MEDIUMtests/utils/veomni/test_router_replay_on_cpu.py142# ===========================================================
MEDIUMtests/utils/veomni/test_router_replay_on_cpu.py144# ===========================================================
MEDIUMtests/utils/veomni/test_router_replay_on_cpu.py292# ===========================================================
MEDIUMtests/utils/veomni/test_router_replay_on_cpu.py294# ===========================================================
MEDIUMtests/utils/veomni/test_router_replay_on_cpu.py317# ===========================================================
MEDIUMtests/utils/veomni/test_router_replay_on_cpu.py319# ===========================================================
MEDIUMtests/utils/veomni/test_router_replay_on_cpu.py333# ===========================================================
MEDIUMtests/utils/veomni/test_router_replay_on_cpu.py335# ===========================================================
MEDIUMtests/utils/veomni/test_router_replay_on_cpu.py348# ===========================================================
MEDIUMtests/utils/veomni/test_router_replay_on_cpu.py350# ===========================================================
MEDIUMtests/models/test_fused_kernels_ulysses_sp_on_cpu.py50# ---------------------------------------------------------------------------
MEDIUMtests/models/test_fused_kernels_ulysses_sp_on_cpu.py52# ---------------------------------------------------------------------------
MEDIUMtests/models/test_fused_kernels_ulysses_sp_on_cpu.py94# ---------------------------------------------------------------------------
MEDIUMtests/models/test_fused_kernels_ulysses_sp_on_cpu.py98# ---------------------------------------------------------------------------
MEDIUM…ts/workers/test_router_replay_engine_helpers_on_cpu.py113# ===========================================================
MEDIUM…ts/workers/test_router_replay_engine_helpers_on_cpu.py115# ===========================================================
MEDIUMtests/workers/test_engine_workers_lora_sync.py118# ---------------------------------------------------------------------------
MEDIUMtests/workers/test_engine_workers_lora_sync.py120# ---------------------------------------------------------------------------
MEDIUMtests/workers/test_engine_workers_lora_sync.py259# ---------------------------------------------------------------------------
MEDIUMtests/workers/test_engine_workers_lora_sync.py261# ---------------------------------------------------------------------------
MEDIUMtests/workers/test_engine_workers_lora_sync.py317# ---------------------------------------------------------------------------
MEDIUMtests/workers/test_engine_workers_lora_sync.py319# ---------------------------------------------------------------------------
MEDIUMtests/workers/test_engine_workers_lora_sync.py360# ---------------------------------------------------------------------------
MEDIUMtests/workers/test_engine_workers_lora_sync.py362# ---------------------------------------------------------------------------
MEDIUMtests/workers/test_engine_workers_lora_sync.py31# ---------------------------------------------------------------------------
MEDIUMtests/workers/test_engine_workers_lora_sync.py33# ---------------------------------------------------------------------------
MEDIUM…orkers/rollout/rollout_sglang/test_lora_sleep_level.py29# ---------------------------------------------------------------------------
MEDIUM…orkers/rollout/rollout_sglang/test_lora_sleep_level.py32# ---------------------------------------------------------------------------
117 more matches not shown…
Over-Commented Block668 hits · 662 pts
SeverityFileLineSnippet
LOWsetup.py1# Copyright 2024 Bytedance Ltd. and/or its affiliates
LOWtests/test_protocol_v2_on_cpu.py1# Copyright 2024 Bytedance Ltd. and/or its affiliates
LOWtests/test_protocol_v2_on_cpu.py581 # assert result_np_bool.keys() == data.keys()
LOWtests/test_base_config_on_cpu.py1# Copyright 2024 Bytedance Ltd. and/or its affiliates
LOWtests/__init__.py1# Copyright 2024 Bytedance Ltd. and/or its affiliates
LOWtests/test_protocol_on_cpu.py1# Copyright 2024 Bytedance Ltd. and/or its affiliates
LOWtests/experimental/fully_async_policy/__init__.py1# Copyright 2025 Bytedance Ltd. and/or its affiliates
LOW…l/fully_async_policy/test_async_genrm_config_on_cpu.py1# Copyright 2025 Bytedance Ltd. and/or its affiliates
LOWtests/experimental/vla/test_sim_envs.py1# Copyright 2024 Bytedance Ltd. and/or its affiliates
LOW…ts/experimental/reward_loop/test_reward_model_disrm.py1# Copyright 2024 Bytedance Ltd. and/or its affiliates
LOW…reward_loop/test_rate_limited_reward_manager_on_cpu.py1# Copyright 2024 Bytedance Ltd. and/or its affiliates
LOW…ental/reward_loop/test_agent_reward_loop_standalone.py1# Copyright 2024 Bytedance Ltd. and/or its affiliates
LOWtests/experimental/reward_loop/test_math_verify.py1# Copyright 2024 Bytedance Ltd. and/or its affiliates
LOW…imental/reward_loop/test_agent_reward_loop_colocate.py1# Copyright 2024 Bytedance Ltd. and/or its affiliates
LOW…ts/experimental/reward_loop/test_reward_model_genrm.py1# Copyright 2024 Bytedance Ltd. and/or its affiliates
LOW…rimental/reward_loop/test_async_token_bucket_on_cpu.py1# Copyright 2024 Bytedance Ltd. and/or its affiliates
LOWtests/experimental/reward_loop/reward_fn.py1# Copyright 2025 Bytedance Ltd. and/or its affiliates
LOWtests/experimental/agent_loop/test_multi_modal.py1# Copyright 2024 Bytedance Ltd. and/or its affiliates
LOWtests/experimental/agent_loop/test_call_tool_on_cpu.py1# Copyright 2025 Bytedance Ltd. and/or its affiliates
LOWtests/experimental/agent_loop/test_basic_agent_loop.py1# Copyright 2024 Bytedance Ltd. and/or its affiliates
LOWtests/experimental/agent_loop/agent_utils.py1# Copyright 2024 Bytedance Ltd. and/or its affiliates
LOW…sts/experimental/agent_loop/test_standalone_rollout.py1# Copyright 2024 Bytedance Ltd. and/or its affiliates
LOW…mental/agent_loop/test_audio_server_contract_on_cpu.py1# Copyright 2024 Bytedance Ltd. and/or its affiliates
LOWtests/experimental/agent_loop/function_tool_examples.py1# Copyright 2026 Bytedance Ltd. and/or its affiliates
LOW…ent_loop/test_agent_loop_extra_fields_schema_on_cpu.py1# Copyright 2026 Bytedance Ltd. and/or its affiliates
LOW…ts/experimental/agent_loop/test_gpt_oss_tool_parser.py1# Copyright 2024 Bytedance Ltd. and/or its affiliates
LOWtests/tools/test_mixed_tools_on_cpu.py1# Copyright 2025 Bytedance Ltd. and/or its affiliates
LOWtests/tools/__init__.py1# Copyright 2026 Bytedance Ltd. and/or its affiliates
LOWtests/tools/test_function_tool_on_cpu.py1# Copyright 2025 Bytedance Ltd. and/or its affiliates
LOWtests/tools/_stub_search_tools.py1# Copyright 2025 Bytedance Ltd. and/or its affiliates
LOWtests/special_sanity/check_docstrings.py1# Copyright 2025 Bytedance Ltd. and/or its affiliates
LOWtests/special_sanity/check_device_api_usage.py1# Copyright 2025 Bytedance Ltd. and/or its affiliates
LOWtests/special_sanity/check_dataproto_usage.py1# Copyright 2025 Bytedance Ltd. and/or its affiliates
LOWtests/special_sanity/test_check_example_naming.py1# Copyright 2026 Bytedance Ltd. and/or its affiliates
LOWtests/special_sanity/check_license.py1# Copyright 2024 Bytedance Ltd. and/or its affiliates
LOWtests/special_sanity/check_api_docs.py1# Copyright 2024 Bytedance Ltd. and/or its affiliates
LOWtests/special_sanity/check_pr_description.py1# Copyright 2025 Bytedance Ltd. and/or its affiliates
LOWtests/special_sanity/validate_imported_docs.py1# Copyright 2025 Bytedance Ltd. and/or its affiliates
LOWtests/special_sanity/check_example_naming.py1# Copyright 2026 Bytedance Ltd. and/or its affiliates
LOWtests/special_sanity/test_import.py1# Copyright 2024 Bytedance Ltd. and/or its affiliates
LOWtests/special_sanity/check_docs_time_info.py1# Copyright 2025 Bytedance Ltd. and/or its affiliates
LOWtests/special_sanity/test_config_docs.py1# Copyright 2025 Bytedance Ltd. and/or its affiliates
LOWtests/special_sanity/type_coverage_check.py1# Copyright 2025 Bytedance Ltd. and/or its affiliates
LOWtests/special_sanity/validate_structure.py1# Copyright 2025 Bytedance Ltd. and/or its affiliates
LOWtests/special_sanity/check_pr_title.py1# Copyright 2025 Bytedance Ltd. and/or its affiliates
LOWtests/utils/test_bucketed_weight_transfer.py1# Copyright 2025 Bytedance Ltd. and/or its affiliates
LOWtests/utils/test_linear_cross_entropy.py1#
LOWtests/utils/test_fsdp_wrap_policy_on_cpu.py1# Copyright 2025 Bytedance Ltd. and/or its affiliates
LOWtests/utils/test_shared_memory.py1# Copyright 2024 Bytedance Ltd. and/or its affiliates
LOWtests/utils/test_config_on_cpu.py1# Copyright 2025 Bytedance Ltd. and/or its affiliates
LOWtests/utils/test_torch_profile.py1# Copyright 2026 Bytedance Ltd. and/or its affiliates
LOWtests/utils/test_rollout_trace_on_cpu.py1# Copyright 2025 Bytedance Ltd. and/or its affiliates
LOWtests/utils/test_temp_env_on_cpu.py1# Copyright 2024 Bytedance Ltd. and/or its affiliates
LOWtests/utils/test_timeout_decorator_cpu.py1# Copyright 2024 Bytedance Ltd. and/or its affiliates
LOWtests/utils/test_nvtx_profile.py1# Copyright 2024 Bytedance Ltd. and/or its affiliates
LOWtests/utils/test_nvtx_profile.py141 # def test_annotate_discrete_mode(self):
LOWtests/utils/test_tracking_on_cpu.py1# Copyright 2025 Bytedance Ltd. and/or its affiliates
LOWtests/utils/test_mlflow_key_sanitization.py1# Copyright 2024 Bytedance Ltd. and/or its affiliates
LOWtests/utils/test_check_profiler_output.py1# Copyright 2026 Bytedance Ltd. and/or its affiliates
LOWtests/utils/_test_module.py1# Copyright 2025 Bytedance Ltd. and/or its affiliates
608 more matches not shown…
Excessive Try-Catch Wrapping220 hits · 248 pts
SeverityFileLineSnippet
LOWtests/test_protocol_on_cpu.py1115 except Exception:
LOWtests/test_protocol_on_cpu.py1228 except Exception as e:
LOWtests/experimental/reward_loop/reward_fn.py50 except Exception as e:
LOWtests/experimental/reward_loop/reward_fn.py82 except Exception:
LOWtests/experimental/agent_loop/test_multi_modal.py122 except Exception as e:
LOWtests/experimental/agent_loop/test_basic_agent_loop.py154 except Exception as e:
LOWtests/experimental/agent_loop/test_basic_agent_loop.py186 except Exception as e:
LOWtests/experimental/agent_loop/function_tool_examples.py69 except Exception as e:
LOWtests/special_sanity/check_docstrings.py83 except Exception as e:
MEDIUMtests/special_sanity/check_docstrings.py84 print(f"Error processing {filepath}: {e}")
LOWtests/special_sanity/check_api_docs.py68 except Exception as exc:
LOWtests/special_sanity/check_pr_description.py54 except Exception as e:
LOWtests/special_sanity/check_pr_description.py63 except Exception as e:
MEDIUMtests/special_sanity/check_pr_description.py58def load_pr_body(event_path):
LOWtests/special_sanity/validate_imported_docs.py88 except Exception: # pragma: no cover – wide net for import quirks
MEDIUMtests/special_sanity/check_docs_time_info.py54 print(f"Error: Documentation directory '{DOCS_DIR}' does not exist.", file=sys.stderr)
LOWtests/special_sanity/type_coverage_check.py50 except Exception:
LOWtests/utils/test_shared_memory.py218 except Exception as e:
MEDIUMtests/utils/test_shared_memory.py219 print(f"Error in child process: {e}")
LOWtests/utils/test_timeout_decorator_cpu.py77 except Exception as e:
LOWtests/utils/test_timeout_decorator_cpu.py170 except Exception as e:
LOWtests/utils/test_timeout_decorator_cpu.py182 except Exception as e:
LOWtests/utils/test_timeout_decorator_cpu.py211 except Exception as e:
LOWtests/utils/test_timeout_decorator_cpu.py223 except Exception as e:
MEDIUMtests/utils/test_timeout_decorator_cpu.py164def slow_task_in_thread():
MEDIUMtests/utils/test_timeout_decorator_cpu.py176def thread_target():
MEDIUMtests/utils/test_timeout_decorator_cpu.py205def slow_task_in_thread():
MEDIUMtests/utils/test_timeout_decorator_cpu.py217def thread_target():
LOWtests/utils/test_check_profiler_output.py147 except Exception as e:
LOW…kers/rollout/rollout_sglang/test_http_server_engine.py902 except Exception:
LOWtests/special_e2e/check_results.py30 except Exception:
LOWtests/trainer/ppo/test_rollout_corr.py428 except Exception as e:
LOW…rl/experimental/fully_async_policy/fully_async_main.py194 except Exception as e:
LOW…rl/experimental/fully_async_policy/fully_async_main.py202 except Exception as e:
LOWverl/experimental/fully_async_policy/detach_utils.py354 except Exception as e:
LOWverl/experimental/fully_async_policy/message_queue.py159 except Exception:
LOW…perimental/fully_async_policy/fully_async_rollouter.py341 except Exception as e:
LOW…perimental/fully_async_policy/fully_async_rollouter.py286 except Exception as e:
LOW…perimental/fully_async_policy/fully_async_rollouter.py989 except Exception as e:
LOW…perimental/fully_async_policy/fully_async_rollouter.py1035 except Exception as e:
LOW…experimental/fully_async_policy/fully_async_trainer.py266 except Exception as e:
LOW…l/fully_async_policy/unittest/simple_streaming_demo.py111 except Exception as e:
LOWverl/experimental/reward_loop/reward_loop.py181 except Exception as e:
LOWverl/experimental/reward_loop/reward_manager/limited.py460 except Exception as e:
LOWverl/experimental/reward_loop/router/naive_router.py40 except Exception:
LOWverl/experimental/reward_loop/router/naive_router.py43 except Exception:
LOWverl/experimental/reward_loop/router/naive_router.py165 except Exception as e:
LOWverl/experimental/agent_loop/tool_parser.py119 except Exception as e:
LOWverl/experimental/agent_loop/tool_parser.py176 except Exception as e:
LOWverl/experimental/agent_loop/tool_parser.py246 except Exception:
LOWverl/experimental/agent_loop/tool_parser.py258 except Exception:
LOWverl/experimental/agent_loop/tool_parser.py277 except Exception:
LOWverl/experimental/agent_loop/tool_parser.py284 except Exception:
LOWverl/experimental/agent_loop/tool_parser.py351 except Exception as e:
LOWverl/experimental/agent_loop/tool_parser.py425 except Exception as e:
LOWverl/experimental/agent_loop/tool_agent_loop.py453 except Exception as e:
LOWverl/experimental/one_step_off_policy/ray_trainer.py215 except Exception as e:
MEDIUMverl/experimental/one_step_off_policy/ray_trainer.py216 print(f"Error in async_gen_next_batch: {e}")
LOWverl/model_merger/base_model_merger.py248 except Exception as e:
LOWverl/model_merger/base_model_merger.py438 except Exception as e:
160 more matches not shown…
Deep Nesting238 hits · 216 pts
SeverityFileLineSnippet
LOWtests/test_protocol_v2_on_cpu.py802
LOWtests/test_protocol_on_cpu.py1092
LOWtests/experimental/agent_loop/test_multi_modal.py76
LOW…mental/agent_loop/test_audio_server_contract_on_cpu.py30
LOWtests/special_sanity/check_pr_description.py40
LOWtests/special_sanity/validate_imported_docs.py63
LOWtests/special_sanity/test_config_docs.py19
LOWtests/special_sanity/type_coverage_check.py34
LOWtests/special_sanity/type_coverage_check.py87
LOWtests/utils/test_linear_cross_entropy.py113
LOWtests/utils/test_special_linear_cross_entropy_tp.py207
LOWtests/utils/test_fsdp_lora_merge.py37
LOWtests/utils/test_fsdp_lora_merge.py225
LOWtests/utils/test_special_megatron_kl_loss_tp.py55
LOW…sts/utils/dataset/test_multiturn_sft_dataset_on_cpu.py245
LOW…eward_score/reward_score/test_sandbox_fusion_on_cpu.py127
LOWtests/special_distributed/test_tensor_dict.py28
LOW…ts/workers/rollout/rollout_trtllm/test_trtllm_abort.py32
LOWtests/workers/rollout/rollout_vllm/test_vllm_abort.py29
LOWverl/protocol.py546
LOWverl/protocol.py917
LOW…rl/experimental/fully_async_policy/fully_async_main.py176
LOWverl/experimental/fully_async_policy/detach_utils.py253
LOW…perimental/fully_async_policy/fully_async_rollouter.py848
LOW…l/fully_async_policy/unittest/simple_streaming_demo.py85
LOW…experimental/reward_loop/router/inner_sglang_router.py30
LOWverl/experimental/agent_loop/tool_parser.py207
LOWverl/experimental/agent_loop/tool_parser.py379
LOWverl/experimental/agent_loop/tool_parser.py218
LOWverl/experimental/agent_loop/tool_agent_loop.py125
LOWverl/experimental/agent_loop/tool_agent_loop.py287
LOWverl/experimental/separation/ray_trainer.py499
LOWverl/model_merger/megatron_model_merger.py358
LOWverl/model_merger/base_model_merger.py189
LOWverl/model_merger/fsdp_model_merger.py143
LOWverl/utils/torch_functional.py507
LOWverl/utils/torch_functional.py1008
LOWverl/utils/megatron_utils.py214
LOWverl/utils/megatron_utils.py472
LOWverl/utils/megatron_utils.py549
LOWverl/utils/megatron_utils.py597
LOWverl/utils/megatron_utils.py638
LOWverl/utils/megatron_utils.py679
LOWverl/utils/megatron_utils.py725
LOWverl/utils/megatron_utils.py766
LOWverl/utils/megatron_utils.py1051
LOWverl/utils/megatron_utils.py1196
LOWverl/utils/megatron_utils.py1341
LOWverl/utils/megatron_utils.py1534
LOWverl/utils/megatron_utils.py1590
LOWverl/utils/megatron_utils.py1638
LOWverl/utils/megatron_utils.py616
LOWverl/utils/megatron_utils.py657
LOWverl/utils/megatron_utils.py777
LOWverl/utils/rollout_trace.py133
LOWverl/utils/rollout_trace.py318
LOWverl/utils/rollout_trace.py71
LOWverl/utils/rollout_trace.py320
LOWverl/utils/rollout_trace.py404
LOWverl/utils/chat_template.py69
178 more matches not shown…
Unused Imports203 hits · 202 pts
SeverityFileLineSnippet
LOW…mental/agent_loop/test_audio_server_contract_on_cpu.py15
LOW…ent_loop/test_agent_loop_extra_fields_schema_on_cpu.py15
LOWtests/tools/test_mixed_tools_on_cpu.py22
LOWtests/tools/test_function_tool_on_cpu.py16
LOWtests/tools/_stub_search_tools.py18
LOWtests/special_sanity/test_check_example_naming.py17
LOWtests/special_sanity/check_api_docs.py28
LOWtests/special_sanity/validate_imported_docs.py22
LOWtests/special_sanity/check_example_naming.py41
LOWtests/special_sanity/validate_structure.py32
LOWtests/workers/test_engine_workers_lora_sync.py26
LOWtests/workers/rollout/test_pd_disaggregation.py16
LOW…orkers/rollout/rollout_sglang/test_lora_sleep_level.py22
LOWtests/special_e2e/envs/__init__.py15
LOWtests/special_e2e/envs/digit_completion/__init__.py17
LOWtests/special_e2e/envs/digit_completion/__init__.py17
LOWverl/__init__.py21
LOWverl/experimental/teacher_loop/__init__.py15
LOWverl/experimental/reward_loop/__init__.py15
LOWverl/experimental/reward_loop/__init__.py15
LOWverl/experimental/reward_loop/__init__.py15
LOWverl/experimental/reward_loop/__init__.py16
LOW…rl/experimental/reward_loop/reward_manager/__init__.py15
LOW…rl/experimental/reward_loop/reward_manager/__init__.py15
LOW…rl/experimental/reward_loop/reward_manager/__init__.py16
LOW…rl/experimental/reward_loop/reward_manager/__init__.py17
LOW…rl/experimental/reward_loop/reward_manager/__init__.py18
LOW…rl/experimental/reward_loop/reward_manager/__init__.py19
LOW…rl/experimental/reward_loop/reward_manager/__init__.py20
LOWverl/experimental/agent_loop/__init__.py15
LOWverl/experimental/agent_loop/__init__.py15
LOWverl/experimental/agent_loop/__init__.py15
LOWverl/experimental/agent_loop/__init__.py15
LOWverl/experimental/agent_loop/__init__.py15
LOWverl/tools/tool_registry.py15
LOWverl/tools/function_tool.py18
LOWverl/model_merger/megatron_model_merger.py28
LOWverl/utils/transformers_compat.py28
LOWverl/utils/groupwise.py41
LOWverl/utils/ulysses.py29
LOWverl/utils/__init__.py16
LOWverl/utils/__init__.py16
LOWverl/utils/__init__.py17
LOWverl/utils/__init__.py17
LOWverl/utils/__init__.py18
LOWverl/utils/__init__.py18
LOWverl/utils/__init__.py18
LOWverl/utils/__init__.py18
LOWverl/utils/__init__.py18
LOWverl/utils/activation_offload.py18
LOWverl/utils/checkpoint/__init__.py15
LOWverl/utils/checkpoint/__init__.py15
LOWverl/utils/qat/__init__.py33
LOWverl/utils/qat/__init__.py33
LOWverl/utils/qat/__init__.py33
LOWverl/utils/qat/__init__.py33
LOWverl/utils/qat/__init__.py33
LOWverl/utils/qat/__init__.py40
LOWverl/utils/qat/__init__.py40
LOWverl/utils/qat/__init__.py40
143 more matches not shown…
Docstring Block Structure39 hits · 195 pts
SeverityFileLineSnippet
HIGHdocs/data/transfer_queue.md238Sample a batch of indices from the ready indices. Args: ready_indexes: List of global indices for which all
HIGHverl/base_config.py56Implement the [] operator for the class. Allows accessing attributes like dictionary items. Args: k
HIGHverl/protocol.py676 Slice the DataProto and return a new DataProto object. This is an improved version of direct slicing wh
HIGHverl/experimental/fully_async_policy/detach_utils.py87 Assemble gen_batch_output from RolloutSample objects Assembles batches from RolloutSample objects, similar to t
HIGHverl/experimental/reward_loop/reward_manager/limited.py91Acquire tokens from the bucket, waiting if necessary. This method will block (using asyncio.sleep) until suffic
HIGHverl/experimental/agent_loop/utils.py20Resolve agent loop configuration file path. In multi-node Ray training, relative paths may not resolve correctly
HIGHverl/tools/base_tool.py63Execute the tool. Args: instance_id: The instance id of the tool. parameters: The json
HIGHverl/utils/seqlen_balancing.py214 Calculates partitions of indices from seqlen_list such that the sum of sequence lengths in each partition is ba
HIGHverl/utils/torch_functional.py106Compute log-probabilities using Flash Attention's optimized cross-entropy. Uses the Flash Attention library's Trito
HIGHverl/utils/py_functional.py57 Decorator to add a timeout to a function. Args: seconds: The timeout duration in seconds. use_
HIGHverl/utils/device.py280Check if the given software and CANN versions support IPC. Compares the software version and CANN toolkit version a
HIGHverl/utils/model.py806 Extract LoRA rank from adapter configuration file. Args: adapter_path: Path to LoRA adapter directory
HIGHverl/utils/import_utils.py209Load a class from its fully qualified name. Args: fqn: Fully qualified class name (e.g., 'mypackage.module.
HIGHverl/utils/tensordict_utils.py186Concatenate multiple nested tensors along the batch dimension. Takes a list of nested tensors with jagged layout an
HIGHverl/utils/tensordict_utils.py222Handle concatenation of TensorDicts with empty batch size. For TensorDicts that contain only metadata (NonTensorDat
HIGHverl/utils/tensordict_utils.py248Concatenate multiple TensorDicts along dimension zero. Combines a list of TensorDicts into a single TensorDict by c
HIGHverl/utils/tensordict_utils.py303Split a TensorDict into equal-sized chunks with special nested tensor handling. Divides a TensorDict into the speci
HIGHverl/utils/tensordict_utils.py459Select rows from a TensorDict using indices. Creates a new TensorDict containing only the rows specified by indices
HIGHverl/utils/tensordict_utils.py514Merge two TensorDicts, adding keys from the second to the first. Performs an in-place union of two TensorDicts. Key
HIGHverl/utils/tensordict_utils.py560Create an iterator that yields mini-batches from a TensorDict. Wraps a TensorDict in a DataLoader-style iterator th
HIGHverl/utils/tensordict_utils.py699Extract a subset of keys from a TensorDict into a new TensorDict. Creates a new TensorDict containing only the spec
HIGHverl/utils/tensordict_utils.py773Remove multiple keys from a TensorDict and return them as a new TensorDict. Removes the specified keys from the sou
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 div
HIGHverl/utils/fsdp_utils.py439 Get the full state dict from an FSDP model. Args: model (torch.nn.Module): The FSDP model to get state
HIGHverl/utils/dataset/rl_dataset.py480 split the dataset into num_splits sub-datasets Args: num_splits: specified number of splits
HIGHverl/utils/kernel/fp8_kernel.py177High-performance FP8 blockwise quantization using Triton kernel. This is the recommended function to use for FP8 qu
HIGHverl/utils/megatron/router_replay_utils.py347 Reorder and merge per-VPP layer blocks into a contiguous layer dimension. Given a tensor shaped as [bs*vpp_siz
HIGHverl/utils/reward_score/__init__.py29Compute the score for a given solution based on the data source. Args: data_source (str): The source datase
HIGHverl/workers/config/optimizer.py219Build an optimizer based on the configuration. Dynamically imports and instantiates an optimizer class from the spe
HIGHverl/workers/rollout/trtllm_rollout/trtllm_rollout.py178Make an async HTTP request with retry logic and consistent error handling. Args: endpoint (str): Th
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 SGL
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 e
HIGH…l/workers/rollout/sglang_rollout/http_server_engine.py664Make an async HTTP request with retry logic and consistent error handling. Args: endpoint (str): Th
HIGHverl/workers/engine/base.py325 Function to create a new training engine instance based on the provided config. Args: key:
HIGHverl/workers/engine/fsdp/utils.py62 Determine the appropriate sharding strategy based on the number of dimensions of the device mesh. Args:
HIGHverl/workers/engine/torchtitan/utils.py81Derive torchtitan model name and flavor from a HuggingFace config. The name is mapped from ``hf_config.model_type``
HIGHverl/trainer/ppo/reward.py51Load and return a custom reward function from external file. Dynamically imports a reward function from a specified
HIGHverl/trainer/ppo/core_algos.py194Factory function to create appropriate KL controller based on configuration. Args: kl_ctrl: Configuration o
HIGHverl/trainer/ppo/core_algos.py2210Compute importance weights for resampling based on scores. Args: scores (torch.Tensor): Tensor of s
Cross-File Repetition30 hits · 150 pts
SeverityFileLineSnippet
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 itsel
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 itsel
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 itsel
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 itsel
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 itsel
HIGHdocs/blog/v0.7.md0receive the weights of the model. yields: a tuple of the name of the weight tensor and the tensor itself.
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.
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.
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.
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.
HIGH…perimental/fully_async_policy/fully_async_rollouter.py0initialize distributed training workers using ray backend. creates: 1. ray resource pools from configuration 2. worker g
HIGH…experimental/fully_async_policy/fully_async_trainer.py0initialize distributed training workers using ray backend. creates: 1. ray resource pools from configuration 2. worker g
HIGHverl/experimental/separation/ray_trainer.py0initialize distributed training workers using ray backend. creates: 1. ray resource pools from configuration 2. worker g
HIGHverl/trainer/main_ppo_sync.py0initialize distributed training workers using ray backend. creates: 1. ray resource pools from configuration 2. worker g
HIGHverl/trainer/ppo/ray_trainer.py0initialize distributed training workers using ray backend. creates: 1. ray resource pools from configuration 2. worker g
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
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
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
HIGHverl/models/mcore/registry.py0get the forward function for given model architecture.
HIGHverl/models/mcore/registry.py0get the forward function for given model architecture.
HIGHverl/models/mcore/registry.py0get the forward function for given model architecture.
HIGHverl/workers/reward_manager/prime.py0we will expand this function gradually based on the available datasets
HIGHverl/workers/reward_manager/naive.py0we will expand this function gradually based on the available datasets
HIGHverl/workers/reward_manager/dapo.py0we will expand this function gradually based on the available datasets
HIGH…/workers/rollout/trtllm_rollout/trtllm_async_server.py0restore kv_cache gpu memory after a weight sync. counterpart to release_kv_cache().
HIGH…/workers/rollout/sglang_rollout/async_sglang_server.py0restore kv_cache gpu memory after a weight sync. counterpart to release_kv_cache().
HIGHverl/workers/rollout/vllm_rollout/vllm_async_server.py0restore kv_cache gpu memory after a weight sync. counterpart to release_kv_cache().
HIGHverl/workers/engine/base.py0whether the current rank is the first rank in model parallel group that contains model outputs
HIGHverl/workers/engine/veomni/transformer_impl.py0whether the current rank is the first rank in model parallel group that contains model outputs
HIGHverl/workers/engine/torchtitan/transformer_impl.py0whether the current rank is the first rank in model parallel group that contains model outputs
Self-Referential Comments44 hits · 118 pts
SeverityFileLineSnippet
MEDIUMtests/test_protocol_v2_on_cpu.py434 # Create a DataProto object with some batch and non-tensor data
MEDIUMtests/test_protocol_v2_on_cpu.py629 # Create a DataProto object with some batch and non-tensor data
MEDIUMtests/test_protocol_on_cpu.py133 # Create a circular reference and a non-circular one.
MEDIUMtests/test_protocol_on_cpu.py371 # Create a DataProto object with some batch and non-tensor data
MEDIUMtests/test_protocol_on_cpu.py618 # Create a DataProto object with some batch and non-tensor data
MEDIUMtests/test_protocol_on_cpu.py1220 # Create a DataProto with an empty TensorDict but with a batch size
MEDIUMtests/experimental/agent_loop/test_multi_modal.py87 # Create a simple colored image for testing
MEDIUMtests/experimental/agent_loop/test_multi_modal.py329 # Create a simple test image
MEDIUMtests/experimental/agent_loop/test_basic_agent_loop.py396 # Initialize the class to set up class-level attributes
MEDIUMtests/utils/test_nvtx_profile.py57 # Create a new ProfilerConfig instance
MEDIUMtests/utils/test_model_on_cpu.py35 # Create a fresh mock config object for each test case
MEDIUMtests/utils/test_import_utils_on_cpu.py84 # Create a temporary file with syntax errors
MEDIUMtests/utils/test_special_linear_cross_entropy_tp.py273 # Create a tensor to hold the gathered weights from all ranks
MEDIUMtests/utils/test_special_linear_cross_entropy_tp.py277 # Create a single contiguous tensor to hold all gathered weights
MEDIUM…sts/utils/dataset/test_multiturn_sft_dataset_on_cpu.py49 # Create a temporary parquet file with test data
MEDIUM…eward_score/reward_score/test_sandbox_fusion_on_cpu.py338# Define a low global concurrency limit to test the semaphore's effect
MEDIUM…eward_score/reward_score/test_sandbox_fusion_on_cpu.py340# Define the number of processes used in the test
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., internal
MEDIUM…eward_score/reward_score/test_sandbox_fusion_on_cpu.py470 # Create a multiprocessing.Semaphore instance, this is the global semaphore we are testing.
MEDIUM…kers/rollout/rollout_sglang/test_http_server_engine.py17# This file is adapted from multiple sources:
MEDIUMtests/single_controller/test_decorator_on_cpu.py38# Define a simple worker for testing
MEDIUMtests/trainer/ppo/test_metric_utils_on_cpu.py297 # Create a mock DataProto object
MEDIUMtests/trainer/ppo/test_metric_utils_on_cpu.py358 # Create a mock DataProto object
MEDIUMtests/trainer/ppo/test_metric_utils_on_cpu.py409 # Create a mock DataProto object
MEDIUMverl/protocol.py703 # Create a slice object
MEDIUM…perimental/fully_async_policy/fully_async_rollouter.py1028 # Create the main asynchronous task
MEDIUMverl/experimental/one_step_off_policy/ray_trainer.py222 # Create the initial batch from the data loader
MEDIUMverl/utils/megatron_utils.py1391 # Create a dummy total_loss_dict to collect MTP metrics
MEDIUMverl/utils/tensordict_utils.py281 # Create a list of tensordicts containing only non-nested tensors for concatenation
MEDIUMverl/utils/tensordict_utils.py287 # Create a new TensorDict with non-nested items without modifying the original
MEDIUMverl/utils/tracking.py444 # Create a new table with same columns and existing data
MEDIUMverl/utils/vllm/vllm_fp8_utils.py313 """This function is used to process the weights after loading for a Linear layer, it is used for vllm v0.10
MEDIUMverl/utils/vllm/vllm_fp8_utils.py368 """This function is used to process the weights after loading for a Linear layer, it is used for vllm 0.11
MEDIUMverl/utils/vllm/vllm_fp8_utils.py430 """This function is used to process the weights after loading for a Linear layer, it is used for vllm v0.14-v0.19.
MEDIUMverl/utils/vllm/vllm_fp8_utils.py492 """This function is used to process the weights after loading for a FusedMoE layer, it is used for vllm v0.10"""
MEDIUMverl/utils/vllm/vllm_fp8_utils.py568 """This function is used to process the weights after loading for a FusedMoE layer, it is used for vllm 0.11"""
MEDIUMverl/utils/debug/performance.py16# This file is deprecated, for new features please develop in profiler/performance.py
MEDIUMverl/workers/rollout/trtllm_rollout/trtllm_rollout.py153 # Create a new session for each request to avoid resource competition
MEDIUM…l/workers/rollout/sglang_rollout/http_server_engine.py17# This file is adapted from multiple sources:
MEDIUM…l/workers/rollout/sglang_rollout/http_server_engine.py639 # Create a new session for each request to avoid resource competition
MEDIUMverl/trainer/main_ppo.py51# Define a function to run the PPO-like training process
MEDIUMverl/trainer/main_ppo.py85 # Create a remote instance of the TaskRunner class, and
MEDIUMverl/trainer/main_ppo.py105 # This file is used for performance analysis
MEDIUMverl/trainer/ppo/reward.py140 # Create a semaphore to control concurrent access to the sandbox
Redundant / Tautological Comments46 hits · 69 pts
SeverityFileLineSnippet
LOWtests/test_protocol_on_cpu.py1073 # Check if it's a nested tensor
LOWtests/experimental/agent_loop/test_multi_modal.py416 # Check if this sample should have image pads (samples with index 1 and 2 in each repeat have images)
LOWtests/special_sanity/test_config_docs.py35 # Check if there's a comment above
LOWtests/utils/test_special_linear_cross_entropy_tp.py494 # Check if running with torchrun (distributed mode)
LOWtests/models/test_tiled_mlp_accuracy.py95 # Check if within tolerance (1e-2 for bf16)
LOWverl/protocol.py379 # Check if batch is empty to avoid torch.cat error in consolidate
LOW…perimental/fully_async_policy/fully_async_rollouter.py833 # Check if have reached the last step
LOW…experimental/fully_async_policy/fully_async_trainer.py541 # Check if validation is needed
LOW…experimental/fully_async_policy/fully_async_trainer.py603 # Check if the ESI (Elastic Server Instance)/training plan is close to expiration.
LOW…experimental/fully_async_policy/fully_async_trainer.py608 # Check if the conditions for saving a checkpoint are met.
LOWverl/experimental/reward_loop/reward_manager/limited.py267 # Check if already initialized before calling parent.
LOWverl/experimental/separation/ray_trainer.py674 # Check if the ESI (Elastic Server Instance)/training plan is close to expiration.
LOWverl/experimental/separation/ray_trainer.py679 # Check if the conditions for saving a checkpoint are met.
LOWverl/utils/transferqueue_utils.py196 # Check if collect_fn is a functools.partial and handle gracefully
LOWverl/utils/fp8_utils.py56 # Check if matches exclude patterns
LOWverl/utils/fp8_utils.py76 # Check if matches include patterns
LOWverl/utils/fp8_utils.py106 # Check if quantization is needed
LOWverl/utils/rollout_skip.py184 # Check if path is in Ray temporary directory
LOWverl/utils/rollout_skip.py227 # Check if train_step not start from 1
LOWverl/utils/fsdp_utils.py977 # Check if module is a PEFT model
LOWverl/utils/qat/vllm_patch.py130 # Check if we have metadata for this layer
LOWverl/utils/qat/vllm_patch.py138 # Check if this param needs rebuild
LOWverl/utils/qat/vllm_patch.py182 # Check if can rebuild from metadata
LOWverl/utils/dataset/multiturn_sft_dataset.py334 # Check if all tensors in the list have the same shape
LOWverl/utils/dataset/rl_dataset.py545 # Check if a custom dataset class is specified in the data configuration
LOWverl/utils/kernel/fp8_kernel.py22# Check if Triton is available
LOWverl/models/mcore/mtp_patch.py210 # Check if GPTModel has MTP and find the layers
LOWverl/models/mcore/mtp_patch.py216 # Check if any layer in the model is MultiTokenPredictionLayer
LOWverl/models/mcore/mtp_patch.py243 # Check if GPTModel has MTP and find the layers
LOWverl/models/mcore/mtp_patch.py249 # Check if any layer in the model is MultiTokenPredictionLayer
LOWverl/models/mcore/mtp_patch.py277 # Check if GPTModel has MTP and find the layers
LOWverl/models/mcore/mtp_patch.py283 # Check if any layer in the model is MultiTokenPredictionLayer
LOWverl/models/mcore/mtp_patch.py313 # Check if GPTModel has MTP and find the layers
LOWverl/models/mcore/mtp_patch.py319 # Check if any layer in the model is MultiTokenPredictionLayer
LOW…third_party/torch/distributed/checkpoint/state_dict.py479 # Verify if the model_state_dict and optim_state_dict are valid. This API
LOWverl/workers/rollout/llm_server.py77 # Check if server is still in the active pool
LOW…kers/rollout/trtllm_rollout/trtllm_worker_extension.py153 # Check if model supports partial loading and use appropriate strategy
LOWverl/workers/rollout/vllm_rollout/utils.py276 # Check if FP8 quantization is enabled and apply appropriate weight loading
LOWverl/workers/engine/veomni/utils.py74 # Check if this is a MultiOptimizer (for ep and non-ep parameters when ep+fsdp2 is enabled)
LOWverl/workers/engine/veomni/utils.py94 # Check if this is a MultiOptimizer (for ep and non-ep parameters when ep+fsdp2 is enabled)
LOWverl/trainer/main_ppo.py61 # Check if Ray is not initialized
LOWverl/trainer/ppo/metric_utils.py366 # Check if we have the necessary data (sum_pi_squared is required for W-score)
LOWverl/trainer/ppo/ray_trainer.py264 # Check if sum_pi_squared is available
LOWverl/trainer/ppo/ray_trainer.py1651 # Check if the ESI (Elastic Server Instance)/training plan is close to expiration.
LOWverl/trainer/ppo/ray_trainer.py1656 # Check if the conditions for saving a checkpoint are met.
LOWexamples/tutorial/skypilot/verl-ppo.yaml22 # Check if the script exists and use absolute path
Verbosity Indicators38 hits · 68 pts
SeverityFileLineSnippet
LOWtests/utils/test_activation_offload.py113 # Step 1: Initial update and save checkpoint
LOWtests/utils/test_activation_offload.py126 # Step 2: Second update and forward pass
LOWtests/utils/test_activation_offload.py138 # Step 3: wrap module with activation offloading and load checkpoint
LOWtests/utils/test_activation_offload.py142 # Step 4: Repeat the second update with same input
LOWtests/utils/test_activation_offload.py154 # Step 4: Verify outputs match
LOWtests/special_distributed/test_fsdp_ckpt.py107 # Step 1: Initial update and save checkpoint
LOWtests/special_distributed/test_fsdp_ckpt.py121 # Step 2: Second update and forward pass
LOWtests/special_distributed/test_fsdp_ckpt.py133 # Step 3: Load checkpoint and repeat second update
LOWtests/special_distributed/test_fsdp_ckpt.py152 # Step 4: Verify outputs match
LOW…experimental/fully_async_policy/fully_async_trainer.py237 # Step 3: Sleep all hybrid replicas
LOWverl/utils/megatron/router_replay_patch.py346 # Step 1: Patch TransformerConfig to include the feature flag
LOWverl/utils/megatron/router_replay_patch.py397 # Step 2: Patch TopKRouter only once to ensure idempotency.
LOWverl/utils/megatron/router_replay_patch.py403 # Step 3: Define the new __init__ method
LOWverl/utils/megatron/router_replay_patch.py410 # Step 4: Patch MoEAlltoAllTokenDispatcher.preprocess to handle router replay
LOWverl/utils/megatron/router_replay_patch.py440 # Step 5: Apply the patches
LOWverl/models/transformers/monkey_patch.py358 # Step 1: patch model to support image-text mixed data
LOWverl/models/transformers/monkey_patch.py387 # Step 2: patch attention to support ulysses parallelism
LOWverl/models/transformers/monkey_patch.py406 # Step 3: patch input for multimodal sequence parallelism
LOWverl/models/transformers/monkey_patch.py412 # Step 1: patch model to support image-text mixed data
LOWverl/models/transformers/monkey_patch.py445 # Step 2: patch input for multimodal sequence parallelism
LOWverl/models/transformers/monkey_patch.py451 # Step 1: patch model to support image-text mixed data
LOWverl/models/transformers/monkey_patch.py466 # Step 2: patch attention to support ulysses parallelism
LOWverl/models/transformers/monkey_patch.py473 # Step 3: patch input for multimodal sequence parallelism
LOWverl/models/transformers/monkey_patch.py493 # Step 1: patch model to support image-text mixed data
LOWverl/models/transformers/monkey_patch.py519 # Step 2: patch vision model to fix fsdp2 cpu_offload bug.
LOWverl/trainer/ppo/rollout_corr_helper.py841 # Step 1: Compute log ratio (log(π_train / π_rollout))
LOWverl/trainer/ppo/rollout_corr_helper.py845 # Step 2: Compute IS weights (if enabled)
LOWverl/trainer/ppo/rollout_corr_helper.py857 # Step 3: Compute rejection mask (if enabled)
LOWverl/trainer/ppo/rollout_corr_helper.py873 # Step 4: Compute off-policy metrics (KL, PPL, χ², etc.)
LOWverl/trainer/ppo/rollout_corr_helper.py881 # Step 6: Add "rollout_corr/" prefix to all metrics for logging consistency
LOWverl/trainer/ppo/rollout_corr_helper.py889 # Step 7: Wrap IS weights in DataProto for consistency with API
LOWverl/trainer/ppo/core_algos.py924 # Step 1: Compute w_per_timestep = 1 - 2π_t + Σπ²)
LOWverl/trainer/ppo/core_algos.py928 # Step 2: Apply rollout importance sampling correction (if enabled)
LOWverl/trainer/ppo/core_algos.py933 # Step 3: Compute cumulative path-variance proxy: W_t = Σ_{j=1}^t w_j
LOWverl/trainer/ppo/core_algos.py1040 # Step 1: Compute w_per_timestep = 1 - 2π_t + Σπ²)
LOWverl/trainer/ppo/core_algos.py1044 # Step 2: Apply rollout importance sampling correction (if enabled)
LOWverl/trainer/ppo/core_algos.py1049 # Step 3: Compute cumulative path-variance proxy: W_t = Σ_{j=1}^t w_j
LOWverl/trainer/ppo/core_algos.py1053 # Step 4: Concatenate returns and w_cumulative for each trajectory
Hallucination Indicators3 hits · 40 pts
SeverityFileLineSnippet
CRITICALtests/trainer/ppo/test_core_algos_on_cpu.py42 verl.trainer.ppo.core_algos.ADV_ESTIMATOR_REGISTRY.clear()
CRITICALtests/trainer/ppo/test_core_algos_on_cpu.py50 verl.trainer.ppo.core_algos.ADV_ESTIMATOR_REGISTRY.clear()
CRITICALverl/trainer/ppo/ray_trainer.py1402 if self.config.actor_rollout_ref.rollout.skip.get("enable", False):
AI Slop Vocabulary13 hits · 34 pts
SeverityFileLineSnippet
MEDIUMtests/test_protocol_on_cpu.py98 # 4D object array to ensure deep recursion is robust
MEDIUM…fully_async_policy/config/fully_async_ppo_trainer.yaml66# And it can be used in conjunction with other rollout_correction algorithms.
MEDIUM…nc_policy/config/fully_async_ppo_megatron_trainer.yaml65# And it can be used in conjunction with other rollout_correction algorithms.
MEDIUM…f_policy/config/one_step_off_ppo_megatron_trainer.yaml28# And it can be used in conjunction with other rollout_correction algorithms.
MEDIUM…e_step_off_policy/config/one_step_off_ppo_trainer.yaml28# And it can be used in conjunction with other rollout_correction algorithms.
MEDIUMverl/utils/vllm/vllm_fp8_utils.py679 # robust than version string comparison, especially for dev/pre-release versions.
MEDIUMverl/utils/reward_score/math_dapo.py14# Adapted from https://github.com/EleutherAI/lm-evaluation-harness/blob/main/lm_eval/tasks/hendrycks_math/utils.py
MEDIUMverl/utils/reward_score/math_reward.py14# Adapted from https://github.com/EleutherAI/lm-evaluation-harness/blob/main/lm_eval/tasks/hendrycks_math/utils.py
MEDIUMverl/utils/reward_score/math_reward.py31# string normalization from https://github.com/EleutherAI/lm-evaluation-harness/blob/master/lm_eval/tasks/hendrycks_math
LOW…third_party/torch/distributed/checkpoint/state_dict.py1180 >>> # if we simply call ddp_model.state_dict() and fsdp_model.state_dict(),
MEDIUMverl/single_controller/ray/base.py204 # that can utilize different WorkerGroup for differnt models
MEDIUMverl/trainer/main_ppo.py364 # Use a sampler to facilitate checkpoint resumption.
MEDIUMverl/trainer/ppo/rollout_corr_helper.py667 """Compute comprehensive metrics for truncated importance sampling weights.
Slop Phrases3 hits · 9 pts
SeverityFileLineSnippet
MEDIUMverl/models/mcore/mtp_patch.py379 # embedding computation - you can modify this part
MEDIUMverl/trainer/config/rollout/rollout.yaml48# you can use smaller batch size to save memory used in cuda graph, eg: [1 ,2, 4, 8, 16, 32]
MEDIUMexamples/grpo_trainer/run_gpt_oss_20b_fsdp.sh63# or you can use lmsys/gpt-oss-20b-bf16
Overly Generic Function Names4 hits · 4 pts
SeverityFileLineSnippet
LOWtests/utils/test_rollout_trace_on_cpu.py67 async def my_method(self, a, b="default"):
LOWtests/utils/test_rollout_trace_on_cpu.py90 async def my_method(self, x):
LOWtests/utils/_test_module.py30def test_function():
LOWverl/utils/activation_offload.py457 def my_function(*inputs):
Cross-Language Confusion1 hit · 2 pts
SeverityFileLineSnippet
HIGHverl/trainer/ppo/rollout_corr_helper.py915 - kl: Direct KL divergence estimator KL(π_rollout || π_training)
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippet
LOWtests/special_e2e/run_fully_async_policy_opd.sh24# Usage: