Train transformer language models with reinforcement learning.
This report summarizes scanner evidence for huggingface/trl, a Python project with 19,484 GitHub stars. SynthScan examined 138,464 lines of code across 463 source files, recording 2240 pattern matches distributed across 21 syntactic categories. The legacy adjusted pattern signal is 19.0 (Elevated pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 1806 finding(s).
Are imports declared and package/API names verified? 186 finding(s).
Are wrappers, guards, and repeated structures necessary? 1462 finding(s).
Which changes need focused human review? 2240 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 2240 distinct pattern matches across 21 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_rloo_trainer.py | 152 | def test_logps_match_plain_forward(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 190 | def test_reward_func_wrong_number_of_rewards(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 215 | def test_train_dataset_format(self, config_name): | CODE |
| LOW | tests/test_rloo_trainer.py | 290 | def test_train_with_num_generations_eval(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 314 | def test_train_with_iterable_dataset(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 349 | def test_init_with_train_dataset(self, train_dataset_type): | CODE |
| LOW | tests/test_rloo_trainer.py | 401 | def test_init_with_eval_dataset(self, eval_dataset_type): | CODE |
| LOW | tests/test_rloo_trainer.py | 435 | def test_iterable_dataset_requires_dispatch_batches_false(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 450 | def test_iterable_dataset_forces_num_workers_zero(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 465 | def test_iterable_eval_keeps_map_style_train_workers(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 503 | def test_evaluate_with_eval_dataset(self, eval_dataset_type): | CODE |
| LOW | tests/test_rloo_trainer.py | 542 | def test_train_multiple_iterations(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 630 | def test_train_peft_and_quantization(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 676 | def test_train_peft_dora_and_quantization(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 788 | def test_train_moe_peft_model(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 836 | def test_train_peft_with_gradient_checkpointing(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 903 | def test_train_different_reward_model(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 942 | def test_train_reward_func_standard(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 976 | def test_train_reward_func_conversational(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 1011 | def test_train_multiple_reward_funcs(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 1049 | def test_train_sync_and_async_reward_funcs(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 1105 | def non_applicable_reward_func(completions, **kwargs): | CODE |
| LOW | tests/test_rloo_trainer.py | 1141 | def test_train_multiple_reward_funcs_with_weights(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 1185 | def test_reward_metric_reflects_reward_weights(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 1222 | def test_train_multiple_mixed_reward_funcs(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 1256 | def test_train_reward_func_additional_column(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 1296 | def test_ref_model_like_model_instance(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 1317 | def test_train_with_sync_ref_model(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 1382 | def test_train_with_pad_to_multiple_of(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 1494 | def test_train_vllm_structured_outputs(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 1526 | def test_train_with_additional_generation_kwargs(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 1563 | def test_train_vllm_with_additional_generation_kwargs(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 1609 | def test_train_with_transformers_continuous_batching(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 1640 | def test_train_with_normalized_advantages(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 1670 | def test_train_with_clipped_rewards(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 1701 | def test_train_with_mask_truncated_completions(self, mock_generate): | CODE |
| LOW | tests/test_rloo_trainer.py | 1750 | def test_train_with_mask_truncated_completions_all_masked(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 1788 | def test_warning_raised_all_rewards_none(self, caplog): | CODE |
| LOW | tests/test_rloo_trainer.py | 1817 | def test_train_num_generations_larger_than_batch_size(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 1847 | def test_train_multiple_dataloader_workers(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 1888 | def test_train_with_generation_kwargs(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 1919 | def test_train_with_reward_func_accessing_trainer_state(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 1944 | def test_train_reward_func_with_log_extra(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 1970 | def test_train_reward_func_with_log_metric(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 1997 | def test_prepare_input_called_with_correct_data(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 2048 | def test_train_stops_on_every_eos_token_id(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 2079 | def test_train_with_chat_template_kwargs(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 2109 | def test_mismatched_reward_processing_classes_length(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 2135 | def test_correct_reward_processing_classes_list(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 2166 | def test_single_reward_model_with_single_processing_class(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 2191 | def test_pad_token_id_synced_with_model_config(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 2212 | def test_reward_model_pad_token_id_synced_with_text_config(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 2314 | def test_train_vlm_with_pad_to_multiple_of(self): | CODE |
| LOW | tests/test_rloo_trainer.py | 2357 | def test_train_vlm_beta_non_zero(self, model_id): | CODE |
| LOW | tests/test_rloo_trainer.py | 2447 | def test_train_vlm_peft_and_quantization(self, model_id): | CODE |
| LOW | tests/test_rloo_trainer.py | 2504 | def test_train_vlm_peft_dora_and_quantization(self, model_id): | CODE |
| LOW | tests/test_rloo_trainer.py | 2618 | def test_train_vlm_multi_image(self, model_id): | CODE |
| LOW | tests/test_rloo_trainer.py | 2660 | def test_train_vlm_log_multimodal_false(self): | CODE |
| LOW⚡ | tests/test_utils.py | 201 | def test_pad_to_multiple_of_side_left(self): | CODE |
| LOW⚡ | tests/test_utils.py | 209 | def test_pad_to_multiple_of_no_extra_padding(self): | CODE |
| 1122 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pyproject.toml | 181 | # Remove once: no supported torch version emits it | COMMENT |
| LOW | pyproject.toml | 201 | # torch.get_autocast_gpu_dtype() in its Triton ssd_combined.py kernel (upstream, not actionable in TRL) | COMMENT |
| LOW | pyproject.toml | 221 | # Tracking issue: https://github.com/huggingface/trl/issues/6848 | COMMENT |
| LOW | tests/test_rloo_trainer.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/test_utils.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/conftest.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/test_callbacks.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/test_sft_trainer.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/testing_constants.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/test_chat_template_utils.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/test_selective_activation_checkpointing.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/test_grpo_trainer.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/test_grpo_trainer.py | 1801 | @pytest.mark.parametrize( | COMMENT |
| LOW | tests/test_grpo_trainer.py | 2201 | # Trainer.__init__ moves the model to args.device, so on a GPU runner the inputs have to be built there too. | COMMENT |
| LOW | tests/test_model_utils.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/testing_utils.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/test_data_utils.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/test_examples_index.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/__init__.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/test_vllm_client_server.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/test_kernels.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/test_rich_progress_callback.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/test_activation_offloading.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/test_rewards.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/test_cli_utils.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/test_kto_trainer.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/test_dpo_trainer.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/test_distillation_trainer.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/test_cli.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/test_reward_trainer.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/experimental/_openreward_echo_env.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/experimental/test_async_distillation_trainer.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | …xperimental/test_self_distillation_trainer_behavior.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/experimental/test_utils.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/experimental/test_a2po_trainer.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/experimental/test_gmpo_trainer.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/experimental/test_gkd_trainer.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/experimental/test_server_distillation_trainer.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/experimental/test_tpo_trainer.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/experimental/test_sdft_trainer.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/experimental/__init__.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/experimental/test_sdpo_trainer.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/experimental/test_iw_opd_trainer.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/experimental/test_gold_trainer.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/experimental/test_online_dpo_trainer.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/experimental/test_openreward.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/experimental/test_async_grpo_trainer.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/experimental/test_ssd_trainer.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/experimental/test_harbor.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/experimental/test_orpo_trainer.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/experimental/test_cpo_trainer.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/experimental/test_openenv_tito.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/experimental/test_merge_model_callback.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/invariant/__init__.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/invariant/test_invariant.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/distributed/__init__.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/distributed/test_distributed.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | docs/source/jobs_training.md | 141 | </hfoption> | COMMENT |
| LOW | examples/grpo_catch/grpo_catch.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | examples/sft_visual_chat/sft_visual_chat.py | 1 | # Copyright 2020-2026 The HuggingFace Team. All rights reserved. | COMMENT |
| 295 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/conftest.py | 27 | # ============================================================================ | COMMENT |
| MEDIUM | tests/conftest.py | 29 | # ============================================================================ | COMMENT |
| MEDIUM | tests/conftest.py | 74 | # ============================================================================ | COMMENT |
| MEDIUM | tests/conftest.py | 76 | # ============================================================================ | COMMENT |
| MEDIUM | tests/conftest.py | 88 | # ============================================================================ | COMMENT |
| MEDIUM | examples/grpo_harbor/harnesses/terminal_notes/env.py | 60 | # ── shell toolkit ─────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/grpo_harbor/harnesses/terminal_notes/env.py | 170 | # ── note toolkit (in-env state) ────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/grpo_browsergym/browsergym_llm.py | 237 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | examples/grpo_browsergym/browsergym_llm.py | 239 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | examples/grpo_browsergym/browsergym_llm.py | 256 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | examples/grpo_browsergym/browsergym_llm.py | 258 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | examples/grpo_browsergym/browsergym_llm.py | 266 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | examples/grpo_browsergym/browsergym_llm.py | 268 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | examples/grpo_sudoku/grpo_sudoku.py | 109 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | examples/grpo_sudoku/grpo_sudoku.py | 111 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | examples/grpo_sudoku/grpo_sudoku.py | 191 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | examples/grpo_sudoku/grpo_sudoku.py | 193 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | examples/grpo_sudoku/grpo_sudoku.py | 343 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | examples/grpo_sudoku/grpo_sudoku.py | 345 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | examples/grpo_sudoku/grpo_sudoku.py | 373 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | examples/grpo_sudoku/grpo_sudoku.py | 375 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | examples/grpo_sql_agent/grpo_sql_agent.py | 184 | # ------------------------ | COMMENT |
| MEDIUM | examples/grpo_sql_agent/grpo_sql_agent.py | 186 | # ------------------------ | COMMENT |
| MEDIUM | examples/grpo_sql_agent/grpo_sql_agent.py | 231 | # ------------------------ | COMMENT |
| MEDIUM | examples/grpo_sql_agent/grpo_sql_agent.py | 233 | # ------------------------ | COMMENT |
| MEDIUM⚡ | examples/grpo_sql_agent/grpo_sql_agent.py | 260 | # ------------------------ | STRING |
| MEDIUM⚡ | examples/grpo_sql_agent/grpo_sql_agent.py | 262 | # ------------------------ | STRING |
| MEDIUM⚡ | examples/grpo_sql_agent/grpo_sql_agent.py | 267 | # ------------------------ | STRING |
| MEDIUM⚡ | examples/grpo_sql_agent/grpo_sql_agent.py | 269 | # ------------------------ | STRING |
| MEDIUM | examples/grpo_sql_agent/grpo_sql_agent.py | 284 | # ------------------------ | STRING |
| MEDIUM | examples/grpo_sql_agent/grpo_sql_agent.py | 286 | # ------------------------ | STRING |
| MEDIUM⚡ | examples/grpo_sql_agent/grpo_sql_agent.py | 298 | # ------------------------ | STRING |
| MEDIUM⚡ | examples/grpo_sql_agent/grpo_sql_agent.py | 300 | # ------------------------ | STRING |
| MEDIUM⚡ | examples/grpo_sql_agent/grpo_sql_agent.py | 310 | # ------------------------ | STRING |
| MEDIUM⚡ | examples/grpo_sql_agent/grpo_sql_agent.py | 312 | # ------------------------ | STRING |
| MEDIUM⚡ | examples/grpo_sql_agent/grpo_sql_agent.py | 315 | # ------------------------ | STRING |
| MEDIUM⚡ | examples/grpo_sql_agent/grpo_sql_agent.py | 317 | # ------------------------ | STRING |
| MEDIUM | examples/gold_qwen3_vl/gold_qwen3_vl.py | 110 | # ────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/gold_qwen3_vl/gold_qwen3_vl.py | 112 | # ────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/gold_qwen3_vl/gold_qwen3_vl.py | 130 | # ────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/gold_qwen3_vl/gold_qwen3_vl.py | 132 | # ────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/gold_qwen3_vl/gold_qwen3_vl.py | 143 | # ────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/gold_qwen3_vl/gold_qwen3_vl.py | 145 | # ────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/gold_qwen3_vl/gold_qwen3_vl.py | 189 | # ────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/gold_qwen3_vl/gold_qwen3_vl.py | 191 | # ────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | trl/experimental/iw_opd/iw_opd_trainer.py | 726 | # ────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | trl/experimental/iw_opd/iw_opd_trainer.py | 728 | # ────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | trl/experimental/iw_opd/iw_opd_trainer.py | 788 | # ────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | trl/experimental/iw_opd/iw_opd_trainer.py | 790 | # ────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | trl/experimental/iw_opd/iw_opd_trainer.py | 1074 | # ────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | trl/experimental/iw_opd/iw_opd_trainer.py | 1076 | # ────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | trl/experimental/iw_opd/iw_opd_trainer.py | 1663 | # ────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | trl/experimental/iw_opd/iw_opd_trainer.py | 1665 | # ────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | trl/experimental/ssd/ssd_trainer.py | 290 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | trl/experimental/ssd/ssd_trainer.py | 292 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | trl/experimental/ssd/ssd_trainer.py | 340 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | trl/experimental/ssd/ssd_trainer.py | 342 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | trl/experimental/ssd/ssd_trainer.py | 359 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | trl/experimental/ssd/ssd_trainer.py | 361 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | trl/experimental/ssd/ssd_trainer.py | 442 | # ------------------------------------------------------------------ | COMMENT |
| 14 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | AGENTS.md | 0 | brief one-line description of what this does. args: param1 (`str`): description of required param. param2 (`int`, *optio | STRING |
| HIGH | CLAUDE.md | 0 | brief one-line description of what this does. args: param1 (`str`): description of required param. param2 (`int`, *optio | STRING |
| HIGH | .cursor/BUGBOT.md | 0 | brief one-line description of what this does. args: param1 (`str`): description of required param. param2 (`int`, *optio | STRING |
| HIGH | .ai/AGENTS.md | 0 | brief one-line description of what this does. args: param1 (`str`): description of required param. param2 (`int`, *optio | STRING |
| HIGH | tests/test_rloo_trainer.py | 0 | test that training works with additional generation kwargs. | STRING |
| HIGH | tests/test_grpo_trainer.py | 0 | test that training works with additional generation kwargs. | STRING |
| HIGH | tests/test_distillation_trainer.py | 0 | test that training works with additional generation kwargs. | STRING |
| HIGH | tests/test_grpo_trainer.py | 0 | asynchronously multiplies two integers. args: a: the first integer. b: the second integer. returns: the product of the t | STRING |
| HIGH | tests/test_vllm_client_server.py | 0 | asynchronously multiplies two integers. args: a: the first integer. b: the second integer. returns: the product of the t | STRING |
| HIGH | tests/test_distillation_trainer.py | 0 | asynchronously multiplies two integers. args: a: the first integer. b: the second integer. returns: the product of the t | STRING |
| HIGH | docs/source/grpo_trainer.md | 0 | asynchronously multiplies two integers. args: a: the first integer. b: the second integer. returns: the product of the t | STRING |
| HIGH | docs/source/distillation_trainer.md | 0 | asynchronously multiplies two integers. args: a: the first integer. b: the second integer. returns: the product of the t | STRING |
| HIGH | docs/source/openenv.md | 0 | make a guess in the wordle environment. args: guess: the guessed word, formatted as '[abcde]' returns: the feedback mess | STRING |
| HIGH | examples/grpo_multi_env/grpo_multi_env.py | 0 | make a guess in the wordle environment. args: guess: the guessed word, formatted as '[abcde]' returns: the feedback mess | STRING |
| HIGH | examples/grpo_wordle/grpo_wordle.py | 0 | make a guess in the wordle environment. args: guess: the guessed word, formatted as '[abcde]' returns: the feedback mess | STRING |
| HIGH | examples/grpo_carla/carla_vlm_gemma.py | 0 | change lane to avoid obstacles. args: direction: direction to change lane, either "left" or "right". returns: the scene | STRING |
| HIGH | examples/grpo_carla/carla_vlm.py | 0 | change lane to avoid obstacles. args: direction: direction to change lane, either "left" or "right". returns: the scene | STRING |
| HIGH | examples/grpo_carla/grpo_carla.py | 0 | change lane to avoid obstacles. args: direction: direction to change lane, either "left" or "right". returns: the scene | STRING |
| HIGH | examples/datasets/tldr.py | 0 | arguments for the script. args: push_to_hub (`bool`, *optional*, defaults to `false`): whether to push the dataset to th | STRING |
| HIGH | examples/datasets/deepmath_103k.py | 0 | arguments for the script. args: push_to_hub (`bool`, *optional*, defaults to `false`): whether to push the dataset to th | STRING |
| HIGH | examples/datasets/lm-human-preferences-sentiment.py | 0 | arguments for the script. args: push_to_hub (`bool`, *optional*, defaults to `false`): whether to push the dataset to th | STRING |
| HIGH | …mples/datasets/lm-human-preferences-descriptiveness.py | 0 | arguments for the script. args: push_to_hub (`bool`, *optional*, defaults to `false`): whether to push the dataset to th | STRING |
| HIGH | examples/datasets/hh-rlhf-helpful-base.py | 0 | arguments for the script. args: push_to_hub (`bool`, *optional*, defaults to `false`): whether to push the dataset to th | STRING |
| HIGH | examples/datasets/rlaif-v.py | 0 | arguments for the script. args: push_to_hub (`bool`, *optional*, defaults to `false`): whether to push the dataset to th | STRING |
| HIGH | examples/datasets/llava_instruct_mix.py | 0 | arguments for the script. args: push_to_hub (`bool`, *optional*, defaults to `false`): whether to push the dataset to th | STRING |
| HIGH | examples/datasets/ultrafeedback-prompt.py | 0 | arguments for the script. args: push_to_hub (`bool`, *optional*, defaults to `false`): whether to push the dataset to th | STRING |
| HIGH | examples/datasets/tldr_preference.py | 0 | arguments for the script. args: push_to_hub (`bool`, *optional*, defaults to `false`): whether to push the dataset to th | STRING |
| HIGH | scripts/generate_zen_multi_image_dataset.py | 0 | arguments for the script. args: test_size (`float`, *optional*, defaults to `0.1`): fraction of the dataset to include i | STRING |
| HIGH | scripts/generate_harmony_dataset.py | 0 | arguments for the script. args: test_size (`float`, *optional*, defaults to `0.1`): fraction of the dataset to include i | STRING |
| HIGH | scripts/generate_zen_image_dataset.py | 0 | arguments for the script. args: test_size (`float`, *optional*, defaults to `0.1`): fraction of the dataset to include i | STRING |
| HIGH | scripts/generate_zen_dataset.py | 0 | arguments for the script. args: test_size (`float`, *optional*, defaults to `0.1`): fraction of the dataset to include i | STRING |
| HIGH | scripts/generate_toolcall_dataset.py | 0 | arguments for the script. args: test_size (`float`, *optional*, defaults to `0.1`): fraction of the dataset to include i | STRING |
| HIGH | trl/experimental/iw_opd/iw_opd_trainer.py | 0 | trim padded batch tensors into per-sample (prompt+completion) sequences for teacher-server requests. | STRING |
| HIGH | …tal/server_distillation/server_distillation_trainer.py | 0 | trim padded batch tensors into per-sample (prompt+completion) sequences for teacher-server requests. | STRING |
| HIGH | trl/experimental/sdpo/sdpo_trainer.py | 0 | trim padded batch tensors into per-sample (prompt+completion) sequences for teacher-server requests. | STRING |
| HIGH | trl/experimental/sdft/sdft_trainer.py | 0 | trim padded batch tensors into per-sample (prompt+completion) sequences for teacher-server requests. | STRING |
| HIGH | trl/experimental/cpo/cpo_trainer.py | 0 | compute the kto loss and other metrics for the given batch of inputs for train or test. | STRING |
| HIGH | trl/experimental/orpo/orpo_trainer.py | 0 | compute the kto loss and other metrics for the given batch of inputs for train or test. | STRING |
| HIGH | trl/trainer/kto_trainer.py | 0 | compute the kto loss and other metrics for the given batch of inputs for train or test. | STRING |
| HIGH | trl/trainer/distillation_trainer.py | 0 | tokenize prompts and extract images/multimodal fields for generation. | STRING |
| HIGH | trl/trainer/rloo_trainer.py | 0 | tokenize prompts and extract images/multimodal fields for generation. | STRING |
| HIGH | trl/trainer/grpo_trainer.py | 0 | tokenize prompts and extract images/multimodal fields for generation. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | examples/grpo_harbor/harnesses/__init__.py | 15 | CODE | |
| LOW | examples/grpo_harbor/harnesses/__init__.py | 16 | CODE | |
| LOW | examples/grpo_harbor/harnesses/__init__.py | 17 | CODE | |
| LOW | examples/grpo_harbor/harnesses/bash/__init__.py | 15 | CODE | |
| LOW | …mples/grpo_harbor/harnesses/terminal_notes/__init__.py | 15 | CODE | |
| LOW | examples/grpo_harbor/harnesses/jupyter/kernel_server.py | 29 | CODE | |
| LOW | examples/grpo_harbor/harnesses/jupyter/__init__.py | 15 | CODE | |
| LOW | examples/grpo_harbor/harnesses/jupyter/run_cell.py | 25 | CODE | |
| LOW | examples/async_grpo_harbor/async_grpo_harbor.py | 74 | CODE | |
| LOW | examples/async_grpo_harbor/launcher.py | 69 | CODE | |
| LOW | examples/grpo_browsergym/grpo_browsergym.py | 53 | CODE | |
| LOW | examples/grpo_browsergym/browsergym_llm.py | 67 | CODE | |
| LOW | examples/grpo_sudoku/grpo_sudoku.py | 87 | CODE | |
| LOW | examples/ssd_codegen/ssd_eval.py | 59 | CODE | |
| LOW | trl/__init__.py | 19 | CODE | |
| LOW | trl/__init__.py | 77 | CODE | |
| LOW | trl/__init__.py | 77 | CODE | |
| LOW | trl/__init__.py | 77 | CODE | |
| LOW | trl/__init__.py | 77 | CODE | |
| LOW | trl/__init__.py | 83 | CODE | |
| LOW | trl/__init__.py | 83 | CODE | |
| LOW | trl/__init__.py | 83 | CODE | |
| LOW | trl/__init__.py | 83 | CODE | |
| LOW | trl/__init__.py | 83 | CODE | |
| LOW | trl/__init__.py | 83 | CODE | |
| LOW | trl/__init__.py | 83 | CODE | |
| LOW | trl/__init__.py | 83 | CODE | |
| LOW | trl/__init__.py | 83 | CODE | |
| LOW | trl/__init__.py | 83 | CODE | |
| LOW | trl/__init__.py | 83 | CODE | |
| LOW | trl/__init__.py | 96 | CODE | |
| LOW | trl/__init__.py | 97 | CODE | |
| LOW | trl/__init__.py | 97 | CODE | |
| LOW | trl/__init__.py | 97 | CODE | |
| LOW | trl/__init__.py | 97 | CODE | |
| LOW | trl/__init__.py | 97 | CODE | |
| LOW | trl/__init__.py | 98 | CODE | |
| LOW | trl/__init__.py | 98 | CODE | |
| LOW | trl/__init__.py | 98 | CODE | |
| LOW | trl/__init__.py | 98 | CODE | |
| LOW | trl/__init__.py | 98 | CODE | |
| LOW | trl/__init__.py | 98 | CODE | |
| LOW | trl/__init__.py | 98 | CODE | |
| LOW | trl/__init__.py | 98 | CODE | |
| LOW | trl/__init__.py | 98 | CODE | |
| LOW | trl/__init__.py | 98 | CODE | |
| LOW | trl/__init__.py | 98 | CODE | |
| LOW | trl/__init__.py | 98 | CODE | |
| LOW | trl/__init__.py | 98 | CODE | |
| LOW | trl/__init__.py | 98 | CODE | |
| LOW | trl/__init__.py | 98 | CODE | |
| LOW | trl/__init__.py | 98 | CODE | |
| LOW | trl/__init__.py | 98 | CODE | |
| LOW | trl/__init__.py | 98 | CODE | |
| LOW | trl/__init__.py | 98 | CODE | |
| LOW | trl/__init__.py | 98 | CODE | |
| LOW | trl/__init__.py | 98 | CODE | |
| LOW | trl/__init__.py | 98 | CODE | |
| LOW | trl/kernels/__init__.py | 15 | CODE | |
| LOW | trl/kernels/__init__.py | 16 | CODE | |
| 116 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_utils.py | 1102 | CODE | |
| LOW | tests/test_utils.py | 1133 | CODE | |
| LOW | tests/test_kto_trainer.py | 1050 | CODE | |
| LOW | tests/test_dpo_trainer.py | 1035 | CODE | |
| LOW | tests/test_distillation_trainer.py | 978 | CODE | |
| LOW | tests/experimental/test_openreward.py | 214 | CODE | |
| LOW | examples/grpo_catch/grpo_catch.py | 209 | CODE | |
| LOW | …les/sdft_privileged_context/sdft_privileged_context.py | 119 | CODE | |
| LOW | examples/sdpo_math/sdpo_math.py | 162 | CODE | |
| LOW | examples/grpo_multi_env/grpo_multi_env.py | 127 | CODE | |
| LOW | examples/sft_gemma3_vision/sft_gemma3_vision.py | 77 | CODE | |
| LOW | examples/sft_gemma3_vision/sft_gemma3_vision.py | 96 | CODE | |
| LOW | examples/grpo_sudoku/grpo_sudoku.py | 212 | CODE | |
| LOW | examples/grpo_sudoku/grpo_sudoku.py | 294 | CODE | |
| LOW | examples/grpo_sudoku/grpo_sudoku.py | 378 | CODE | |
| LOW | examples/grpo_sudoku/grpo_sudoku.py | 545 | CODE | |
| LOW | examples/grpo_sql_agent/grpo_sql_agent.py | 50 | CODE | |
| LOW | examples/grpo_sql_agent/grpo_sql_agent.py | 145 | CODE | |
| LOW | scripts/generate_tiny_models/_common.py | 295 | CODE | |
| LOW | trl/chat_template_utils.py | 674 | CODE | |
| LOW | trl/data_utils.py | 32 | CODE | |
| LOW | trl/data_utils.py | 967 | CODE | |
| LOW | trl/_compat.py | 90 | CODE | |
| LOW | trl/import_utils.py | 29 | CODE | |
| LOW | trl/kernels/chunked_logprob.py | 272 | CODE | |
| LOW | trl/kernels/chunked_divergence.py | 247 | CODE | |
| LOW | trl/kernels/chunked_divergence.py | 374 | CODE | |
| LOW | trl/experimental/merge_model_callback.py | 82 | CODE | |
| LOW | trl/experimental/merge_model_callback.py | 260 | CODE | |
| LOW | trl/experimental/utils.py | 189 | CODE | |
| LOW | trl/experimental/utils.py | 930 | CODE | |
| LOW | trl/experimental/utils.py | 950 | CODE | |
| LOW | trl/experimental/utils.py | 71 | CODE | |
| LOW | trl/experimental/utils.py | 468 | CODE | |
| LOW | trl/experimental/utils.py | 485 | CODE | |
| LOW | trl/experimental/iw_opd/iw_opd_trainer.py | 226 | CODE | |
| LOW | trl/experimental/iw_opd/iw_opd_trainer.py | 385 | CODE | |
| LOW | trl/experimental/iw_opd/iw_opd_trainer.py | 695 | CODE | |
| LOW | trl/experimental/iw_opd/iw_opd_trainer.py | 847 | CODE | |
| LOW | trl/experimental/iw_opd/iw_opd_trainer.py | 889 | CODE | |
| LOW | trl/experimental/iw_opd/iw_opd_trainer.py | 946 | CODE | |
| LOW | trl/experimental/iw_opd/iw_opd_trainer.py | 1111 | CODE | |
| LOW | trl/experimental/iw_opd/iw_opd_trainer.py | 1713 | CODE | |
| LOW | trl/experimental/sdpo/sdpo_trainer.py | 172 | CODE | |
| LOW | trl/experimental/sdpo/sdpo_trainer.py | 350 | CODE | |
| LOW | trl/experimental/sdpo/sdpo_trainer.py | 1142 | CODE | |
| LOW | trl/experimental/cpo/cpo_trainer.py | 139 | CODE | |
| LOW | trl/experimental/cpo/cpo_trainer.py | 476 | CODE | |
| LOW | trl/experimental/cpo/cpo_trainer.py | 614 | CODE | |
| LOW | trl/experimental/cpo/cpo_trainer.py | 678 | CODE | |
| LOW | trl/experimental/harbor/_spec.py | 66 | CODE | |
| LOW | trl/experimental/orpo/orpo_trainer.py | 149 | CODE | |
| LOW | trl/experimental/orpo/orpo_trainer.py | 458 | CODE | |
| LOW | trl/experimental/orpo/orpo_trainer.py | 606 | CODE | |
| LOW | trl/experimental/online_dpo/online_dpo_trainer.py | 177 | CODE | |
| LOW | trl/experimental/online_dpo/online_dpo_trainer.py | 815 | CODE | |
| LOW | trl/experimental/online_dpo/online_dpo_trainer.py | 885 | CODE | |
| LOW | trl/experimental/online_dpo/online_dpo_trainer.py | 947 | CODE | |
| LOW | trl/experimental/online_dpo/online_dpo_trainer.py | 1140 | CODE | |
| LOW | trl/experimental/bema_for_ref_model/callback.py | 204 | CODE | |
| 80 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/testing_utils.py | 166 | except psutil.NoSuchProcess: | CODE |
| HIGH | tests/testing_utils.py | 159 | except psutil.NoSuchProcess: | CODE |
| HIGH | tests/experimental/test_online_dpo_trainer.py | 300 | except Exception: | CODE |
| HIGH | tests/experimental/test_openreward.py | 67 | except requests.RequestException: | CODE |
| HIGH | examples/grpo_harbor/harnesses/jupyter/kernel_server.py | 54 | except SystemExit: | CODE |
| HIGH | examples/async_grpo_harbor/launcher.py | 118 | except ProcessLookupError: | CODE |
| HIGH | examples/async_grpo_harbor/launcher.py | 125 | except ProcessLookupError: | CODE |
| HIGH | examples/grpo_multi_env/grpo_multi_env.py | 136 | except Exception: | CODE |
| HIGH | examples/grpo_multi_env/grpo_multi_env.py | 147 | except Exception: | CODE |
| HIGH | trl/experimental/harbor/_env.py | 195 | except Exception: # noqa: BLE001 — best-effort teardown | CODE |
| HIGH | …xperimental/async_distillation/async_rollout_worker.py | 113 | except RuntimeError: | CODE |
| HIGH | …xperimental/async_distillation/async_rollout_worker.py | 453 | except queue.Full: | CODE |
| HIGH | …xperimental/async_distillation/async_rollout_worker.py | 305 | except Exception: | CODE |
| HIGH | trl/experimental/async_distillation/vllm_client.py | 63 | except (requests.ConnectionError, requests.Timeout, OSError): | CODE |
| HIGH | …ental/async_distillation/async_distillation_trainer.py | 688 | except queue.Full: | CODE |
| HIGH | trl/experimental/async_grpo/async_grpo_trainer.py | 390 | except queue.Full: | CODE |
| HIGH | trl/experimental/async_grpo/async_rollout_worker.py | 262 | except RuntimeError: | CODE |
| HIGH | trl/experimental/async_grpo/async_rollout_worker.py | 812 | except queue.Full: | CODE |
| HIGH | trl/experimental/async_grpo/async_rollout_worker.py | 707 | except asyncio.QueueFull: | CODE |
| HIGH | trl/experimental/async_grpo/async_rollout_worker.py | 511 | except Exception: | CODE |
| HIGH | trl/experimental/async_grpo/vllm_client.py | 63 | except (requests.ConnectionError, requests.Timeout, OSError): | CODE |
| HIGH | trl/models/activation_offloading.py | 261 | except (RuntimeError, AttributeError): | CODE |
| HIGH | trl/trainer/utils.py | 116 | except ValueError: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_rloo_trainer.py | 2119 | # Create a single processing class (tokenizer) | COMMENT |
| MEDIUM | tests/test_rloo_trainer.py | 2173 | # Create a single processing class (tokenizer) | COMMENT |
| MEDIUM | tests/test_grpo_trainer.py | 4132 | # Create a single processing class (tokenizer) | COMMENT |
| MEDIUM | tests/test_grpo_trainer.py | 4186 | # Create a single processing class (tokenizer) | COMMENT |
| MEDIUM⚡ | tests/test_cli_utils.py | 202 | # Create the main parser | COMMENT |
| MEDIUM⚡ | tests/test_cli_utils.py | 208 | # Create a subparser for a specific command | COMMENT |
| MEDIUM⚡ | tests/test_cli_utils.py | 228 | # Create the main parser | COMMENT |
| MEDIUM⚡ | tests/test_cli_utils.py | 234 | # Create a subparser for a specific command | COMMENT |
| MEDIUM⚡ | tests/test_cli_utils.py | 251 | # Create the main parser | COMMENT |
| MEDIUM⚡ | tests/test_cli_utils.py | 257 | # Create a subparser for a specific command | COMMENT |
| MEDIUM⚡ | tests/test_cli_utils.py | 273 | # Create the main parser | COMMENT |
| MEDIUM⚡ | tests/test_cli_utils.py | 279 | # Create a subparser for a specific command | COMMENT |
| MEDIUM | tests/test_cli.py | 174 | # Create a temporary config file | COMMENT |
| MEDIUM | scripts/generate_zen_multi_image_dataset.py | 76 | # Create the images | STRING |
| MEDIUM | scripts/generate_zen_multi_image_dataset.py | 106 | # Create the images | STRING |
| MEDIUM | scripts/generate_zen_multi_image_dataset.py | 157 | # Create the images | STRING |
| MEDIUM | scripts/generate_zen_multi_image_dataset.py | 229 | # Create the images | STRING |
| MEDIUM | scripts/generate_zen_multi_image_dataset.py | 260 | # Create the images | STRING |
| MEDIUM | trl/data_utils.py | 785 | # Create a new bin | COMMENT |
| MEDIUM | trl/experimental/merge_model_callback.py | 37 | # Create the repository if it doesn't exist | COMMENT |
| MEDIUM⚡ | trl/experimental/merge_model_callback.py | 118 | # Create the merge configuration dictionary | STRING |
| MEDIUM⚡ | trl/experimental/merge_model_callback.py | 128 | # Create the MergeConfiguration from the dictionary | STRING |
| MEDIUM⚡ | trl/experimental/merge_model_callback.py | 137 | # Create the TIES merge configuration dictionary | STRING |
| MEDIUM⚡ | trl/experimental/merge_model_callback.py | 172 | # Create the MergeConfiguration from the dictionary | STRING |
| MEDIUM⚡ | trl/experimental/merge_model_callback.py | 181 | # Create the DARE TIES merge configuration dictionary | STRING |
| MEDIUM⚡ | trl/experimental/merge_model_callback.py | 216 | # Create the MergeConfiguration from the dictionary | STRING |
| MEDIUM⚡ | trl/experimental/merge_model_callback.py | 226 | # Create the SLERP merge configuration dictionary | STRING |
| MEDIUM | trl/experimental/merge_model_callback.py | 255 | # Create the MergeConfiguration from the dictionary | STRING |
| MEDIUM | trl/experimental/utils.py | 15 | # This file contains utility classes and functions that are used across more than one experimental trainer or feature. | COMMENT |
| MEDIUM | trl/experimental/cpo/cpo_trainer.py | 189 | # Initialize this variable to False. This helps tracking the case when `peft_module_casting_to_bf16` | COMMENT |
| MEDIUM | trl/experimental/orpo/orpo_trainer.py | 199 | # Initialize this variable to False. This helps tracking the case when `peft_module_casting_to_bf16` | COMMENT |
| MEDIUM | trl/experimental/online_dpo/online_dpo_trainer.py | 417 | # Define the collator if not provided | COMMENT |
| MEDIUM | trl/experimental/online_dpo/online_dpo_trainer.py | 931 | # Create the output dict with required fields | COMMENT |
| MEDIUM | trl/trainer/utils.py | 169 | # Create an output tensor filled with the padding value | COMMENT |
| MEDIUM | trl/trainer/utils.py | 180 | # Define the slices | COMMENT |
| MEDIUM | trl/trainer/utils.py | 1272 | # This function is intentionally not used internally. It is provided as a utility for users whose datasets contain | COMMENT |
| MEDIUM | trl/trainer/utils.py | 928 | self.generator = torch.Generator() # Create a local random generator | CODE |
| MEDIUM | trl/trainer/callbacks.py | 227 | # Create a table per group | COMMENT |
| MEDIUM | trl/trainer/callbacks.py | 704 | # Create a new instance and load state_dict | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | CONTRIBUTING.md | 280 | Replicate a string `n` times with a separator. Args: string (`str`): String to replicate. | STRING |
| HIGH | AGENTS.md | 92 | Brief one-line description of what this does. Args: param1 (`str`): Description of require | STRING |
| HIGH | CLAUDE.md | 92 | Brief one-line description of what this does. Args: param1 (`str`): Description of require | STRING |
| HIGH | .cursor/BUGBOT.md | 92 | Brief one-line description of what this does. Args: param1 (`str`): Description of require | STRING |
| HIGH | trl/chat_template_utils.py | 675 | Adds the appropriate response template (or legacy schema) to the given tokenizer based on its chat template. A | STRING |
| HIGH | trl/data_utils.py | 34 | Convert messages into a structured multimodal format and inject the provided images into the message contents. | STRING |
| HIGH | trl/data_utils.py | 127 | Check if the example is in a conversational format. Args: example (`dict[str, Any]`): A si | STRING |
| HIGH | trl/data_utils.py | 309 | If the example is in a conversational format, apply a chat template to it. Args: example (`dict[str, l | STRING |
| HIGH | trl/data_utils.py | 549 | Extracts the shared prompt from a preference data example, where the prompt is implicit within both the chosen and | STRING |
| HIGH | trl/data_utils.py | 928 | Check if the example is in a conversational format (from/value). Note that this format isn't recommended. Prefer | STRING |
| HIGH | …ental/async_distillation/async_distillation_trainer.py | 914 | Round a LoRA rank up to the smallest `max_lora_rank` vLLM accepts. `max_lora_rank` is a capacity bound rather | STRING |
| HIGH | trl/experimental/gold/gold_trainer.py | 556 | Merge probabilities based on alignment groups, using either the "observed" or "bayesian" strategy (`sel | STRING |
| HIGH | trl/experimental/async_grpo/async_grpo_trainer.py | 693 | Round a LoRA rank up to the smallest `max_lora_rank` vLLM accepts. `max_lora_rank` is a capacity bound rather | STRING |
| HIGH | trl/scripts/vllm_serve.py | 196 | Build the `vllm serve` command line that serves `script_args` the way TRL trainers expect. Beyond the plain ar | STRING |
| HIGH | trl/trainer/utils.py | 128 | Pads a list of tensors to the same shape along the first dimension. Args: tensors (`list[torch.Tensor] | STRING |
| HIGH | .ai/AGENTS.md | 92 | Brief one-line description of what this does. Args: param1 (`str`): Description of require | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_rewards.py | 229 | def target(): | CODE |
| LOW | tests/test_rewards.py | 232 | except Exception as e: | CODE |
| LOW | tests/test_distillation_trainer.py | 1018 | except Exception as e: | CODE |
| MEDIUM | tests/experimental/test_gold_trainer.py | 51 | def openr1_examples(): | CODE |
| MEDIUM | tests/experimental/test_gold_trainer.py | 64 | def countdown_examples(): | CODE |
| MEDIUM | tests/experimental/test_gold_trainer.py | 304 | def vlm_dataset(): | CODE |
| LOW | tests/experimental/test_gold_trainer.py | 58 | except Exception as exc: # pragma: no cover - network/environment dependent | CODE |
| LOW | tests/experimental/test_gold_trainer.py | 71 | except Exception as exc: # pragma: no cover - network/environment dependent | CODE |
| LOW | tests/experimental/test_gold_trainer.py | 311 | except Exception as exc: # pragma: no cover - network/environment dependent | CODE |
| LOW | tests/experimental/test_gold_trainer.py | 2721 | except Exception as exc: # pragma: no cover - network/environment dependent | CODE |
| LOW | tests/experimental/test_gold_trainer.py | 2772 | except Exception as exc: # pragma: no cover - network/environment dependent | CODE |
| LOW⚡ | tests/experimental/test_online_dpo_trainer.py | 300 | except Exception: | CODE |
| LOW | docs/source/openenv.md | 406 | except Exception: | CODE |
| LOW | docs/source/openenv.md | 417 | except Exception: | CODE |
| LOW | examples/grpo_catch/grpo_catch.py | 166 | except Exception as e: | CODE |
| LOW | examples/grpo_carla/carla_vlm_gemma.py | 165 | except Exception as e: | CODE |
| LOW | examples/grpo_harbor/harnesses/jupyter/kernel_server.py | 70 | except Exception: | CODE |
| MEDIUM | examples/grpo_harbor/harnesses/jupyter/kernel_server.py | 63 | def do_POST(self): | CODE |
| LOW | examples/grpo_harbor/harnesses/jupyter/run_cell.py | 55 | except Exception as exc: | CODE |
| LOW | …les/sdft_privileged_context/sdft_privileged_context.py | 199 | except Exception: | CODE |
| LOW | examples/grpo_multi_env/grpo_multi_env.py | 136 | except Exception: | CODE |
| LOW | examples/grpo_multi_env/grpo_multi_env.py | 147 | except Exception: | CODE |
| LOW | examples/sft_gemma3_vision/sft_gemma3_vision.py | 106 | except Exception as e: | CODE |
| MEDIUM | examples/sft_gemma3_vision/sft_gemma3_vision.py | 107 | print(f"Error processing image {img_path}: {e}") | CODE |
| MEDIUM | scripts/add_copyrights.py | 48 | print(f"Error fetching tracked files: {e}") | CODE |
| LOW | trl/_lazy_module.py | 72 | except Exception as e: | CODE |
| LOW | trl/_compat.py | 47 | except Exception as e: | CODE |
| LOW | trl/_compat.py | 73 | except Exception as e: | CODE |
| LOW | trl/_compat.py | 130 | except Exception as e: | CODE |
| LOW | trl/_compat.py | 159 | except Exception as e: | CODE |
| LOW | trl/experimental/harbor/_spec.py | 102 | except Exception: # noqa: BLE001 | CODE |
| LOW | trl/experimental/harbor/_env.py | 195 | except Exception: # noqa: BLE001 — best-effort teardown | CODE |
| MEDIUM | trl/experimental/harbor/_env.py | 192 | def __del__(self): | CODE |
| LOW | trl/experimental/openreward/_spec.py | 176 | except Exception: # noqa: BLE001 | CODE |
| LOW | trl/experimental/openreward/_spec.py | 283 | except Exception as e: # noqa: BLE001 | CODE |
| LOW | trl/experimental/openreward/_spec.py | 313 | except Exception as e: # noqa: BLE001 | CODE |
| LOW | trl/experimental/openreward/environment.py | 262 | except Exception as e: # noqa: BLE001 | CODE |
| LOW | trl/experimental/openreward/environment.py | 274 | except Exception as e: # noqa: BLE001 | CODE |
| LOW | trl/experimental/async_distillation/weight_transfer.py | 115 | except Exception as exc: | CODE |
| LOW | trl/experimental/async_distillation/weight_transfer.py | 154 | except Exception as exc: | CODE |
| LOW | …xperimental/async_distillation/async_rollout_worker.py | 150 | except Exception: | CODE |
| LOW | …xperimental/async_distillation/async_rollout_worker.py | 305 | except Exception: | CODE |
| LOW | …ental/async_distillation/async_distillation_trainer.py | 589 | except Exception as e: # noqa: BLE001 | CODE |
| LOW | …ental/async_distillation/async_distillation_trainer.py | 1430 | except Exception as error: | CODE |
| LOW | trl/experimental/async_grpo/async_grpo_trainer.py | 294 | except Exception as e: # noqa: BLE001 | CODE |
| LOW | trl/experimental/async_grpo/async_grpo_trainer.py | 1311 | except Exception as error: | CODE |
| LOW | trl/experimental/async_grpo/openenv_harness.py | 163 | except Exception: | CODE |
| LOW | trl/experimental/async_grpo/openenv_harness.py | 188 | except Exception: | CODE |
| LOW | trl/experimental/async_grpo/openenv_harness.py | 256 | except Exception: | CODE |
| LOW | trl/experimental/async_grpo/openenv_harness.py | 263 | except Exception: | CODE |
| MEDIUM | trl/experimental/async_grpo/openenv_harness.py | 160 | def _close(session): | CODE |
| LOW | trl/experimental/async_grpo/weight_transfer.py | 123 | except Exception as exc: | CODE |
| LOW | trl/experimental/async_grpo/weight_transfer.py | 162 | except Exception as exc: | CODE |
| LOW | trl/experimental/async_grpo/async_rollout_worker.py | 300 | except Exception: | CODE |
| LOW | trl/experimental/async_grpo/async_rollout_worker.py | 511 | except Exception: | CODE |
| LOW | trl/experimental/async_grpo/async_rollout_worker.py | 971 | except Exception as error: | CODE |
| LOW | trl/scripts/utils.py | 410 | except Exception as e: | CODE |
| MEDIUM | trl/scripts/utils.py | 391 | def get_git_commit_hash(package_name): | CODE |
| LOW | trl/trainer/distillation_trainer.py | 1133 | except Exception as e: | CODE |
| LOW | trl/trainer/callbacks.py | 550 | except Exception as scorer_e: | CODE |
| 4 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | examples/gold_chatbot_arena/gold_chatbot_arena.py | 79 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/grpo_harbor/harnesses/__init__.py | 20 | __all__ = ["BashEnv", "JupyterEnv", "TerminalNotesEnv"] | CODE |
| LOW | examples/grpo_harbor/harnesses/bash/__init__.py | 18 | __all__ = ["BashEnv"] | CODE |
| LOW | …mples/grpo_harbor/harnesses/terminal_notes/__init__.py | 18 | __all__ = ["TerminalNotesEnv"] | CODE |
| LOW | examples/grpo_harbor/harnesses/jupyter/env.py | 52 | async def _setup(self) -> None: | CODE |
| LOW | examples/grpo_harbor/harnesses/jupyter/__init__.py | 18 | __all__ = ["JupyterEnv"] | CODE |
| LOW | examples/async_grpo_harbor/async_grpo_harbor.py | 92 | logger = logging.getLogger(__name__) | CODE |
| LOW | trl/kernels/__init__.py | 19 | __all__ = ["ChunkedLogProbFunction", "selective_log_softmax_and_entropy"] | CODE |
| LOW | trl/experimental/merge_model_callback.py | 32 | logger = logging.getLogger(__name__) | CODE |
| LOW | trl/experimental/iw_opd/__init__.py | 19 | __all__ = ["IWOPDConfig", "IWOPDTrainer"] | CODE |
| LOW | trl/experimental/ssd/__init__.py | 19 | __all__ = ["SSDConfig", "SSDTrainer"] | CODE |
| LOW | trl/experimental/sdpo/__init__.py | 19 | __all__ = ["SDPOConfig", "SDPOTrainer"] | CODE |
| LOW | trl/experimental/sdpo/teacher_sync.py | 29 | logger = logging.getLogger(__name__) | CODE |
| LOW | trl/experimental/sdpo/sdpo_trainer.py | 673 | def _setup_teacher_model(self) -> None: | CODE |
| LOW | trl/experimental/cpo/__init__.py | 19 | __all__ = ["CPOConfig", "CPOTrainer"] | CODE |
| LOW | trl/experimental/harbor/__init__.py | 32 | __all__ = ["AGENTS", "HarborBashEnv", "HarborEnv", "HarborSpec"] | CODE |
| LOW | trl/experimental/harbor/_env.py | 156 | async def _setup(self) -> None: | CODE |
| LOW | trl/experimental/orpo/__init__.py | 19 | __all__ = ["ORPOConfig", "ORPOTrainer"] | CODE |
| LOW | trl/experimental/online_dpo/__init__.py | 19 | __all__ = ["OnlineDPOConfig", "OnlineDPOTrainer"] | CODE |
| LOW | trl/experimental/bema_for_ref_model/callback.py | 25 | logger = logging.getLogger(__name__) | CODE |
| LOW | trl/experimental/sdft/__init__.py | 19 | __all__ = ["SDFTConfig", "SDFTTrainer"] | CODE |
| LOW | trl/experimental/sdft/teacher_sync.py | 29 | logger = logging.getLogger(__name__) | CODE |
| LOW | trl/experimental/sdft/sdft_trainer.py | 468 | def _setup_teacher_model(self) -> None: | CODE |
| LOW | trl/experimental/distillation/__init__.py | 22 | __all__ = ["DistillationConfig", "DistillationTrainer"] | CODE |
| LOW | trl/experimental/openreward/__init__.py | 18 | __all__ = ["OpenRewardSpec"] | CODE |
| LOW | trl/experimental/openreward/_spec.py | 51 | logger = logging.getLogger(__name__) | CODE |
| LOW | trl/experimental/openreward/environment.py | 32 | logger = logging.getLogger(__name__) | CODE |
| LOW | trl/experimental/gkd/__init__.py | 19 | __all__ = ["GKDConfig", "GKDTrainer"] | CODE |
| LOW | …xperimental/async_distillation/async_rollout_worker.py | 704 | def update_model_version(self, model_version: int) -> None: | CODE |
| LOW | trl/experimental/async_distillation/vllm_client.py | 149 | def update_weights(self, update_info: dict, timeout: int = 1800) -> None: | CODE |
| LOW | …ental/async_distillation/async_distillation_trainer.py | 460 | def update_model_version(self, model_version: int) -> None: ... | CODE |
| LOW | trl/experimental/gold/__init__.py | 19 | __all__ = ["GOLDConfig", "GOLDTrainer"] | CODE |
| LOW | trl/experimental/async_grpo/async_grpo_trainer.py | 145 | def update_model_version(self, model_version: int) -> None: | CODE |
| LOW | trl/experimental/async_grpo/async_rollout_worker.py | 1185 | def update_model_version(self, model_version: int) -> None: | CODE |
| LOW | trl/experimental/async_grpo/vllm_client.py | 161 | def update_weights(self, update_info: dict, timeout: int = 1800) -> None: | CODE |
| LOW | trl/experimental/tpo/__init__.py | 19 | __all__ = ["TPOConfig", "TPOTrainer"] | CODE |
| LOW | trl/experimental/kto/__init__.py | 22 | __all__ = ["KTOConfig", "KTOTrainer"] | CODE |
| LOW | trl/experimental/server_distillation/__init__.py | 19 | __all__ = ["ServerDistillationConfig", "ServerDistillationTrainer", "build_teacher_request_inputs"] | CODE |
| LOW | trl/cli/__init__.py | 18 | __all__ = ["main"] | CODE |
| LOW | trl/cli/commands/__init__.py | 36 | __all__ = ["Command", "get_commands"] | CODE |
| LOW | trl/scripts/utils.py | 36 | logger = logging.getLogger(__name__) | CODE |
| LOW | trl/trainer/callbacks.py | 61 | logger = logging.getLogger(__name__) | CODE |
| LOW | trl/generation/vllm_generation.py | 47 | logger = logging.getLogger(__name__) | CODE |
| LOW | trl/generation/__init__.py | 20 | __all__ = [] | CODE |
| LOW | trl/generation/vllm_client.py | 62 | logger = logging.getLogger(__name__) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_chat_template_utils.py | 61 | # Check if special tokens are correctly set | COMMENT |
| LOW | tests/test_chat_template_utils.py | 128 | # Check if special tokens are correctly set | COMMENT |
| LOW | tests/experimental/test_gkd_trainer.py | 53 | # Set temperature to 0 for deterministic output | COMMENT |
| LOW | tests/experimental/test_gkd_trainer.py | 70 | # Check if the generated texts start with the original prompts | COMMENT |
| LOW | tests/experimental/test_gkd_trainer.py | 81 | # Check if the two generations are identical | COMMENT |
| LOW | tests/experimental/test_online_dpo_trainer.py | 329 | # Check if training loss is available | COMMENT |
| LOW | scripts/add_copyrights.py | 61 | # Check if the exact copyright header exists | COMMENT |
| LOW | .github/workflows/tests.yml | 94 | if: github.ref == 'refs/heads/main' && !cancelled() # Check if the branch is main | CODE |
| LOW | .github/workflows/tests.yml | 151 | if: github.ref == 'refs/heads/main' && !cancelled() # Check if the branch is main | CODE |
| LOW | .github/workflows/tests.yml | 203 | if: github.ref == 'refs/heads/main' && !cancelled() # Check if the branch is main | CODE |
| LOW | .github/workflows/tests.yml | 259 | if: github.ref == 'refs/heads/main' && !cancelled() # Check if the branch is main | CODE |
| LOW | .github/workflows/tests.yml | 313 | if: github.ref == 'refs/heads/main' && !cancelled() # Check if the branch is main | CODE |
| LOW | trl/experimental/utils.py | 881 | # Check if model is sharded (FSDP/DS-Zero3) | COMMENT |
| LOW⚡ | trl/models/activation_offloading.py | 228 | # Check if tensor is on CPU (skip offloading) | COMMENT |
| LOW⚡ | trl/models/activation_offloading.py | 233 | # Check if tensor is too small | COMMENT |
| LOW⚡ | trl/models/activation_offloading.py | 238 | # Check if tensor is a parameter or buffer | COMMENT |
| LOW⚡ | trl/models/activation_offloading.py | 245 | # Check if tensor is an FP8 tensor (TorchAO) - skip offloading as they're already compressed | COMMENT |
| LOW⚡ | trl/models/activation_offloading.py | 251 | # Check if tensor storage is a model parameter (for FSDP compatibility) | COMMENT |
| LOW | trl/models/activation_offloading.py | 266 | # Check if tensor has broadcast dimensions (stride == 0) | COMMENT |
| LOW | trl/models/activation_offloading.py | 504 | # Check if tensor still exists (might have been cleaned up by a previous node) | COMMENT |
| LOW | trl/models/utils.py | 284 | # Check if the model is already a FSDP model due to `Manual Wrapping` and if so, don't wrap it again | COMMENT |
| LOW | trl/generation/vllm_client.py | 285 | # Check if the total timeout duration has passed | COMMENT |
| LOW | trl/extras/profiling.py | 208 | # Check if self is a Trainer-like object with required attributes | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_distillation_trainer.py | 61 | CODE | |
| LOW | trl/experimental/iw_opd/iw_opd_trainer.py | 385 | CODE | |
| LOW | trl/experimental/sdpo/sdpo_trainer.py | 350 | CODE | |
| LOW | trl/experimental/cpo/cpo_trainer.py | 139 | CODE | |
| LOW | trl/experimental/orpo/orpo_trainer.py | 149 | CODE | |
| LOW | trl/experimental/online_dpo/online_dpo_trainer.py | 177 | CODE | |
| LOW | trl/experimental/bema_for_ref_model/callback.py | 130 | CODE | |
| LOW | trl/experimental/openreward/_spec.py | 116 | CODE | |
| LOW | trl/experimental/openreward/environment.py | 146 | CODE | |
| LOW | trl/experimental/gkd/gkd_trainer.py | 111 | CODE | |
| LOW | …xperimental/async_distillation/async_rollout_worker.py | 196 | CODE | |
| LOW | …ental/async_distillation/async_distillation_trainer.py | 1210 | CODE | |
| LOW | trl/experimental/gold/gold_trainer.py | 787 | CODE | |
| LOW | trl/experimental/async_grpo/async_grpo_trainer.py | 1044 | CODE | |
| LOW | trl/experimental/async_grpo/async_rollout_worker.py | 316 | CODE | |
| LOW | trl/experimental/tpo/tpo_trainer.py | 288 | CODE | |
| LOW | …tal/server_distillation/server_distillation_trainer.py | 142 | CODE | |
| LOW | trl/trainer/distillation_trainer.py | 98 | CODE | |
| LOW | trl/trainer/distillation_trainer.py | 312 | CODE | |
| LOW | trl/trainer/distillation_trainer.py | 1405 | CODE | |
| LOW | trl/trainer/reward_trainer.py | 336 | CODE | |
| LOW | trl/trainer/sft_trainer.py | 635 | CODE | |
| LOW | trl/trainer/callbacks.py | 648 | CODE | |
| LOW | trl/trainer/rloo_trainer.py | 239 | CODE | |
| LOW | trl/trainer/rloo_trainer.py | 960 | CODE | |
| LOW | trl/trainer/kto_trainer.py | 568 | CODE | |
| LOW | trl/trainer/grpo_trainer.py | 302 | CODE | |
| LOW | trl/trainer/grpo_trainer.py | 1380 | CODE | |
| LOW | trl/trainer/dpo_trainer.py | 514 | CODE | |
| LOW | trl/generation/vllm_generation.py | 216 | CODE | |
| LOW | trl/generation/vllm_client.py | 346 | CODE | |
| LOW | trl/generation/vllm_client.py | 480 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_grpo_trainer.py | 2161 | return ratios[len(ratios) // 2] # median, robust to per-step noise | CODE |
| MEDIUM | tests/test_grpo_trainer.py | 2161 | return ratios[len(ratios) // 2] # median, robust to per-step noise | CODE |
| LOW | tests/test_kto_trainer.py | 737 | # purposes we will just use the same checkpoint | COMMENT |
| LOW | tests/test_dpo_trainer.py | 645 | # purposes we will just just use the same checkpoint | COMMENT |
| MEDIUM | examples/grpo_harbor/harnesses/bash/__init__.py | 15 | from trl.experimental.harbor import HarborBashEnv as BashEnv # the built-in bash harness | CODE |
| MEDIUM | examples/async_grpo_harbor/launcher.py | 330 | # The pinned wheel omits harbor_env.harness; import it from the matching source checkout. | COMMENT |
| MEDIUM | trl/experimental/cpo/cpo_trainer.py | 494 | # 2. https://github.com/EleutherAI/lm-evaluation-harness/pull/531#issuecomment-1595586257 | COMMENT |
| MEDIUM | trl/experimental/harbor/_env.py | 49 | #: Extra guidance appended to the task instruction by the harness subclass. | COMMENT |
| MEDIUM | trl/experimental/harbor/_env.py | 123 | await self._setup() # harness-specific sandbox prep (e.g. start a Jupyter kernel) | CODE |
| MEDIUM | trl/experimental/harbor/_env.py | 231 | #: import path / file path resolving to one) for a custom harness. | COMMENT |
| MEDIUM | trl/experimental/orpo/orpo_trainer.py | 476 | # 2. https://github.com/EleutherAI/lm-evaluation-harness/pull/531#issuecomment-1595586257 | COMMENT |
| MEDIUM | trl/generation/vllm_client.py | 221 | # This is not strictly required for correctness, but it helps make training more robust to rare, transient | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL⚡ | trl/models/activation_offloading.py | 406 | torch.autograd.variable.Variable._execution_engine.queue_callback(wait_and_del_remaining_references) | CODE |
| CRITICAL | trl/generation/vllm_generation.py | 511 | self.llm.llm_engine.model_executor.driver_worker.model_runner.model.load_weights([(name, param)]) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | examples/grpo_harbor/harnesses/terminal_notes/env.py | 79 | f"mkfifo {pipe} 2>/dev/null; ( nohup setsid bash -c {shlex.quote(command)} <{pipe} >{log} 2>&1 ) & echo $!", | CODE |
| HIGH | examples/grpo_harbor/harnesses/jupyter/env.py | 56 | await self._env.exec("which curl >/dev/null 2>&1 || apt-get install -y curl", timeout_sec=120) | CODE |
| HIGH | examples/grpo_wordle/grpo_wordle.py | 80 | uv venv && source .venv/bin/activate | STRING |
| HIGH | trl/data_utils.py | 681 | elif not first_column_offsets.equals(column.offsets): | STRING |
| HIGH | trl/kernels/chunked_divergence.py | 241 | `beta` selects the divergence: `0.0` is the forward KL(teacher || student), `1.0` the reverse KL(student || | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | docs/source/customization.md | 128 | # In this example: the hinge loss from https://huggingface.co/papers/2309.06657 | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_data_utils.py | 658 | # chosen keeps its reasoning trace, rejected doesn't: the common prefix of the two rendered strings ends | STRING |
| MEDIUM | docs/source/openenv.md | 3 | [OpenEnv](https://github.com/huggingface/OpenEnv) is an open-source framework for defining, deploying, and interacting w | CODE |
| MEDIUM | docs/source/harbor.md | 3 | [Harbor](https://www.harborframework.com) is a framework for running agentic tasks in sandboxes. It decouples a **task** | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | trl/chat_template_utils.py | 125 | dummy_token = AddedToken(f"<extra_id_{idx}>") | CODE |
| LOW⚡ | trl/chat_template_utils.py | 126 | is_added = tokenizer.add_tokens(dummy_token) | CODE |
| LOW⚡ | trl/chat_template_utils.py | 129 | added_tokens.append(dummy_token) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_utils.py | 326 | def test_function(self): | CODE |
| LOW | tests/test_utils.py | 356 | def test_function(self): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | trl/generation/vllm_client.py | 866 | # Example usage | COMMENT |