Repository Analysis

huggingface/trl

Train transformer language models with reinforcement learning.

19.3 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of huggingface/trl, a Python project with 19,171 GitHub stars. SynthScan v2.0 examined 144,691 lines of code across 491 source files, recording 2321 pattern matches distributed across 20 syntactic categories. The overall adjusted score of 19.3 places this repository in the Moderate AI signal band.

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

19.3
Adjusted Score
19.3
Raw Score
100%
Time Factor
2026-08-28
Last Push
19.2K
Stars
Python
Language
144.7K
Lines of Code
491
Files
2.3K
Pattern Hits
2026-08-29
Scan Date
0.17
HC Hit Rate

What These Metrics Mean

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

Score History

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

Severity Breakdown

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

CRITICAL 6HIGH 79MEDIUM 175LOW 2061

Directory Score Breakdown

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

Pattern Findings

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

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

Hyper-Verbose Identifiers1107 hits · 941 pts
SeverityFileLineSnippetContext
LOWtests/test_rloo_trainer.py107 def test_reward_func_wrong_number_of_rewards(self):CODE
LOWtests/test_rloo_trainer.py132 def test_train_dataset_format(self, config_name):CODE
LOWtests/test_rloo_trainer.py207 def test_train_with_num_generations_eval(self):CODE
LOWtests/test_rloo_trainer.py231 def test_train_with_iterable_dataset(self):CODE
LOWtests/test_rloo_trainer.py266 def test_init_with_train_dataset(self, train_dataset_type):CODE
LOWtests/test_rloo_trainer.py318 def test_init_with_eval_dataset(self, eval_dataset_type):CODE
LOWtests/test_rloo_trainer.py352 def test_iterable_dataset_requires_dispatch_batches_false(self):CODE
LOWtests/test_rloo_trainer.py367 def test_iterable_dataset_forces_num_workers_zero(self):CODE
LOWtests/test_rloo_trainer.py382 def test_iterable_eval_keeps_map_style_train_workers(self):CODE
LOWtests/test_rloo_trainer.py420 def test_evaluate_with_eval_dataset(self, eval_dataset_type):CODE
LOWtests/test_rloo_trainer.py459 def test_train_multiple_iterations(self):CODE
LOWtests/test_rloo_trainer.py527 def test_train_peft_and_quantization(self):CODE
LOWtests/test_rloo_trainer.py609 def test_train_moe_peft_model(self):CODE
LOWtests/test_rloo_trainer.py657 def test_train_peft_with_gradient_checkpointing(self):CODE
LOWtests/test_rloo_trainer.py693 def test_train_different_reward_model(self):CODE
LOWtests/test_rloo_trainer.py732 def test_train_reward_func_standard(self):CODE
LOWtests/test_rloo_trainer.py766 def test_train_reward_func_conversational(self):CODE
LOWtests/test_rloo_trainer.py801 def test_train_multiple_reward_funcs(self):CODE
LOWtests/test_rloo_trainer.py839 def test_train_sync_and_async_reward_funcs(self):CODE
LOWtests/test_rloo_trainer.py888 def non_applicable_reward_func(completions, **kwargs):CODE
LOWtests/test_rloo_trainer.py924 def test_train_multiple_reward_funcs_with_weights(self):CODE
LOWtests/test_rloo_trainer.py968 def test_reward_metric_reflects_reward_weights(self):CODE
LOWtests/test_rloo_trainer.py1005 def test_train_multiple_mixed_reward_funcs(self):CODE
LOWtests/test_rloo_trainer.py1039 def test_train_reward_func_additional_column(self):CODE
LOWtests/test_rloo_trainer.py1079 def test_train_with_sync_ref_model(self):CODE
LOWtests/test_rloo_trainer.py1144 def test_train_with_pad_to_multiple_of(self):CODE
LOWtests/test_rloo_trainer.py1224 def test_train_vllm_structured_outputs(self):CODE
LOWtests/test_rloo_trainer.py1256 def test_train_with_additional_generation_kwargs(self):CODE
LOWtests/test_rloo_trainer.py1293 def test_train_vllm_with_additional_generation_kwargs(self):CODE
LOWtests/test_rloo_trainer.py1329 def test_train_with_normalized_advantages(self):CODE
LOWtests/test_rloo_trainer.py1359 def test_train_with_clipped_rewards(self):CODE
LOWtests/test_rloo_trainer.py1390 def test_train_with_mask_truncated_completions(self, mock_generate):CODE
LOWtests/test_rloo_trainer.py1439 def test_train_with_mask_truncated_completions_all_masked(self):CODE
LOWtests/test_rloo_trainer.py1477 def test_warning_raised_all_rewards_none(self, caplog):CODE
LOWtests/test_rloo_trainer.py1506 def test_train_num_generations_larger_than_batch_size(self):CODE
LOWtests/test_rloo_trainer.py1536 def test_train_multiple_dataloader_workers(self):CODE
LOWtests/test_rloo_trainer.py1577 def test_train_with_generation_kwargs(self):CODE
LOWtests/test_rloo_trainer.py1608 def test_train_with_reward_func_accessing_trainer_state(self):CODE
LOWtests/test_rloo_trainer.py1633 def test_train_reward_func_with_log_extra(self):CODE
LOWtests/test_rloo_trainer.py1659 def test_train_reward_func_with_log_metric(self):CODE
LOWtests/test_rloo_trainer.py1686 def test_prepare_input_called_with_correct_data(self):CODE
LOWtests/test_rloo_trainer.py1737 def test_train_with_chat_template_kwargs(self):CODE
LOWtests/test_rloo_trainer.py1767 def test_mismatched_reward_processing_classes_length(self):CODE
LOWtests/test_rloo_trainer.py1793 def test_correct_reward_processing_classes_list(self):CODE
LOWtests/test_rloo_trainer.py1824 def test_single_reward_model_with_single_processing_class(self):CODE
LOWtests/test_rloo_trainer.py1927 def test_train_vlm_with_pad_to_multiple_of(self):CODE
LOWtests/test_rloo_trainer.py1970 def test_train_vlm_beta_non_zero(self, model_id):CODE
LOWtests/test_rloo_trainer.py2060 def test_train_vlm_peft_and_quantization(self, model_id):CODE
LOWtests/test_rloo_trainer.py2169 def test_train_vlm_multi_image(self, model_id):CODE
LOWtests/test_rloo_trainer.py2211 def test_train_vlm_log_multimodal_false(self):CODE
LOWtests/test_utils.py185 def test_pad_to_multiple_of_side_left(self):CODE
LOWtests/test_utils.py193 def test_pad_to_multiple_of_no_extra_padding(self):CODE
LOWtests/test_utils.py203 def test_hash_module_deterministic_across_order(self):CODE
LOWtests/test_utils.py220 def test_hash_module_changes_with_value(self):CODE
LOWtests/test_utils.py228 def test_hash_module_includes_dtype(self):CODE
LOWtests/test_utils.py236 def test_hash_module_tiny_model_twice(self):CODE
LOWtests/test_utils.py242 def test_hash_module_tiny_model_change_layer(self):CODE
LOWtests/test_utils.py574 def test_drops_incomplete_batch(self):CODE
LOWtests/test_utils.py580 def test_preserves_all_columns(self):CODE
LOWtests/test_utils.py590 def test_repeats_are_independent_objects(self):CODE
1047 more matches not shown…
Over-Commented Block385 hits · 375 pts
SeverityFileLineSnippetContext
LOWpyproject.toml201 # On Python 3.14+ the same deprecation is reworded to "is not supported in Python 3.14+ and may break"COMMENT
LOWpyproject.toml221 # Upstream issue: https://github.com/triton-lang/triton/issues/10981COMMENT
LOWpyproject.toml241COMMENT
LOWtests/test_rloo_trainer.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/test_utils.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/conftest.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/test_callbacks.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/test_sft_trainer.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/testing_constants.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/test_chat_template_utils.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/test_grpo_trainer.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/test_model_utils.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/testing_utils.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/test_data_utils.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/test_examples_index.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/__init__.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/test_vllm_client_server.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/test_rich_progress_callback.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/test_activation_offloading.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/test_rewards.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/test_cli_utils.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/test_kto_trainer.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/test_dpo_trainer.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/test_distillation_trainer.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/test_cli.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/test_reward_trainer.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/experimental/_openreward_echo_env.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/experimental/test_async_distillation_trainer.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOW…xperimental/test_self_distillation_trainer_behavior.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/experimental/test_utils.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/experimental/test_a2po_trainer.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/experimental/test_gmpo_trainer.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/experimental/test_gkd_trainer.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/experimental/test_nash_md_trainer.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/experimental/test_server_distillation_trainer.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/experimental/test_minillm_trainer.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/experimental/test_tpo_trainer.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/experimental/test_gspo_token_trainer.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/experimental/test_sdft_trainer.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/experimental/__init__.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/experimental/test_sdpo_trainer.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/experimental/test_xpo_trainer.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/experimental/test_iw_opd_trainer.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/experimental/test_gold_trainer.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/experimental/test_prm_trainer.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/experimental/test_online_dpo_trainer.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/experimental/test_openreward.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/experimental/test_openreward.py201 # If a task spec ever shipped a `prompt` key, the metadata loop mustCOMMENT
LOWtests/experimental/test_async_grpo_trainer.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/experimental/test_async_grpo_trainer.py1081 # Forks add rows, hence fixed-size optimizer steps: 3x rows per conversation must take strictly moreCOMMENT
LOWtests/experimental/test_ssd_trainer.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/experimental/test_harbor.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/experimental/test_orpo_trainer.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOW…s/experimental/test_grpo_with_replay_buffer_trainer.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/experimental/test_bco_trainer.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/experimental/test_cpo_trainer.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/experimental/test_modeling_value_head.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/experimental/test_ppo_trainer.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/experimental/test_merge_model_callback.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/invariant/__init__.py1# Copyright 2020-2026 The HuggingFace Team. All rights reserved.COMMENT
325 more matches not shown…
Cross-File Repetition57 hits · 285 pts
SeverityFileLineSnippetContext
HIGHAGENTS.md0brief one-line description of what this does. args: param1 (`str`): description of required param. param2 (`int`, *optioSTRING
HIGHCLAUDE.md0brief one-line description of what this does. args: param1 (`str`): description of required param. param2 (`int`, *optioSTRING
HIGH.cursor/BUGBOT.md0brief one-line description of what this does. args: param1 (`str`): description of required param. param2 (`int`, *optioSTRING
HIGH.ai/AGENTS.md0brief one-line description of what this does. args: param1 (`str`): description of required param. param2 (`int`, *optioSTRING
HIGHtests/test_rloo_trainer.py0test that training works with additional generation kwargs.STRING
HIGHtests/test_grpo_trainer.py0test that training works with additional generation kwargs.STRING
HIGHtests/test_distillation_trainer.py0test that training works with additional generation kwargs.STRING
HIGHtests/test_grpo_trainer.py0asynchronously multiplies two integers. args: a: the first integer. b: the second integer. returns: the product of the tSTRING
HIGHtests/test_vllm_client_server.py0asynchronously multiplies two integers. args: a: the first integer. b: the second integer. returns: the product of the tSTRING
HIGHtests/test_distillation_trainer.py0asynchronously multiplies two integers. args: a: the first integer. b: the second integer. returns: the product of the tSTRING
HIGHdocs/source/grpo_trainer.md0asynchronously multiplies two integers. args: a: the first integer. b: the second integer. returns: the product of the tSTRING
HIGHdocs/source/distillation_trainer.md0asynchronously multiplies two integers. args: a: the first integer. b: the second integer. returns: the product of the tSTRING
HIGHdocs/source/openenv.md0make a guess in the wordle environment. args: guess: the guessed word, formatted as '[abcde]' returns: the feedback messSTRING
HIGHexamples/grpo_multi_env/grpo_multi_env.py0make a guess in the wordle environment. args: guess: the guessed word, formatted as '[abcde]' returns: the feedback messSTRING
HIGHexamples/grpo_wordle/grpo_wordle.py0make a guess in the wordle environment. args: guess: the guessed word, formatted as '[abcde]' returns: the feedback messSTRING
HIGHexamples/grpo_carla/carla_vlm_gemma.py0change lane to avoid obstacles. args: direction: direction to change lane, either "left" or "right". returns: the scene STRING
HIGHexamples/grpo_carla/carla_vlm.py0change lane to avoid obstacles. args: direction: direction to change lane, either "left" or "right". returns: the scene STRING
HIGHexamples/grpo_carla/grpo_carla.py0change lane to avoid obstacles. args: direction: direction to change lane, either "left" or "right". returns: the scene STRING
HIGHexamples/datasets/tldr.py0arguments for the script. args: push_to_hub (`bool`, *optional*, defaults to `false`): whether to push the dataset to thSTRING
HIGHexamples/datasets/deepmath_103k.py0arguments for the script. args: push_to_hub (`bool`, *optional*, defaults to `false`): whether to push the dataset to thSTRING
HIGHexamples/datasets/lm-human-preferences-sentiment.py0arguments for the script. args: push_to_hub (`bool`, *optional*, defaults to `false`): whether to push the dataset to thSTRING
HIGHexamples/datasets/prm800k.py0arguments for the script. args: push_to_hub (`bool`, *optional*, defaults to `false`): whether to push the dataset to thSTRING
HIGH…mples/datasets/lm-human-preferences-descriptiveness.py0arguments for the script. args: push_to_hub (`bool`, *optional*, defaults to `false`): whether to push the dataset to thSTRING
HIGHexamples/datasets/hh-rlhf-helpful-base.py0arguments for the script. args: push_to_hub (`bool`, *optional*, defaults to `false`): whether to push the dataset to thSTRING
HIGHexamples/datasets/rlaif-v.py0arguments for the script. args: push_to_hub (`bool`, *optional*, defaults to `false`): whether to push the dataset to thSTRING
HIGHexamples/datasets/math_shepherd.py0arguments for the script. args: push_to_hub (`bool`, *optional*, defaults to `false`): whether to push the dataset to thSTRING
HIGHexamples/datasets/llava_instruct_mix.py0arguments for the script. args: push_to_hub (`bool`, *optional*, defaults to `false`): whether to push the dataset to thSTRING
HIGHexamples/datasets/ultrafeedback-prompt.py0arguments for the script. args: push_to_hub (`bool`, *optional*, defaults to `false`): whether to push the dataset to thSTRING
HIGHexamples/datasets/tldr_preference.py0arguments for the script. args: push_to_hub (`bool`, *optional*, defaults to `false`): whether to push the dataset to thSTRING
HIGHscripts/generate_zen_multi_image_dataset.py0arguments for the script. args: test_size (`float`, *optional*, defaults to `0.1`): fraction of the dataset to include iSTRING
HIGHscripts/generate_harmony_dataset.py0arguments for the script. args: test_size (`float`, *optional*, defaults to `0.1`): fraction of the dataset to include iSTRING
HIGHscripts/generate_zen_image_dataset.py0arguments for the script. args: test_size (`float`, *optional*, defaults to `0.1`): fraction of the dataset to include iSTRING
HIGHscripts/generate_zen_dataset.py0arguments for the script. args: test_size (`float`, *optional*, defaults to `0.1`): fraction of the dataset to include iSTRING
HIGHscripts/generate_toolcall_dataset.py0arguments for the script. args: test_size (`float`, *optional*, defaults to `0.1`): fraction of the dataset to include iSTRING
HIGHtrl/experimental/iw_opd/iw_opd_trainer.py0trim padded batch tensors into per-sample (prompt+completion) sequences for teacher-server requests.STRING
HIGH…tal/server_distillation/server_distillation_trainer.py0trim padded batch tensors into per-sample (prompt+completion) sequences for teacher-server requests.STRING
HIGHtrl/experimental/sdpo/sdpo_trainer.py0trim padded batch tensors into per-sample (prompt+completion) sequences for teacher-server requests.STRING
HIGHtrl/experimental/sdft/sdft_trainer.py0trim padded batch tensors into per-sample (prompt+completion) sequences for teacher-server requests.STRING
HIGHtrl/experimental/iw_opd/iw_opd_trainer.py0backbone forward used by the liger jsd path (skips lm_head to save memory).STRING
HIGHtrl/experimental/gkd/gkd_trainer.py0backbone forward used by the liger jsd path (skips lm_head to save memory).STRING
HIGHtrl/experimental/gold/gold_trainer.py0backbone forward used by the liger jsd path (skips lm_head to save memory).STRING
HIGHtrl/experimental/cpo/cpo_trainer.py0compute the kto loss and other metrics for the given batch of inputs for train or test.STRING
HIGHtrl/experimental/bco/bco_trainer.py0compute the kto loss and other metrics for the given batch of inputs for train or test.STRING
HIGHtrl/experimental/orpo/orpo_trainer.py0compute the kto loss and other metrics for the given batch of inputs for train or test.STRING
HIGHtrl/trainer/kto_trainer.py0compute the kto loss and other metrics for the given batch of inputs for train or test.STRING
HIGHtrl/experimental/cpo/cpo_trainer.py0generate samples from the model and reference model for the given batch of inputs.STRING
HIGHtrl/experimental/bco/bco_trainer.py0generate samples from the model and reference model for the given batch of inputs.STRING
HIGHtrl/experimental/orpo/orpo_trainer.py0generate samples from the model and reference model for the given batch of inputs.STRING
HIGHtrl/experimental/cpo/cpo_trainer.py0overriding built-in evaluation loop to store metrics for each batch. prediction/evaluation loop, shared by `trainer.evalSTRING
HIGHtrl/experimental/bco/bco_trainer.py0overriding built-in evaluation loop to store metrics for each batch. prediction/evaluation loop, shared by `trainer.evalSTRING
HIGHtrl/experimental/orpo/orpo_trainer.py0overriding built-in evaluation loop to store metrics for each batch. prediction/evaluation loop, shared by `trainer.evalSTRING
HIGHtrl/experimental/cpo/cpo_trainer.py0log `logs` on the various objects watching training, including stored metrics. args: logs (`dict[str, float]`): the valuSTRING
HIGHtrl/experimental/bco/bco_trainer.py0log `logs` on the various objects watching training, including stored metrics. args: logs (`dict[str, float]`): the valuSTRING
HIGHtrl/experimental/orpo/orpo_trainer.py0log `logs` on the various objects watching training, including stored metrics. args: logs (`dict[str, float]`): the valuSTRING
HIGHtrl/trainer/distillation_trainer.py0tokenize prompts and extract images/multimodal fields for generation.STRING
HIGHtrl/trainer/rloo_trainer.py0tokenize prompts and extract images/multimodal fields for generation.STRING
HIGHtrl/trainer/grpo_trainer.py0tokenize prompts and extract images/multimodal fields for generation.STRING
Decorative Section Separators93 hits · 282 pts
SeverityFileLineSnippetContext
MEDIUMtests/conftest.py26# ============================================================================COMMENT
MEDIUMtests/conftest.py28# ============================================================================COMMENT
MEDIUMtests/conftest.py73# ============================================================================COMMENT
MEDIUMtests/conftest.py75# ============================================================================COMMENT
MEDIUMtests/conftest.py87# ============================================================================COMMENT
MEDIUMexamples/grpo_harbor/harnesses/terminal_notes/env.py60 # ── shell toolkit ───────────────────────────────────────────────────────COMMENT
MEDIUMexamples/grpo_harbor/harnesses/terminal_notes/env.py170 # ── note toolkit (in-env state) ──────────────────────────────────────────COMMENT
MEDIUMexamples/async_grpo_opencode/async_grpo_opencode.py95# ============================================================================================================COMMENT
MEDIUMexamples/async_grpo_opencode/async_grpo_opencode.py97# ------------------------------------------------------------------------------------------------------------COMMENT
MEDIUMexamples/async_grpo_opencode/async_grpo_opencode.py102# ============================================================================================================COMMENT
MEDIUMexamples/async_grpo_opencode/async_grpo_opencode.py260# ============================================================================================================COMMENT
MEDIUMexamples/async_grpo_opencode/async_grpo_opencode.py262# ============================================================================================================COMMENT
MEDIUMexamples/async_grpo_opencode/async_grpo_opencode.py390# ============================================================================================================COMMENT
MEDIUMexamples/async_grpo_opencode/async_grpo_opencode.py392# ============================================================================================================COMMENT
MEDIUMexamples/async_grpo_opencode/async_grpo_opencode.py487# ============================================================================================================COMMENT
MEDIUMexamples/async_grpo_opencode/async_grpo_opencode.py489# ============================================================================================================COMMENT
MEDIUMexamples/async_grpo_opencode/async_grpo_opencode.py536# ============================================================================================================COMMENT
MEDIUMexamples/async_grpo_opencode/async_grpo_opencode.py538# ============================================================================================================COMMENT
MEDIUMexamples/async_grpo_opencode/opencode_hf_sandbox.py111# ============================================================================================================COMMENT
MEDIUMexamples/async_grpo_opencode/opencode_hf_sandbox.py113# ============================================================================================================COMMENT
MEDIUMexamples/async_grpo_opencode/opencode_hf_sandbox.py241# ============================================================================================================COMMENT
MEDIUMexamples/async_grpo_opencode/opencode_hf_sandbox.py243# ============================================================================================================COMMENT
MEDIUMexamples/async_grpo_opencode/opencode_hf_sandbox.py280# ============================================================================================================COMMENT
MEDIUMexamples/async_grpo_opencode/opencode_hf_sandbox.py282# ============================================================================================================COMMENT
MEDIUMexamples/async_grpo_opencode/opencode_hf_sandbox.py330# ============================================================================================================COMMENT
MEDIUMexamples/async_grpo_opencode/opencode_hf_sandbox.py332# ============================================================================================================COMMENT
MEDIUMexamples/grpo_browsergym/browsergym_llm.py237# ---------------------------------------------------------------------------COMMENT
MEDIUMexamples/grpo_browsergym/browsergym_llm.py239# ---------------------------------------------------------------------------COMMENT
MEDIUMexamples/grpo_browsergym/browsergym_llm.py256# ---------------------------------------------------------------------------COMMENT
MEDIUMexamples/grpo_browsergym/browsergym_llm.py258# ---------------------------------------------------------------------------COMMENT
MEDIUMexamples/grpo_browsergym/browsergym_llm.py266# ---------------------------------------------------------------------------COMMENT
MEDIUMexamples/grpo_browsergym/browsergym_llm.py268# ---------------------------------------------------------------------------COMMENT
MEDIUMexamples/grpo_sudoku/grpo_sudoku.py109# ---------------------------------------------------------------------------COMMENT
MEDIUMexamples/grpo_sudoku/grpo_sudoku.py111# ---------------------------------------------------------------------------COMMENT
MEDIUMexamples/grpo_sudoku/grpo_sudoku.py191# ---------------------------------------------------------------------------COMMENT
MEDIUMexamples/grpo_sudoku/grpo_sudoku.py193# ---------------------------------------------------------------------------COMMENT
MEDIUMexamples/grpo_sudoku/grpo_sudoku.py343# ---------------------------------------------------------------------------COMMENT
MEDIUMexamples/grpo_sudoku/grpo_sudoku.py345# ---------------------------------------------------------------------------COMMENT
MEDIUMexamples/grpo_sudoku/grpo_sudoku.py373# ---------------------------------------------------------------------------COMMENT
MEDIUMexamples/grpo_sudoku/grpo_sudoku.py375# ---------------------------------------------------------------------------COMMENT
MEDIUMexamples/grpo_sql_agent/grpo_sql_agent.py184# ------------------------COMMENT
MEDIUMexamples/grpo_sql_agent/grpo_sql_agent.py186# ------------------------COMMENT
MEDIUMexamples/grpo_sql_agent/grpo_sql_agent.py231# ------------------------COMMENT
MEDIUMexamples/grpo_sql_agent/grpo_sql_agent.py233# ------------------------COMMENT
MEDIUMexamples/grpo_sql_agent/grpo_sql_agent.py260# ------------------------STRING
MEDIUMexamples/grpo_sql_agent/grpo_sql_agent.py262# ------------------------STRING
MEDIUMexamples/grpo_sql_agent/grpo_sql_agent.py267 # ------------------------STRING
MEDIUMexamples/grpo_sql_agent/grpo_sql_agent.py269 # ------------------------STRING
MEDIUMexamples/grpo_sql_agent/grpo_sql_agent.py284 # ------------------------STRING
MEDIUMexamples/grpo_sql_agent/grpo_sql_agent.py286 # ------------------------STRING
MEDIUMexamples/grpo_sql_agent/grpo_sql_agent.py298 # ------------------------STRING
MEDIUMexamples/grpo_sql_agent/grpo_sql_agent.py300 # ------------------------STRING
MEDIUMexamples/grpo_sql_agent/grpo_sql_agent.py310 # ------------------------STRING
MEDIUMexamples/grpo_sql_agent/grpo_sql_agent.py312 # ------------------------STRING
MEDIUMexamples/grpo_sql_agent/grpo_sql_agent.py315 # ------------------------STRING
MEDIUMexamples/grpo_sql_agent/grpo_sql_agent.py317 # ------------------------STRING
MEDIUMexamples/gold_qwen3_vl/gold_qwen3_vl.py110 # ──────────────────────────────────────────────COMMENT
MEDIUMexamples/gold_qwen3_vl/gold_qwen3_vl.py112 # ──────────────────────────────────────────────COMMENT
MEDIUMexamples/gold_qwen3_vl/gold_qwen3_vl.py130 # ──────────────────────────────────────────────COMMENT
MEDIUMexamples/gold_qwen3_vl/gold_qwen3_vl.py132 # ──────────────────────────────────────────────COMMENT
33 more matches not shown…
Unused Imports195 hits · 178 pts
SeverityFileLineSnippetContext
LOWexamples/grpo_harbor/harnesses/__init__.py15CODE
LOWexamples/grpo_harbor/harnesses/__init__.py16CODE
LOWexamples/grpo_harbor/harnesses/__init__.py17CODE
LOWexamples/grpo_harbor/harnesses/bash/__init__.py15CODE
LOW…mples/grpo_harbor/harnesses/terminal_notes/__init__.py15CODE
LOWexamples/grpo_harbor/harnesses/jupyter/kernel_server.py29CODE
LOWexamples/grpo_harbor/harnesses/jupyter/__init__.py15CODE
LOWexamples/grpo_harbor/harnesses/jupyter/run_cell.py25CODE
LOWexamples/async_grpo_opencode/async_grpo_opencode.py59CODE
LOWexamples/async_grpo_opencode/opencode_hf_sandbox.py78CODE
LOWexamples/grpo_browsergym/grpo_browsergym.py53CODE
LOWexamples/grpo_browsergym/browsergym_llm.py67CODE
LOWexamples/grpo_sudoku/grpo_sudoku.py87CODE
LOWexamples/ssd_codegen/ssd_eval.py59CODE
LOWtrl/__init__.py19CODE
LOWtrl/__init__.py78CODE
LOWtrl/__init__.py78CODE
LOWtrl/__init__.py78CODE
LOWtrl/__init__.py78CODE
LOWtrl/__init__.py84CODE
LOWtrl/__init__.py84CODE
LOWtrl/__init__.py84CODE
LOWtrl/__init__.py84CODE
LOWtrl/__init__.py84CODE
LOWtrl/__init__.py84CODE
LOWtrl/__init__.py84CODE
LOWtrl/__init__.py84CODE
LOWtrl/__init__.py84CODE
LOWtrl/__init__.py84CODE
LOWtrl/__init__.py84CODE
LOWtrl/__init__.py84CODE
LOWtrl/__init__.py98CODE
LOWtrl/__init__.py99CODE
LOWtrl/__init__.py99CODE
LOWtrl/__init__.py99CODE
LOWtrl/__init__.py99CODE
LOWtrl/__init__.py99CODE
LOWtrl/__init__.py100CODE
LOWtrl/__init__.py100CODE
LOWtrl/__init__.py100CODE
LOWtrl/__init__.py100CODE
LOWtrl/__init__.py100CODE
LOWtrl/__init__.py100CODE
LOWtrl/__init__.py100CODE
LOWtrl/__init__.py100CODE
LOWtrl/__init__.py100CODE
LOWtrl/__init__.py100CODE
LOWtrl/__init__.py100CODE
LOWtrl/__init__.py100CODE
LOWtrl/__init__.py100CODE
LOWtrl/__init__.py100CODE
LOWtrl/__init__.py100CODE
LOWtrl/__init__.py100CODE
LOWtrl/__init__.py100CODE
LOWtrl/__init__.py100CODE
LOWtrl/__init__.py100CODE
LOWtrl/__init__.py100CODE
LOWtrl/__init__.py100CODE
LOWtrl/__init__.py100CODE
LOWtrl/experimental/utils.py55CODE
135 more matches not shown…
Deep Nesting160 hits · 146 pts
SeverityFileLineSnippetContext
LOWtests/test_utils.py949CODE
LOWtests/test_utils.py980CODE
LOWtests/test_grpo_trainer.py4806CODE
LOWtests/test_grpo_trainer.py4953CODE
LOWtests/test_kto_trainer.py1026CODE
LOWtests/test_dpo_trainer.py1033CODE
LOWtests/test_distillation_trainer.py850CODE
LOWexamples/grpo_catch/grpo_catch.py209CODE
LOWexamples/datasets/math_shepherd.py52CODE
LOW…les/sdft_privileged_context/sdft_privileged_context.py119CODE
LOWexamples/sdpo_math/sdpo_math.py162CODE
LOWexamples/grpo_multi_env/grpo_multi_env.py127CODE
LOWexamples/sft_gemma3_vision/sft_gemma3_vision.py77CODE
LOWexamples/sft_gemma3_vision/sft_gemma3_vision.py96CODE
LOWexamples/grpo_sudoku/grpo_sudoku.py212CODE
LOWexamples/grpo_sudoku/grpo_sudoku.py294CODE
LOWexamples/grpo_sudoku/grpo_sudoku.py378CODE
LOWexamples/grpo_sudoku/grpo_sudoku.py545CODE
LOWexamples/grpo_sql_agent/grpo_sql_agent.py50CODE
LOWexamples/grpo_sql_agent/grpo_sql_agent.py145CODE
LOWscripts/log_reports.py27CODE
LOWscripts/generate_tiny_models/_common.py256CODE
LOWtrl/chat_template_utils.py656CODE
LOWtrl/data_utils.py33CODE
LOWtrl/data_utils.py127CODE
LOWtrl/data_utils.py975CODE
LOWtrl/_compat.py86CODE
LOWtrl/import_utils.py29CODE
LOWtrl/experimental/merge_model_callback.py82CODE
LOWtrl/experimental/merge_model_callback.py260CODE
LOWtrl/experimental/utils.py191CODE
LOWtrl/experimental/utils.py934CODE
LOWtrl/experimental/utils.py954CODE
LOWtrl/experimental/utils.py73CODE
LOWtrl/experimental/utils.py470CODE
LOWtrl/experimental/utils.py487CODE
LOWtrl/experimental/iw_opd/iw_opd_trainer.py233CODE
LOWtrl/experimental/iw_opd/iw_opd_trainer.py393CODE
LOWtrl/experimental/iw_opd/iw_opd_trainer.py714CODE
LOWtrl/experimental/iw_opd/iw_opd_trainer.py866CODE
LOWtrl/experimental/iw_opd/iw_opd_trainer.py908CODE
LOWtrl/experimental/iw_opd/iw_opd_trainer.py965CODE
LOWtrl/experimental/iw_opd/iw_opd_trainer.py1130CODE
LOWtrl/experimental/iw_opd/iw_opd_trainer.py1830CODE
LOWtrl/experimental/sdpo/sdpo_trainer.py177CODE
LOWtrl/experimental/sdpo/sdpo_trainer.py353CODE
LOWtrl/experimental/sdpo/sdpo_trainer.py1174CODE
LOWtrl/experimental/cpo/cpo_trainer.py138CODE
LOWtrl/experimental/cpo/cpo_trainer.py480CODE
LOWtrl/experimental/cpo/cpo_trainer.py613CODE
LOWtrl/experimental/cpo/cpo_trainer.py677CODE
LOWtrl/experimental/bco/bco_trainer.py425CODE
LOWtrl/experimental/bco/bco_trainer.py1084CODE
LOWtrl/experimental/bco/bco_trainer.py1287CODE
LOWtrl/experimental/bco/bco_trainer.py1416CODE
LOWtrl/experimental/harbor/_spec.py65CODE
LOWtrl/experimental/orpo/orpo_trainer.py148CODE
LOWtrl/experimental/orpo/orpo_trainer.py466CODE
LOWtrl/experimental/orpo/orpo_trainer.py609CODE
LOWtrl/experimental/online_dpo/online_dpo_trainer.py177CODE
100 more matches not shown…
Self-Referential Comments51 hits · 142 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_rloo_trainer.py1777 # Create a single processing class (tokenizer)COMMENT
MEDIUMtests/test_rloo_trainer.py1831 # Create a single processing class (tokenizer)COMMENT
MEDIUMtests/test_grpo_trainer.py93 # Create a mock trainer with minimal setupCOMMENT
MEDIUMtests/test_grpo_trainer.py96 # Create a mock acceleratorCOMMENT
MEDIUMtests/test_grpo_trainer.py100 # Create a minimal trainer instance just to access the methodCOMMENT
MEDIUMtests/test_grpo_trainer.py3864 # Create a single processing class (tokenizer)COMMENT
MEDIUMtests/test_grpo_trainer.py3918 # Create a single processing class (tokenizer)COMMENT
MEDIUMtests/test_grpo_trainer.py4833 # Create a VLM processorCOMMENT
MEDIUMtests/test_cli_utils.py202 # Create the main parserCOMMENT
MEDIUMtests/test_cli_utils.py208 # Create a subparser for a specific commandCOMMENT
MEDIUMtests/test_cli_utils.py228 # Create the main parserCOMMENT
MEDIUMtests/test_cli_utils.py234 # Create a subparser for a specific commandCOMMENT
MEDIUMtests/test_cli_utils.py251 # Create the main parserCOMMENT
MEDIUMtests/test_cli_utils.py257 # Create a subparser for a specific commandCOMMENT
MEDIUMtests/test_cli_utils.py273 # Create the main parserCOMMENT
MEDIUMtests/test_cli_utils.py279 # Create a subparser for a specific commandCOMMENT
MEDIUMtests/test_cli.py108 # Create a temporary config fileCOMMENT
MEDIUMtests/experimental/test_prm_trainer.py126 # Define the input featuresCOMMENT
MEDIUMtests/experimental/test_prm_trainer.py150 # Define the input featuresCOMMENT
MEDIUMtests/experimental/test_prm_trainer.py173 # Define the input featuresCOMMENT
MEDIUMtests/experimental/test_prm_trainer.py197 # Define the input featuresCOMMENT
MEDIUMtests/experimental/test_prm_trainer.py221 # Define the input featuresCOMMENT
MEDIUMscripts/generate_zen_multi_image_dataset.py76 # Create the imagesSTRING
MEDIUMscripts/generate_zen_multi_image_dataset.py106 # Create the imagesSTRING
MEDIUMscripts/generate_zen_multi_image_dataset.py157 # Create the imagesSTRING
MEDIUMscripts/generate_zen_multi_image_dataset.py229 # Create the imagesSTRING
MEDIUMscripts/generate_zen_multi_image_dataset.py260 # Create the imagesSTRING
MEDIUMtrl/data_utils.py794 # Create a new binCOMMENT
MEDIUMtrl/experimental/merge_model_callback.py37 # Create the repository if it doesn't existCOMMENT
MEDIUMtrl/experimental/merge_model_callback.py118 # Create the merge configuration dictionarySTRING
MEDIUMtrl/experimental/merge_model_callback.py128 # Create the MergeConfiguration from the dictionarySTRING
MEDIUMtrl/experimental/merge_model_callback.py137 # Create the TIES merge configuration dictionarySTRING
MEDIUMtrl/experimental/merge_model_callback.py172 # Create the MergeConfiguration from the dictionarySTRING
MEDIUMtrl/experimental/merge_model_callback.py181 # Create the DARE TIES merge configuration dictionarySTRING
MEDIUMtrl/experimental/merge_model_callback.py216 # Create the MergeConfiguration from the dictionarySTRING
MEDIUMtrl/experimental/merge_model_callback.py226 # Create the SLERP merge configuration dictionarySTRING
MEDIUMtrl/experimental/merge_model_callback.py255 # Create the MergeConfiguration from the dictionarySTRING
MEDIUMtrl/experimental/utils.py15# This file contains utility classes and functions that are used across more than one experimental trainer or feature.COMMENT
MEDIUMtrl/experimental/cpo/cpo_trainer.py184 # Initialize this variable to False. This helps tracking the case when `peft_module_casting_to_bf16`COMMENT
MEDIUMtrl/experimental/bco/bco_trainer.py493 # Initialize this variable to False. This helps tracking the case when `peft_module_casting_to_bf16`COMMENT
MEDIUMtrl/experimental/orpo/orpo_trainer.py194 # Initialize this variable to False. This helps tracking the case when `peft_module_casting_to_bf16`COMMENT
MEDIUMtrl/experimental/online_dpo/online_dpo_trainer.py394 # Define the collator if not providedCOMMENT
MEDIUMtrl/experimental/online_dpo/online_dpo_trainer.py906 # Create the output dict with required fieldsCOMMENT
MEDIUMtrl/experimental/prm/prm_trainer.py339 # Create the labelSTRING
MEDIUMtrl/experimental/ppo/ppo_trainer.py386 # Define the collator if not providedCOMMENT
MEDIUMtrl/trainer/utils.py164 # Create an output tensor filled with the padding valueCOMMENT
MEDIUMtrl/trainer/utils.py175 # Define the slicesCOMMENT
MEDIUMtrl/trainer/utils.py1104# This function is intentionally not used internally. It is provided as a utility for users whose datasets containCOMMENT
MEDIUMtrl/trainer/utils.py764 self.generator = torch.Generator() # Create a local random generatorCODE
MEDIUMtrl/trainer/callbacks.py220 # Create a table per groupCOMMENT
MEDIUMtrl/trainer/callbacks.py697 # Create a new instance and load state_dictSTRING
Excessive Try-Catch Wrapping74 hits · 80 pts
SeverityFileLineSnippetContext
LOWtests/test_sft_trainer.py2497 except Exception:CODE
LOWtests/test_grpo_trainer.py4920 except Exception as e:CODE
LOWtests/test_grpo_trainer.py4987 except Exception as e:CODE
MEDIUMtests/test_rewards.py229def target():CODE
LOWtests/test_rewards.py232 except Exception as e:CODE
LOWtests/test_distillation_trainer.py890 except Exception as e:CODE
MEDIUMtests/experimental/test_gold_trainer.py43def openr1_examples():CODE
MEDIUMtests/experimental/test_gold_trainer.py56def countdown_examples():CODE
MEDIUMtests/experimental/test_gold_trainer.py306def vlm_dataset():CODE
LOWtests/experimental/test_gold_trainer.py50 except Exception as exc: # pragma: no cover - network/environment dependentCODE
LOWtests/experimental/test_gold_trainer.py63 except Exception as exc: # pragma: no cover - network/environment dependentCODE
LOWtests/experimental/test_gold_trainer.py313 except Exception as exc: # pragma: no cover - network/environment dependentCODE
LOWtests/experimental/test_gold_trainer.py3371 except Exception as exc: # pragma: no cover - network/environment dependentCODE
LOWtests/experimental/test_gold_trainer.py3427 except Exception as exc: # pragma: no cover - network/environment dependentCODE
LOWtests/experimental/test_gold_trainer.py3478 except Exception as exc: # pragma: no cover - network/environment dependentCODE
LOWtests/experimental/test_gold_trainer.py3528 except Exception as exc: # pragma: no cover - network/environment dependentCODE
LOWtests/experimental/test_online_dpo_trainer.py257 except Exception:CODE
LOWdocs/source/openenv.md406 except Exception:CODE
LOWdocs/source/openenv.md417 except Exception:CODE
LOWexamples/grpo_catch/grpo_catch.py166 except Exception as e:CODE
LOWexamples/grpo_carla/carla_vlm_gemma.py165 except Exception as e:CODE
LOWexamples/grpo_harbor/harnesses/jupyter/kernel_server.py70 except Exception:CODE
MEDIUMexamples/grpo_harbor/harnesses/jupyter/kernel_server.py63def do_POST(self):CODE
LOWexamples/grpo_harbor/harnesses/jupyter/run_cell.py55 except Exception as exc:CODE
LOW…les/sdft_privileged_context/sdft_privileged_context.py199 except Exception:CODE
LOWexamples/async_grpo_opencode/async_grpo_opencode.py215 except Exception:CODE
LOWexamples/async_grpo_opencode/async_grpo_opencode.py332 except Exception:CODE
LOWexamples/async_grpo_opencode/async_grpo_opencode.py458 except Exception:CODE
LOWexamples/async_grpo_opencode/opencode_hf_sandbox.py183 except Exception:CODE
LOWexamples/grpo_multi_env/grpo_multi_env.py136 except Exception:CODE
LOWexamples/grpo_multi_env/grpo_multi_env.py147 except Exception:CODE
LOWexamples/sft_gemma3_vision/sft_gemma3_vision.py106 except Exception as e:CODE
MEDIUMexamples/sft_gemma3_vision/sft_gemma3_vision.py107 print(f"Error processing image {img_path}: {e}")CODE
LOWscripts/log_reports.py50 except Exception as e:CODE
MEDIUMscripts/add_copyrights.py48 print(f"Error fetching tracked files: {e}")CODE
LOWtrl/_lazy_module.py72 except Exception as e:CODE
LOWtrl/_compat.py45 except Exception as e:CODE
LOWtrl/_compat.py69 except Exception as e:CODE
LOWtrl/_compat.py126 except Exception as e:CODE
LOWtrl/_compat.py155 except Exception as e:CODE
LOWtrl/experimental/harbor/_spec.py103 except Exception: # noqa: BLE001CODE
LOWtrl/experimental/harbor/_env.py194 except Exception: # noqa: BLE001 — best-effort teardownCODE
MEDIUMtrl/experimental/harbor/_env.py191def __del__(self):CODE
LOWtrl/experimental/openreward/_spec.py175 except Exception: # noqa: BLE001CODE
LOWtrl/experimental/openreward/_spec.py282 except Exception as e: # noqa: BLE001CODE
LOWtrl/experimental/openreward/_spec.py312 except Exception as e: # noqa: BLE001CODE
LOWtrl/experimental/openreward/environment.py261 except Exception as e: # noqa: BLE001CODE
LOWtrl/experimental/openreward/environment.py273 except Exception as e: # noqa: BLE001CODE
LOWtrl/experimental/async_distillation/weight_transfer.py105 except Exception as exc:CODE
LOWtrl/experimental/async_distillation/weight_transfer.py139 except Exception as exc:CODE
LOW…xperimental/async_distillation/async_rollout_worker.py145 except Exception:CODE
LOW…xperimental/async_distillation/async_rollout_worker.py282 except Exception:CODE
LOW…ental/async_distillation/async_distillation_trainer.py564 except Exception as e: # noqa: BLE001CODE
LOWtrl/experimental/async_grpo/async_grpo_trainer.py283 except Exception as e: # noqa: BLE001CODE
LOWtrl/experimental/async_grpo/openenv_harness.py171 except Exception:CODE
LOWtrl/experimental/async_grpo/openenv_harness.py202 except Exception:CODE
LOWtrl/experimental/async_grpo/openenv_harness.py260 except Exception:CODE
LOWtrl/experimental/async_grpo/openenv_harness.py267 except Exception:CODE
MEDIUMtrl/experimental/async_grpo/openenv_harness.py168def _close(session):CODE
LOWtrl/experimental/async_grpo/weight_transfer.py113 except Exception as exc:CODE
14 more matches not shown…
Docstring Block Structure14 hits · 70 pts
SeverityFileLineSnippetContext
HIGHCONTRIBUTING.md268 Replicate a string `n` times with a separator. Args: string (`str`): String to replicate. STRING
HIGHAGENTS.md71 Brief one-line description of what this does. Args: param1 (`str`): Description of requireSTRING
HIGHCLAUDE.md71 Brief one-line description of what this does. Args: param1 (`str`): Description of requireSTRING
HIGH.cursor/BUGBOT.md71 Brief one-line description of what this does. Args: param1 (`str`): Description of requireSTRING
HIGHtrl/chat_template_utils.py657 Adds the appropriate response template (or legacy schema) to the given tokenizer based on its chat template. ASTRING
HIGHtrl/data_utils.py35 Convert messages into a structured multimodal format and inject the provided images into the message contents. STRING
HIGHtrl/data_utils.py161 Check if the example is in a conversational format. Args: example (`dict[str, Any]`): A siSTRING
HIGHtrl/data_utils.py343 If the example is in a conversational format, apply a chat template to it. Args: example (`dict[str, lSTRING
HIGHtrl/data_utils.py558 Extracts the shared prompt from a preference data example, where the prompt is implicit within both the chosen and STRING
HIGHtrl/data_utils.py936 Check if the example is in a conversational format (from/value). Note that this format isn't recommended. Prefer STRING
HIGHtrl/experimental/gold/gold_trainer.py554 Merge probabilities based on alignment groups, using either the "observed" or "bayesian" strategy (`selSTRING
HIGHtrl/scripts/vllm_serve.py194 Build the `vllm serve` command line that serves `script_args` the way TRL trainers expect. Beyond the plain arSTRING
HIGHtrl/trainer/utils.py123 Pads a list of tensors to the same shape along the first dimension. Args: tensors (`list[torch.Tensor]STRING
HIGH.ai/AGENTS.md71 Brief one-line description of what this does. Args: param1 (`str`): Description of requireSTRING
Redundant / Tautological Comments49 hits · 62 pts
SeverityFileLineSnippetContext
LOWtests/test_chat_template_utils.py47 # Check if special tokens are correctly setCOMMENT
LOWtests/test_chat_template_utils.py114 # Check if special tokens are correctly setCOMMENT
LOWtests/test_grpo_trainer.py4900 # Check if signature columns were set properlyCOMMENT
LOWtests/experimental/test_gkd_trainer.py54 # Set temperature to 0 for deterministic outputCOMMENT
LOWtests/experimental/test_gkd_trainer.py71 # Check if the generated texts start with the original promptsCOMMENT
LOWtests/experimental/test_gkd_trainer.py82 # Check if the two generations are identicalCOMMENT
LOWtests/experimental/test_online_dpo_trainer.py286 # Check if training loss is availableCOMMENT
LOW…s/experimental/test_grpo_with_replay_buffer_trainer.py45 # Check if the buffer contains the correct number of elementsCOMMENT
LOW…s/experimental/test_grpo_with_replay_buffer_trainer.py48 # Check if the buffer maintains the min-heap propertyCOMMENT
LOW…s/experimental/test_grpo_with_replay_buffer_trainer.py67 # Check if the buffer contains the correct number of elementsCOMMENT
LOW…s/experimental/test_grpo_with_replay_buffer_trainer.py70 # Check if the buffer maintains the min-heap propertyCOMMENT
LOW…s/experimental/test_grpo_with_replay_buffer_trainer.py90 # Check if the sampled elements are from the bufferCOMMENT
LOWtests/experimental/test_ppo_trainer.py750 # Check if critic weights have been updatedCOMMENT
LOWtests/experimental/test_ppo_trainer.py757 # Check if policy weights have been updatedCOMMENT
LOWtests/experimental/test_ppo_trainer.py812 # Check if critic weights have been updatedCOMMENT
LOWtests/experimental/test_ppo_trainer.py819 # Check if policy weights have been updated - for PEFT we check the LoRA weightsCOMMENT
LOWtests/experimental/test_ppo_trainer.py191 # Check if the weights are the sameSTRING
LOWtests/experimental/test_ppo_trainer.py206 # Check if the weights are the sameSTRING
LOWtests/experimental/test_ppo_trainer.py224 # Check if the weights are the sameSTRING
LOWtests/experimental/test_ppo_trainer.py245 # Check if the weights are the sameSTRING
LOWtests/experimental/test_ppo_trainer.py251 # Check if the trl model has the same keys as the transformers modelSTRING
LOWtests/experimental/test_ppo_trainer.py290 # Check if the outputs are of the right size - hereSTRING
LOWtests/experimental/test_ppo_trainer.py303 # Check if v head of the model has the same dropout as the configSTRING
LOWtests/experimental/test_ppo_trainer.py315 # Check if v head of the model has the same dropout as the configSTRING
LOWtests/experimental/test_ppo_trainer.py320 # Check if v head of the model has the same dropout as the configSTRING
LOWtests/experimental/test_ppo_trainer.py405 # Check if the outputs are of the right size - hereSTRING
LOWtests/experimental/test_ppo_trainer.py418 # Check if v head of the model has the same dropout as the configSTRING
LOWtests/experimental/test_ppo_trainer.py430 # Check if v head of the model has the same dropout as the configSTRING
LOWtests/experimental/test_ppo_trainer.py435 # Check if v head of the model has the same dropout as the configSTRING
LOWscripts/add_copyrights.py61 # Check if the exact copyright header existsCOMMENT
LOW.github/workflows/tests.yml95 if: github.ref == 'refs/heads/main' && always() # Check if the branch is mainCODE
LOW.github/workflows/tests.yml150 if: github.ref == 'refs/heads/main' && always() # Check if the branch is mainCODE
LOW.github/workflows/tests.yml200 if: github.ref == 'refs/heads/main' && always() # Check if the branch is mainCODE
LOW.github/workflows/tests.yml254 if: github.ref == 'refs/heads/main' && always() # Check if the branch is mainCODE
LOW.github/workflows/tests.yml306 if: github.ref == 'refs/heads/main' && always() # Check if the branch is mainCODE
LOWtrl/experimental/utils.py881 # Check if model is sharded (FSDP/DS-Zero3)COMMENT
LOWtrl/experimental/tpo/tpo_trainer.py591 # Check if the tokenized prompt starts with the tokenized prompt+completionCOMMENT
LOWtrl/models/activation_offloading.py235 # Check if tensor is on CPU (skip offloading)COMMENT
LOWtrl/models/activation_offloading.py240 # Check if tensor is too smallCOMMENT
LOWtrl/models/activation_offloading.py245 # Check if tensor is a parameter or bufferCOMMENT
LOWtrl/models/activation_offloading.py252 # Check if tensor is an FP8 tensor (TorchAO) - skip offloading as they're already compressedCOMMENT
LOWtrl/models/activation_offloading.py258 # Check if tensor storage is a model parameter (for FSDP compatibility)COMMENT
LOWtrl/models/activation_offloading.py301 # Check if tensor has broadcast dimensions (stride == 0)COMMENT
LOWtrl/models/activation_offloading.py511 # Check if tensor still exists (might have been cleaned up by a previous node)COMMENT
LOWtrl/models/utils.py283 # Check if the model is already a FSDP model due to `Manual Wrapping` and if so, don't wrap it againCOMMENT
LOWtrl/trainer/sft_trainer.py1542 # Check if the tokenized prompt starts with the tokenized prompt+completionCOMMENT
LOWtrl/trainer/dpo_trainer.py1074 # Check if the tokenized prompt starts with the tokenized prompt+completionCOMMENT
LOWtrl/generation/vllm_client.py275 # Check if the total timeout duration has passedCOMMENT
LOWtrl/extras/profiling.py208 # Check if self is a Trainer-like object with required attributesCOMMENT
AI Slop Vocabulary18 hits · 51 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_grpo_trainer.py2118 return ratios[len(ratios) // 2] # median, robust to per-step noiseCODE
MEDIUMtests/test_grpo_trainer.py2118 return ratios[len(ratios) // 2] # median, robust to per-step noiseCODE
LOWtests/test_kto_trainer.py699 # purposes we will just use the same checkpointCOMMENT
LOWtests/test_dpo_trainer.py617 # purposes we will just just use the same checkpointCOMMENT
MEDIUMexamples/grpo_harbor/harnesses/bash/__init__.py15from trl.experimental.harbor import HarborBashEnv as BashEnv # the built-in bash harnessCODE
MEDIUMexamples/async_grpo_opencode/async_grpo_opencode.py98# OpenEnv's opencode harness only ships an E2B (cloud) backend, and a cloud sandbox can't reach a local vLLM.COMMENT
MEDIUMexamples/async_grpo_opencode/async_grpo_opencode.py100# harness bakes the prefix `/home/user` into several paths, so each sandbox REMAPS that prefix to its own dir andCOMMENT
MEDIUMexamples/async_grpo_opencode/async_grpo_opencode.py592 reward_funcs=[], # reward comes from the harness verifier via rollout_reward_fn, not reward_funcsCODE
MEDIUMexamples/async_grpo_opencode/opencode_hf_sandbox.py104# harness path (`workdir`, `.opencode/bin`, `proxy/`) hang off `/root`. This is the only path difference from theCOMMENT
MEDIUMexamples/async_grpo_opencode/opencode_hf_sandbox.py401 reward_funcs=[], # reward comes from the harness verifier via rollout_reward_fn, not reward_funcsCODE
MEDIUMtrl/experimental/cpo/cpo_trainer.py498 # 2. https://github.com/EleutherAI/lm-evaluation-harness/pull/531#issuecomment-1595586257COMMENT
MEDIUMtrl/experimental/bco/bco_trainer.py270 # 2. https://github.com/EleutherAI/lm-evaluation-harness/pull/531#issuecomment-1595586257COMMENT
MEDIUMtrl/experimental/harbor/_env.py49 #: Extra guidance appended to the task instruction by the harness subclass.COMMENT
MEDIUMtrl/experimental/harbor/_env.py122 await self._setup() # harness-specific sandbox prep (e.g. start a Jupyter kernel)CODE
MEDIUMtrl/experimental/harbor/_env.py230#: import path / file path resolving to one) for a custom harness.COMMENT
MEDIUMtrl/experimental/orpo/orpo_trainer.py484 # 2. https://github.com/EleutherAI/lm-evaluation-harness/pull/531#issuecomment-1595586257COMMENT
MEDIUMtrl/experimental/async_grpo/openenv_harness.py155 # OpenEnv's harness layer is synchronous, so run the whole session on the pool.COMMENT
MEDIUMtrl/generation/vllm_client.py212 # This is not strictly required for correctness, but it helps make training more robust to rare, transientCOMMENT
Modern Structural Boilerplate48 hits · 48 pts
SeverityFileLineSnippetContext
LOWexamples/gold_chatbot_arena/gold_chatbot_arena.py70logger = logging.getLogger(__name__)CODE
LOWexamples/grpo_harbor/harnesses/__init__.py20__all__ = ["BashEnv", "JupyterEnv", "TerminalNotesEnv"]CODE
LOWexamples/grpo_harbor/harnesses/bash/__init__.py18__all__ = ["BashEnv"]CODE
LOW…mples/grpo_harbor/harnesses/terminal_notes/__init__.py18__all__ = ["TerminalNotesEnv"]CODE
LOWexamples/grpo_harbor/harnesses/jupyter/env.py52 async def _setup(self) -> None:CODE
LOWexamples/grpo_harbor/harnesses/jupyter/__init__.py18__all__ = ["JupyterEnv"]CODE
LOWtrl/experimental/merge_model_callback.py32logger = logging.getLogger(__name__)CODE
LOWtrl/experimental/iw_opd/__init__.py19__all__ = ["IWOPDConfig", "IWOPDTrainer"]CODE
LOWtrl/experimental/ssd/__init__.py19__all__ = ["SSDConfig", "SSDTrainer"]CODE
LOWtrl/experimental/sdpo/__init__.py19__all__ = ["SDPOConfig", "SDPOTrainer"]CODE
LOWtrl/experimental/sdpo/teacher_sync.py29logger = logging.getLogger(__name__)CODE
LOWtrl/experimental/sdpo/sdpo_trainer.py700 def _setup_teacher_model(self) -> None:CODE
LOWtrl/experimental/cpo/__init__.py19__all__ = ["CPOConfig", "CPOTrainer"]CODE
LOWtrl/experimental/harbor/__init__.py32__all__ = ["AGENTS", "HarborBashEnv", "HarborEnv", "HarborSpec"]CODE
LOWtrl/experimental/harbor/_env.py155 async def _setup(self) -> None:CODE
LOWtrl/experimental/orpo/__init__.py19__all__ = ["ORPOConfig", "ORPOTrainer"]CODE
LOWtrl/experimental/online_dpo/__init__.py19__all__ = ["OnlineDPOConfig", "OnlineDPOTrainer"]CODE
LOWtrl/experimental/bema_for_ref_model/callback.py25logger = logging.getLogger(__name__)CODE
LOWtrl/experimental/xpo/__init__.py19__all__ = ["XPOConfig", "XPOTrainer"]CODE
LOWtrl/experimental/sdft/__init__.py19__all__ = ["SDFTConfig", "SDFTTrainer"]CODE
LOWtrl/experimental/sdft/teacher_sync.py29logger = logging.getLogger(__name__)CODE
LOWtrl/experimental/sdft/sdft_trainer.py488 def _setup_teacher_model(self) -> None:CODE
LOWtrl/experimental/distillation/__init__.py22__all__ = ["DistillationConfig", "DistillationTrainer"]CODE
LOWtrl/experimental/openreward/__init__.py18__all__ = ["OpenRewardSpec"]CODE
LOWtrl/experimental/openreward/_spec.py51logger = logging.getLogger(__name__)CODE
LOWtrl/experimental/openreward/environment.py32logger = logging.getLogger(__name__)CODE
LOWtrl/experimental/gkd/__init__.py19__all__ = ["GKDConfig", "GKDTrainer"]CODE
LOW…xperimental/async_distillation/async_rollout_worker.py670 def update_model_version(self, model_version: int) -> None:CODE
LOWtrl/experimental/async_distillation/vllm_client.py106 def update_weights(self, update_info: dict, timeout: int = 1800) -> None:CODE
LOW…ental/async_distillation/async_distillation_trainer.py446 def update_model_version(self, model_version: int) -> None: ...CODE
LOWtrl/experimental/gold/__init__.py19__all__ = ["GOLDConfig", "GOLDTrainer"]CODE
LOWtrl/experimental/prm/__init__.py19__all__ = ["PRMConfig", "PRMTrainer"]CODE
LOWtrl/experimental/async_grpo/async_grpo_trainer.py135 def update_model_version(self, model_version: int) -> None:CODE
LOWtrl/experimental/async_grpo/async_rollout_worker.py1146 def update_model_version(self, model_version: int) -> None:CODE
LOWtrl/experimental/async_grpo/vllm_client.py118 def update_weights(self, update_info: dict, timeout: int = 1800) -> None:CODE
LOWtrl/experimental/nash_md/__init__.py19__all__ = ["NashMDConfig", "NashMDTrainer"]CODE
LOWtrl/experimental/ppo/__init__.py24__all__ = [CODE
LOWtrl/experimental/minillm/__init__.py19__all__ = ["MiniLLMConfig", "MiniLLMTrainer"]CODE
LOWtrl/experimental/tpo/__init__.py19__all__ = ["TPOConfig", "TPOTrainer"]CODE
LOWtrl/experimental/kto/__init__.py22__all__ = ["KTOConfig", "KTOTrainer"]CODE
LOWtrl/experimental/server_distillation/__init__.py19__all__ = ["ServerDistillationConfig", "ServerDistillationTrainer", "build_teacher_request_inputs"]CODE
LOWtrl/cli/__init__.py18__all__ = ["main"]CODE
LOWtrl/cli/commands/__init__.py36__all__ = ["Command", "get_commands"]CODE
LOWtrl/scripts/utils.py36logger = logging.getLogger(__name__)CODE
LOWtrl/trainer/callbacks.py61logger = logging.getLogger(__name__)CODE
LOWtrl/generation/vllm_generation.py47logger = logging.getLogger(__name__)CODE
LOWtrl/generation/__init__.py20__all__ = []CODE
LOWtrl/generation/vllm_client.py53logger = logging.getLogger(__name__)CODE
Hallucination Indicators6 hits · 45 pts
SeverityFileLineSnippetContext
CRITICALtrl/experimental/ppo/modeling_value_head.py713 self.v_head.summary.weight.data.normal_(mean=0.0, std=initializer_range)STRING
CRITICALtrl/experimental/ppo/modeling_value_head.py714 self.v_head.summary.bias.data.zero_()STRING
CRITICALtrl/experimental/ppo/modeling_value_head.py979 self.v_head.summary.weight.data.normal_(mean=0.0, std=initializer_range)STRING
CRITICALtrl/experimental/ppo/modeling_value_head.py980 self.v_head.summary.bias.data.zero_()STRING
CRITICALtrl/models/activation_offloading.py413 torch.autograd.variable.Variable._execution_engine.queue_callback(wait_and_del_remaining_references)CODE
CRITICALtrl/generation/vllm_generation.py511 self.llm.llm_engine.model_executor.driver_worker.model_runner.model.load_weights([(name, param)])CODE
AI Structural Patterns46 hits · 40 pts
SeverityFileLineSnippetContext
LOWtests/test_distillation_trainer.py61CODE
LOWtests/experimental/test_gold_trainer.py795CODE
LOWtests/experimental/test_gold_trainer.py1857CODE
LOWtests/experimental/test_gold_trainer.py2190CODE
LOWtests/experimental/test_gold_trainer.py2288CODE
LOWtests/experimental/test_gold_trainer.py2384CODE
LOWtests/experimental/test_gold_trainer.py2573CODE
LOWtests/experimental/test_gold_trainer.py2638CODE
LOWtests/experimental/test_gold_trainer.py2738CODE
LOWtests/experimental/test_gold_trainer.py2802CODE
LOWtrl/experimental/iw_opd/iw_opd_trainer.py393CODE
LOWtrl/experimental/sdpo/sdpo_trainer.py353CODE
LOWtrl/experimental/cpo/cpo_trainer.py138CODE
LOWtrl/experimental/bco/bco_trainer.py425CODE
LOWtrl/experimental/orpo/orpo_trainer.py148CODE
LOWtrl/experimental/online_dpo/online_dpo_trainer.py177CODE
LOWtrl/experimental/bema_for_ref_model/callback.py130CODE
LOWtrl/experimental/xpo/xpo_trainer.py113CODE
LOWtrl/experimental/openreward/_spec.py115CODE
LOWtrl/experimental/openreward/environment.py145CODE
LOWtrl/experimental/gkd/gkd_trainer.py115CODE
LOW…xperimental/async_distillation/async_rollout_worker.py191CODE
LOWtrl/experimental/gold/gold_trainer.py785CODE
LOWtrl/experimental/prm/prm_trainer.py153CODE
LOWtrl/experimental/async_grpo/async_grpo_trainer.py778CODE
LOWtrl/experimental/async_grpo/async_rollout_worker.py296CODE
LOWtrl/experimental/nash_md/nash_md_trainer.py172CODE
LOWtrl/experimental/ppo/modeling_value_head.py644CODE
LOWtrl/experimental/minillm/minillm_trainer.py166CODE
LOWtrl/experimental/tpo/tpo_trainer.py289CODE
LOW…tal/server_distillation/server_distillation_trainer.py142CODE
LOWtrl/trainer/distillation_trainer.py163CODE
LOWtrl/trainer/distillation_trainer.py396CODE
LOWtrl/trainer/distillation_trainer.py1513CODE
LOWtrl/trainer/reward_trainer.py329CODE
LOWtrl/trainer/sft_trainer.py916CODE
LOWtrl/trainer/callbacks.py641CODE
LOWtrl/trainer/rloo_trainer.py235CODE
LOWtrl/trainer/rloo_trainer.py892CODE
LOWtrl/trainer/kto_trainer.py568CODE
LOWtrl/trainer/grpo_trainer.py303CODE
LOWtrl/trainer/grpo_trainer.py1448CODE
LOWtrl/trainer/dpo_trainer.py517CODE
LOWtrl/generation/vllm_generation.py216CODE
LOWtrl/generation/vllm_client.py334CODE
LOWtrl/generation/vllm_client.py468CODE
Cross-Language Confusion7 hits · 30 pts
SeverityFileLineSnippetContext
HIGHexamples/grpo_harbor/harnesses/terminal_notes/env.py79 f"mkfifo {pipe} 2>/dev/null; ( nohup setsid bash -c {shlex.quote(command)} <{pipe} >{log} 2>&1 ) & echo $!",CODE
HIGHexamples/grpo_harbor/harnesses/jupyter/env.py56 await self._env.exec("which curl >/dev/null 2>&1 || apt-get install -y curl", timeout_sec=120)CODE
HIGHexamples/async_grpo_opencode/async_grpo_opencode.py326 cmd = "ulimit -v 2000000 2>/dev/null; timeout %d python3 solution.py 2>/dev/null | head -c 2000000" % PER_TEST_TIMEOCODE
HIGHexamples/async_grpo_opencode/async_grpo_opencode.py345 r = sandbox.exec("cd /home/user/workdir && python3 _run_tests.py", timeout=PER_TEST_TIMEOUT * len(tests) + 30)CODE
HIGHexamples/async_grpo_opencode/opencode_hf_sandbox.py177 cmd = "ulimit -v 2000000 2>/dev/null; timeout %d python3 solution.py 2>/dev/null | head -c 2000000" % PER_TEST_TIMEOCODE
HIGHexamples/grpo_wordle/grpo_wordle.py80uv venv && source .venv/bin/activateSTRING
HIGHtrl/data_utils.py690 elif not first_column_offsets.equals(column.offsets):STRING
Modern AI Meta-Vocabulary5 hits · 10 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_data_utils.py752 # chosen keeps its reasoning trace, rejected doesn't: the common prefix of the two rendered strings endsSTRING
MEDIUMtests/experimental/test_bco_trainer.py358 # Get embedding modelCOMMENT
MEDIUMdocs/source/openenv.md3[OpenEnv](https://github.com/huggingface/OpenEnv) is an open-source framework for defining, deploying, and interacting wCODE
MEDIUMdocs/source/bco_trainer.md64# customize this function depending on your embedding modelCOMMENT
MEDIUMdocs/source/harbor.md3[Harbor](https://www.harborframework.com) is a framework for running agentic tasks in sandboxes. It decouples a **task**CODE
AI Response Leakage1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHdocs/source/customization.md128 # In this example: the hinge loss from https://huggingface.co/papers/2309.06657COMMENT
Fake / Example Data3 hits · 4 pts
SeverityFileLineSnippetContext
LOWtrl/chat_template_utils.py122 dummy_token = AddedToken(f"<extra_id_{idx}>")CODE
LOWtrl/chat_template_utils.py123 is_added = tokenizer.add_tokens(dummy_token)CODE
LOWtrl/chat_template_utils.py126 added_tokens.append(dummy_token)CODE
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOWtrl/generation/vllm_client.py839# Example usageCOMMENT
Overly Generic Function Names1 hit · 1 pts
SeverityFileLineSnippetContext
LOWtests/test_utils.py287 def test_function(self):CODE