A PyTorch native platform for training generative AI models
This report presents the forensic synthetic code analysis of pytorch/torchtitan, a Python project with 5,675 GitHub stars. SynthScan v2.0 examined 176,027 lines of code across 665 source files, recording 2985 pattern matches distributed across 20 syntactic categories. The overall adjusted score of 20.0 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).
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.
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.
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.
The scanner identified 2985 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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/unit_tests/test_kda_attention.py | 87 | def test_varlen_matches_independent_documents(self): | CODE |
| LOW | tests/unit_tests/test_qwen3_5_mrope_positions.py | 104 | def test_multimodal_batch_routes_mrope_to_layers(self): | CODE |
| LOW | tests/unit_tests/gpu/test_fused_swiglu.py | 76 | def test_gate_up_projection_is_linear(self): | CODE |
| LOW | tests/unit_tests/gpu/test_fused_swiglu.py | 85 | def test_preserves_converted_linear_config(self): | CODE |
| LOW | tests/unit_tests/gpu/test_fused_swiglu.py | 97 | def test_saves_in_stock_layout(self): | CODE |
| LOW | tests/unit_tests/gpu/test_fused_swiglu.py | 106 | def test_fused_checkpoint_loads_into_stock(self): | CODE |
| LOW | tests/unit_tests/gpu/test_fused_swiglu.py | 118 | def test_stock_checkpoint_loads_into_fused(self): | CODE |
| LOW | tests/unit_tests/gpu/test_fused_swiglu.py | 148 | def test_strict_load_reports_missing(self): | CODE |
| LOW | tests/unit_tests/gpu/test_fused_swiglu.py | 172 | def test_dist_gemm_config_keeps_overlap(self): | CODE |
| LOW | tests/unit_tests/gpu/test_fused_swiglu.py | 202 | def test_hf_adapter_roundtrip(self): | CODE |
| LOW⚡ | tests/unit_tests/gpu/test_compile_regional_inductor.py | 36 | def test_inductor_backend_left_unchanged(self): | CODE |
| LOW⚡ | tests/unit_tests/gpu/test_compile_regional_inductor.py | 41 | def test_aot_eager_with_flex_scoops(self): | CODE |
| LOW⚡ | tests/unit_tests/gpu/test_compile_regional_inductor.py | 46 | def test_aot_eager_without_flex_left_unchanged(self): | CODE |
| LOW⚡ | tests/unit_tests/gpu/test_compile_regional_inductor.py | 51 | def test_other_backend_with_flex_raises(self): | CODE |
| LOW⚡ | tests/unit_tests/gpu/test_compile_regional_inductor.py | 56 | def test_region_annotation_follows_flag(self): | CODE |
| LOW | tests/unit_tests/gpu/test_compile_regional_inductor.py | 90 | def _triton_flex_kernel_count(backend) -> int: | CODE |
| LOW | tests/unit_tests/gpu/test_compile_regional_inductor.py | 118 | def test_plain_aot_eager_decomposes_flex(self): | CODE |
| LOW | tests/unit_tests/gpu/test_compile_regional_inductor.py | 122 | def test_regional_scoop_lowers_flex_to_triton(self): | CODE |
| LOW | tests/unit_tests/gpu/test_activation_checkpoint.py | 218 | def test_force_recompute_mm_fqns(self): | CODE |
| LOW | tests/unit_tests/gpu/test_fused_swiglu_override.py | 31 | def _build_fused_grouped_experts() -> FusedGroupedExperts: | CODE |
| LOW | tests/unit_tests/gpu/test_fused_swiglu_override.py | 44 | def test_minimal_async_ep_config_imports_override(self): | CODE |
| LOW | tests/unit_tests/gpu/test_fused_swiglu_override.py | 52 | def test_grouped_experts_config_is_replaced(self): | CODE |
| LOW | tests/unit_tests/gpu/test_fused_swiglu_override.py | 68 | def test_saves_and_loads_stock_layout(self): | CODE |
| LOW | tests/unit_tests/gpu/test_fused_swiglu_override.py | 82 | def test_built_module_has_only_fused_params(self): | CODE |
| LOW | tests/unit_tests/gpu/test_fused_swiglu_override.py | 143 | def test_matches_unfused_forward_and_backward(self): | CODE |
| LOW | tests/unit_tests/gpu/test_fused_swiglu_override.py | 195 | def test_silu_and_mul_custom_op_matches_reference_with_offsets(self): | CODE |
| LOW | tests/unit_tests/gpu/test_fused_swiglu_override.py | 216 | def test_silu_and_mul_custom_op_matches_reference_without_offsets(self): | CODE |
| LOW | tests/unit_tests/gpu/test_fused_swiglu_override.py | 236 | def test_silu_and_mul_kernels_match_reference_with_offsets(self): | CODE |
| LOW | tests/unit_tests/gpu/test_kimi_k3.py | 121 | def test_attention_gym_kda_kernel_matches_recurrent_reference(self): | CODE |
| LOW | tests/unit_tests/gpu/test_kimi_k3.py | 193 | def test_state_dict_round_trips_through_hf_adapter(self): | CODE |
| LOW | tests/unit_tests/gpu/test_minimal_async_ep_kernels.py | 36 | def test_topk_index_kernels_match_reference(self): | CODE |
| LOW | tests/unit_tests/gpu/test_minimal_async_ep_kernels.py | 192 | def test_metadata_kernels_match_reference(self): | CODE |
| LOW | tests/unit_tests/gpu/test_minimal_async_ep_kernels.py | 298 | def test_copy_kernels_handle_strides_and_active_row_masks(self): | CODE |
| LOW | tests/unit_tests/gpu/test_qwen3_5_deltanet.py | 27 | def _torch_native_gated_delta( | CODE |
| LOW | tests/unit_tests/gpu/test_qwen3_5_deltanet.py | 76 | def _torch_native_gated_delta_varlen( | CODE |
| LOW | tests/unit_tests/gpu/test_qwen3_5_deltanet.py | 171 | def test_flex_masks_ignore_padding_position_resets(self): | CODE |
| LOW | tests/unit_tests/gpu/test_qwen3_5_deltanet.py | 189 | def test_flex_masks_include_delta_net_varlen_metadata(self): | CODE |
| LOW | tests/unit_tests/gpu/test_qwen3_5_deltanet.py | 377 | def test_extracted_forward_matches_main(self): | CODE |
| LOW | tests/unit_tests/gpu/test_qwen3_5_deltanet.py | 399 | def _assert_packed_run_matches_per_document(self, model, x, positions, masks): | CODE |
| LOW | tests/unit_tests/gpu/test_qwen3_5_deltanet.py | 420 | def test_varlen_matches_independent_document_forwards(self): | CODE |
| LOW | tests/unit_tests/gpu/test_qwen3_5_deltanet.py | 437 | def test_get_attention_masks_pairs_flex_mask_with_deltanet_offsets(self): | CODE |
| LOW | tests/unit_tests/gpu/test_qwen3_5_deltanet.py | 506 | def _assert_fla_varlen_matches_per_document( | CODE |
| LOW⚡ | tests/unit_tests/gpu/test_qwen3_5_deltanet.py | 590 | def test_fla_chunked_varlen_matches_independent_document_forwards(self): | CODE |
| LOW⚡ | tests/unit_tests/gpu/test_qwen3_5_deltanet.py | 598 | def test_fla_fused_recurrent_varlen_matches_independent_document_forwards(self): | CODE |
| LOW⚡ | tests/unit_tests/gpu/test_qwen3_5_deltanet.py | 603 | def test_varlen_offsets_are_fresh_per_deltanet_invocation(self): | CODE |
| LOW | tests/unit_tests/gpu/test_qk_clip.py | 38 | def test_attention_records_training_maxima_only(self) -> None: | CODE |
| LOW | tests/unit_tests/gpu/test_qk_clip.py | 86 | def test_optimizer_hook_runs_qk_clip(self) -> None: | CODE |
| LOW | tests/unit_tests/gpu/test_qk_clip.py | 137 | def test_reduces_head_maxima_and_clips_local_dtensor_weights(self) -> None: | CODE |
| LOW | tests/unit_tests/gpu/test_qk_clip.py | 230 | def test_weight_scaling_is_communication_free(self) -> None: | CODE |
| LOW | tests/unit_tests/gpu/test_compile_moe.py | 46 | def test_async_tp_requires_model_compile(self): | CODE |
| LOW | tests/unit_tests/gpu/test_compile_moe.py | 64 | def test_apply_compile_configures_async_tp(self): | CODE |
| LOW | tests/unit_tests/gpu/test_compile_moe.py | 94 | def test_grouped_mm_compiles_and_runs(self): | CODE |
| LOW⚡ | tests/unit_tests/gpu/test_helion_rope.py | 86 | def test_registered_against_cossin(self): | CODE |
| LOW⚡ | tests/unit_tests/gpu/test_helion_rope.py | 91 | def test_registered_against_complex(self): | CODE |
| LOW⚡ | tests/unit_tests/gpu/test_helion_rope.py | 96 | def test_cossin_factory_preserves_fields(self): | CODE |
| LOW⚡ | tests/unit_tests/gpu/test_helion_rope.py | 296 | def test_forward_matches_cossin(self): | CODE |
| LOW⚡ | tests/unit_tests/gpu/test_helion_rope.py | 305 | def test_forward_matches_with_implicit_positions(self): | CODE |
| LOW⚡ | tests/unit_tests/gpu/test_helion_rope.py | 313 | def test_complex_forward_matches(self): | CODE |
| LOW⚡ | tests/unit_tests/gpu/test_helion_rope.py | 322 | def test_complex_forward_matches_with_implicit_positions(self): | CODE |
| LOW⚡ | tests/unit_tests/gpu/test_helion_rope.py | 329 | def test_backward_matches_cossin(self): | CODE |
| 1732 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | tests/unit_tests/cpu/test_tp_kv_heads_validation.py | 109 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | tests/unit_tests/cpu/test_tp_kv_heads_validation.py | 111 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | tests/unit_tests/cpu/test_tp_kv_heads_validation.py | 119 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | tests/unit_tests/cpu/test_tp_kv_heads_validation.py | 121 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | tests/unit_tests/cpu/test_tp_kv_heads_validation.py | 129 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | tests/unit_tests/cpu/test_tp_kv_heads_validation.py | 131 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | …nit_tests/cpu/observability/test_structured_logging.py | 86 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …nit_tests/cpu/observability/test_structured_logging.py | 88 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …nit_tests/cpu/observability/test_structured_logging.py | 319 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …nit_tests/cpu/observability/test_structured_logging.py | 321 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …nit_tests/cpu/observability/test_structured_logging.py | 510 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …nit_tests/cpu/observability/test_structured_logging.py | 512 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …nit_tests/cpu/observability/test_structured_logging.py | 649 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …nit_tests/cpu/observability/test_structured_logging.py | 651 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …nit_tests/cpu/observability/test_structured_logging.py | 705 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …nit_tests/cpu/observability/test_structured_logging.py | 707 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …nit_tests/cpu/observability/test_structured_logging.py | 755 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …nit_tests/cpu/observability/test_structured_logging.py | 757 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …nit_tests/cpu/observability/test_structured_logging.py | 1525 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …nit_tests/cpu/observability/test_structured_logging.py | 1527 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …nit_tests/cpu/observability/test_structured_logging.py | 47 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …nit_tests/cpu/observability/test_structured_logging.py | 49 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …nit_tests/cpu/observability/test_structured_logging.py | 298 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …nit_tests/cpu/observability/test_structured_logging.py | 300 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …nit_tests/cpu/observability/test_structured_logging.py | 544 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …nit_tests/cpu/observability/test_structured_logging.py | 546 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …nit_tests/cpu/observability/test_structured_logging.py | 790 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …nit_tests/cpu/observability/test_structured_logging.py | 792 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …nit_tests/cpu/observability/test_structured_logging.py | 990 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …nit_tests/cpu/observability/test_structured_logging.py | 992 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …nit_tests/cpu/observability/test_structured_logging.py | 1209 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | …nit_tests/cpu/observability/test_structured_logging.py | 1215 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | scripts/loss_compare.py | 332 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | scripts/loss_compare.py | 334 | # ============================================================================= | COMMENT |
| MEDIUM | scripts/loss_compare.py | 78 | # ============================================================================= | COMMENT |
| MEDIUM | scripts/loss_compare.py | 80 | # ============================================================================= | COMMENT |
| MEDIUM | scripts/loss_compare.py | 105 | # ============================================================================= | COMMENT |
| MEDIUM | scripts/loss_compare.py | 107 | # ============================================================================= | COMMENT |
| MEDIUM | scripts/loss_compare.py | 241 | # ============================================================================= | COMMENT |
| MEDIUM | scripts/loss_compare.py | 243 | # ============================================================================= | COMMENT |
| MEDIUM | scripts/loss_compare.py | 445 | # ============================================================================= | COMMENT |
| MEDIUM | scripts/loss_compare.py | 447 | # ============================================================================= | COMMENT |
| MEDIUM | scripts/loss_compare.py | 530 | # ============================================================================= | COMMENT |
| MEDIUM | scripts/loss_compare.py | 532 | # ============================================================================= | COMMENT |
| MEDIUM | scripts/loss_compare.py | 605 | # ============================================================================= | COMMENT |
| MEDIUM | scripts/loss_compare.py | 607 | # ============================================================================= | COMMENT |
| MEDIUM | scripts/loss_compare.py | 928 | # ============================================================================= | COMMENT |
| MEDIUM | scripts/loss_compare.py | 930 | # ============================================================================= | COMMENT |
| MEDIUM | scripts/loss_compare.py | 972 | # ============================================================================= | COMMENT |
| MEDIUM | scripts/loss_compare.py | 974 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | …ripts/checkpoint_conversion/numerical_tests_qwen3_5.py | 47 | # ============================================================ | COMMENT |
| MEDIUM⚡ | …ripts/checkpoint_conversion/numerical_tests_qwen3_5.py | 49 | # ============================================================ | COMMENT |
| MEDIUM | …ripts/checkpoint_conversion/numerical_tests_qwen3_5.py | 76 | # ============================================================ | COMMENT |
| MEDIUM | …ripts/checkpoint_conversion/numerical_tests_qwen3_5.py | 78 | # ============================================================ | COMMENT |
| MEDIUM | …ripts/checkpoint_conversion/numerical_tests_qwen3_5.py | 230 | # ============================================================ | COMMENT |
| MEDIUM | …ripts/checkpoint_conversion/numerical_tests_qwen3_5.py | 232 | # ============================================================ | COMMENT |
| MEDIUM | …ripts/checkpoint_conversion/numerical_tests_qwen3_5.py | 263 | # ============================================================ | COMMENT |
| MEDIUM | …ripts/checkpoint_conversion/numerical_tests_qwen3_5.py | 265 | # ============================================================ | COMMENT |
| MEDIUM | …ripts/checkpoint_conversion/numerical_tests_qwen3_5.py | 322 | # ============================================================ | COMMENT |
| MEDIUM | …ripts/checkpoint_conversion/numerical_tests_qwen3_5.py | 324 | # ============================================================ | COMMENT |
| 105 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | torchtitan/overrides/helion_rope.py | 37 | CODE | |
| LOW | torchtitan/overrides/moe_token_dispatcher.py | 40 | CODE | |
| LOW | torchtitan/tools/filesystem.py | 15 | CODE | |
| LOW | torchtitan/distributed/spmd_types.py | 9 | CODE | |
| LOW | torchtitan/distributed/fsdp.py | 25 | CODE | |
| LOW | torchtitan/distributed/linear.py | 28 | CODE | |
| LOW | torchtitan/distributed/__init__.py | 7 | CODE | |
| LOW | torchtitan/distributed/utils.py | 7 | CODE | |
| LOW | torchtitan/distributed/parallel_dims.py | 7 | CODE | |
| LOW | …n/distributed/flex_shard/_optimizer_reshard_runtime.py | 16 | CODE | |
| LOW | torchtitan/distributed/flex_shard/dist_muon.py | 9 | CODE | |
| LOW | torchtitan/distributed/flex_shard/__init__.py | 9 | CODE | |
| LOW | torchtitan/distributed/flex_shard/__init__.py | 10 | CODE | |
| LOW | torchtitan/distributed/flex_shard/__init__.py | 10 | CODE | |
| LOW | torchtitan/distributed/flex_shard/__init__.py | 10 | CODE | |
| LOW | torchtitan/distributed/flex_shard/__init__.py | 10 | CODE | |
| LOW | …/distributed/flex_shard/_optimizer_reshard_schedule.py | 9 | CODE | |
| LOW | torchtitan/distributed/flex_shard/optimizer_reshard.py | 9 | CODE | |
| LOW | torchtitan/distributed/context_parallel/__init__.py | 19 | CODE | |
| LOW | torchtitan/distributed/context_parallel/__init__.py | 19 | CODE | |
| LOW | torchtitan/distributed/context_parallel/__init__.py | 19 | CODE | |
| LOW | torchtitan/distributed/context_parallel/api.py | 25 | CODE | |
| LOW | torchtitan/distributed/minimal_async_ep/__init__.py | 7 | CODE | |
| LOW | torchtitan/distributed/minimal_async_ep/__init__.py | 7 | CODE | |
| LOW | torchtitan/distributed/minimal_async_ep/__init__.py | 7 | CODE | |
| LOW | torchtitan/distributed/minimal_async_ep/__init__.py | 7 | CODE | |
| LOW | torchtitan/distributed/minimal_async_ep/__init__.py | 7 | CODE | |
| LOW | torchtitan/config/__init__.py | 15 | CODE | |
| LOW | torchtitan/config/__init__.py | 15 | CODE | |
| LOW | torchtitan/config/__init__.py | 15 | CODE | |
| LOW | torchtitan/config/__init__.py | 15 | CODE | |
| LOW | torchtitan/config/__init__.py | 15 | CODE | |
| LOW | torchtitan/config/__init__.py | 22 | CODE | |
| LOW | torchtitan/config/__init__.py | 23 | CODE | |
| LOW | torchtitan/config/__init__.py | 24 | CODE | |
| LOW | torchtitan/config/__init__.py | 25 | CODE | |
| LOW | torchtitan/config/__init__.py | 25 | CODE | |
| LOW | torchtitan/config/__init__.py | 25 | CODE | |
| LOW | torchtitan/config/__init__.py | 25 | CODE | |
| LOW | torchtitan/config/__init__.py | 25 | CODE | |
| LOW | torchtitan/config/__init__.py | 25 | CODE | |
| LOW | torchtitan/config/override.py | 32 | CODE | |
| LOW | …formers_modeling_backend/tests/test_moe_parallelism.py | 60 | CODE | |
| LOW | torchtitan/experiments/graph_trainer/precompile.py | 7 | CODE | |
| LOW | torchtitan/experiments/graph_trainer/precompile.py | 101 | CODE | |
| LOW | torchtitan/experiments/graph_trainer/fsdp_passes.py | 14 | CODE | |
| LOW | torchtitan/experiments/graph_trainer/ep_eager_chunk.py | 14 | CODE | |
| LOW | torchtitan/experiments/graph_trainer/custom_codegen.py | 9 | CODE | |
| LOW | torchtitan/experiments/graph_trainer/ep_pass_utils.py | 21 | CODE | |
| LOW | torchtitan/experiments/graph_trainer/registry.py | 14 | CODE | |
| LOW | torchtitan/experiments/graph_trainer/graph_utils.py | 11 | CODE | |
| LOW | torchtitan/experiments/graph_trainer/memory_policy.py | 16 | CODE | |
| LOW | torchtitan/experiments/graph_trainer/memory_policy.py | 52 | CODE | |
| LOW | torchtitan/experiments/graph_trainer/inductor_passes.py | 15 | CODE | |
| LOW | torchtitan/experiments/graph_trainer/storage.py | 7 | CODE | |
| LOW | …tan/experiments/graph_trainer/ep_process_group_pass.py | 17 | CODE | |
| LOW | …eriments/graph_trainer/log_activation_memory_policy.py | 9 | CODE | |
| LOW | torchtitan/experiments/graph_trainer/ep_chunk_pass.py | 62 | CODE | |
| LOW | torchtitan/experiments/graph_trainer/passes.py | 26 | CODE | |
| LOW | torchtitan/experiments/graph_trainer/passes.py | 80 | CODE | |
| 261 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .ci/docker/common/install_conda.sh | 55 | # WARNING: This is a HACK from PyTorch core to be able to build PyTorch on 22.04. | COMMENT |
| LOW⚡ | tests/unit_tests/cpu/test_tokenizer.py | 366 | # Step 2: Load tokenizer using our function | COMMENT |
| LOW⚡ | tests/unit_tests/cpu/test_tokenizer.py | 372 | # Step 3: Load tokenizer using official Tokenizer library (if available) | COMMENT |
| LOW⚡ | tests/unit_tests/cpu/test_tokenizer.py | 379 | # Step 4: Load tokenizer using transformers AutoTokenizer (if available) | COMMENT |
| LOW⚡ | tests/unit_tests/cpu/test_tokenizer.py | 388 | # Step 5: Compare underlying tokenizer attributes (only if official tokenizer is available) | COMMENT |
| LOW⚡ | tests/unit_tests/cpu/test_tokenizer.py | 394 | # Step 6: Compare with transformers tokenizer if available | COMMENT |
| LOW | tests/unit_tests/cpu/test_tokenizer.py | 351 | # Step 1: Download tokenizer files | COMMENT |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 103 | 0.5, # Step 0: 50% of max LR (warmup) | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 104 | 1.0, # Step 1: 100% of max LR (warmup complete) | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 105 | 1.0, # Step 2: We maunally added step of stable phase, to prevent LR from dropping to 0 at last step | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 106 | 7.0 / 8.0, # Step 3: 7/8 of max LR | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 107 | 6.0 / 8.0, # Step 4: 3/4 of max LR | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 108 | 5.0 / 8.0, # Step 5: 5/8 of max LR | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 109 | 4.0 / 8.0, # Step 6: 1/2 of max LR | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 110 | 3.0 / 8.0, # Step 7: 3/8 of max LR | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 111 | 2.0 / 8.0, # Step 8: 1/4 of max LR | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 112 | 1.0 / 8.0, # Step 9: 1/8 of max LR | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 146 | 0.5, # Step 0: 50% of max LR (warmup) | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 147 | 1.0, # Step 1: 100% of max LR (warmup complete) | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 148 | 1.0, # Step 2: Stable phase | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 149 | 1.0, # Step 3: Stable phase | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 150 | 1.0, # Step 4: Stable phase | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 151 | 1.0, # Step 5: We maunally added step of stable phase, to prevent LR from dropping to 0 at last step | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 152 | 0.8, # Step 6: Linear decay starts (80% of max LR) | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 153 | 0.6, # Step 7: 60% of max LR | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 154 | 0.4, # Step 8: 40% of max LR | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 155 | 0.2, # Step 9: 20% of max LR | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 212 | 0.2, # Step 0: 50% of max LR (warmup) | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 213 | 0.4, # Step 1: 100% of max LR (warmup complete) | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 214 | 0.6, # Step 2: Stable phase | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 215 | 0.8, # Step 3: Stable phase | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 216 | 1.0, # Step 4: Stable phase | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 249 | 0.5, # Step 0: 50% of max LR (warmup) | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 250 | 1.0, # Step 1: 100% of max LR (warmup complete) | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 251 | 1.0, # Step 2: We maunally added step of stable phase, to prevent LR from dropping to 0 at last step | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 252 | 1.0, # Step 3: Stable phase | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 253 | 1.0, # Step 4: Stable phase | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 254 | 1.0, # Step 5: Stable phase | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 255 | 1.0, # Step 6: Stable phase | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 256 | 1.0, # Step 7: Stable phase | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 257 | 1.0, # Step 8: Stable phase | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 258 | 1.0, # Step 9: Stable phase | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 292 | 0.2, # Step 0: 50% of max LR (warmup) | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 293 | 0.4, # Step 1: 100% of max LR (warmup complete) | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 294 | 0.6, # Step 2: Stable phase | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 295 | 0.8, # Step 3: Stable phase | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 296 | 1.0, # Step 4: Stable phase | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 297 | 1.0, # Step 5: We maunally added step of stable phase, to prevent LR from dropping to 0 at last step | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 298 | 0.8, # Step 6: Linear decay starts (80% of max LR) | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 299 | 0.6, # Step 7: 60% of max LR | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 300 | 0.4, # Step 8: 40% of max LR | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 301 | 0.2, # Step 9: 20% of max LR | CODE |
| LOW⚡ | scripts/checkpoint_compat_test.py | 228 | # Step 1: Reference run at load_commit (full training from scratch) | COMMENT |
| LOW⚡ | scripts/checkpoint_compat_test.py | 237 | # Step 2: Save run at save_commit (partial training + checkpoint) | COMMENT |
| LOW | scripts/checkpoint_compat_test.py | 253 | # Step 3: Resume run at load_commit (load checkpoint, train to end) | COMMENT |
| LOW | scripts/checkpoint_compat_test.py | 268 | # Step 4: Compare | COMMENT |
| LOW⚡ | .github/workflows/integration_test_8gpu_torchft.yaml | 32 | # Step 1: Dynamically compute the matrix based on conditions | COMMENT |
| LOW⚡ | .github/workflows/integration_test_8gpu_torchft.yaml | 40 | # Step 2: Use the dynamic matrix in the build-test job | COMMENT |
| LOW⚡ | .github/workflows/integration_test_8gpu_rl.yaml | 30 | # Step 1: Dynamically compute the matrix based on conditions | COMMENT |
| LOW⚡ | .github/workflows/integration_test_8gpu_rl.yaml | 40 | # Step 2: Use the dynamic matrix in the build-test job | COMMENT |
| 37 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/unit_tests/gpu/test_fsdp_moe_sharding.py | 67 | CODE | |
| LOW | tests/unit_tests/cpu/test_tokenizer.py | 118 | CODE | |
| LOW | tests/unit_tests/cpu/test_tokenizer.py | 474 | CODE | |
| LOW | tests/unit_tests/cpu/test_tokenizer.py | 496 | CODE | |
| LOW | tests/unit_tests/cpu/test_tokenizer.py | 519 | CODE | |
| LOW | tests/unit_tests/cpu/test_dataset_checkpointing.py | 32 | CODE | |
| LOW | tests/unit_tests/cpu/test_embedding.py | 110 | CODE | |
| LOW | tests/unit_tests/cpu/test_validator_frequency.py | 13 | CODE | |
| LOW | tests/unit_tests/cpu/test_loss.py | 360 | CODE | |
| LOW | tests/integration_tests/run_tests.py | 137 | CODE | |
| LOW | tests/integration_tests/run_tests.py | 390 | CODE | |
| LOW | tests/assets/cc12m_test/pack_test_dataset.py | 13 | CODE | |
| LOW | …h_trace_compaction/scripts/compact_cuda_graph_trace.py | 690 | CODE | |
| LOW | …h_trace_compaction/scripts/compact_cuda_graph_trace.py | 740 | CODE | |
| LOW | …skills/numerics_debugging/scripts/activation_tracer.py | 424 | CODE | |
| LOW | …skills/numerics_debugging/scripts/activation_tracer.py | 455 | CODE | |
| LOW | …/skills/numerics_debugging/scripts/compare_numerics.py | 82 | CODE | |
| LOW | …/skills/numerics_debugging/scripts/compare_numerics.py | 341 | CODE | |
| LOW | …/skills/numerics_debugging/scripts/compare_numerics.py | 489 | CODE | |
| LOW | …/skills/numerics_debugging/scripts/compare_numerics.py | 1084 | CODE | |
| LOW | …/skills/numerics_debugging/scripts/compare_numerics.py | 573 | CODE | |
| LOW | scripts/loss_compare.py | 610 | CODE | |
| LOW | scripts/download_hf_assets.py | 12 | CODE | |
| LOW | .github/scripts/todo_debt_tracker.py | 120 | CODE | |
| LOW | .github/scripts/todo_debt_tracker.py | 237 | CODE | |
| LOW | .github/scripts/todo_debt_tracker.py | 338 | CODE | |
| LOW | torchtitan/trainer.py | 274 | CODE | |
| LOW | torchtitan/trainer.py | 774 | CODE | |
| LOW | torchtitan/trainer.py | 943 | CODE | |
| LOW | torchtitan/trainer.py | 198 | CODE | |
| LOW | torchtitan/trainer.py | 219 | CODE | |
| LOW | torchtitan/tools/utils.py | 140 | CODE | |
| LOW | torchtitan/distributed/spmd_types.py | 231 | CODE | |
| LOW | torchtitan/distributed/fsdp.py | 168 | CODE | |
| LOW | torchtitan/distributed/activation_checkpoint.py | 31 | CODE | |
| LOW | torchtitan/distributed/activation_checkpoint.py | 72 | CODE | |
| LOW | torchtitan/distributed/pipeline_parallel.py | 357 | CODE | |
| LOW | torchtitan/distributed/pipeline_parallel.py | 470 | CODE | |
| LOW | …n/distributed/flex_shard/_optimizer_reshard_runtime.py | 128 | CODE | |
| LOW | …n/distributed/flex_shard/_optimizer_reshard_runtime.py | 419 | CODE | |
| LOW | torchtitan/distributed/flex_shard/dist_muon.py | 1134 | CODE | |
| LOW | torchtitan/distributed/flex_shard/dist_muon.py | 1397 | CODE | |
| LOW | torchtitan/distributed/flex_shard/dist_muon.py | 486 | CODE | |
| LOW | …/distributed/flex_shard/_optimizer_reshard_schedule.py | 812 | CODE | |
| LOW | …/distributed/flex_shard/_optimizer_reshard_schedule.py | 943 | CODE | |
| LOW | torchtitan/config/configurable.py | 162 | CODE | |
| LOW | torchtitan/config/configurable.py | 46 | CODE | |
| LOW | torchtitan/config/configurable.py | 75 | CODE | |
| LOW | torchtitan/config/configurable.py | 49 | CODE | |
| LOW | torchtitan/config/manager.py | 48 | CODE | |
| LOW | …nts/transformers_modeling_backend/module_conversion.py | 42 | CODE | |
| LOW | …tan/experiments/transformers_modeling_backend/model.py | 815 | CODE | |
| LOW | …tan/experiments/transformers_modeling_backend/model.py | 524 | CODE | |
| LOW | …tan/experiments/transformers_modeling_backend/model.py | 894 | CODE | |
| LOW | …/experiments/transformers_modeling_backend/pipeline.py | 39 | CODE | |
| LOW | …/experiments/transformers_modeling_backend/pipeline.py | 148 | CODE | |
| LOW | …/experiments/transformers_modeling_backend/pipeline.py | 191 | CODE | |
| LOW | …ments/transformers_modeling_backend/moe_replacement.py | 92 | CODE | |
| LOW | …_moe_model/scripts/numerical_equivalence_pretrained.py | 147 | CODE | |
| LOW | …/skills/add_moe_model/scripts/numerical_equivalence.py | 523 | CODE | |
| 87 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/unit_tests/cpu/test_tokenizer.py | 366 | # Step 2: Load tokenizer using our function | COMMENT |
| LOW⚡ | tests/unit_tests/cpu/test_tokenizer.py | 372 | # Step 3: Load tokenizer using official Tokenizer library (if available) | COMMENT |
| LOW⚡ | tests/unit_tests/cpu/test_tokenizer.py | 379 | # Step 4: Load tokenizer using transformers AutoTokenizer (if available) | COMMENT |
| LOW⚡ | tests/unit_tests/cpu/test_tokenizer.py | 388 | # Step 5: Compare underlying tokenizer attributes (only if official tokenizer is available) | COMMENT |
| LOW⚡ | tests/unit_tests/cpu/test_tokenizer.py | 394 | # Step 6: Compare with transformers tokenizer if available | COMMENT |
| LOW | tests/unit_tests/cpu/test_tokenizer.py | 351 | # Step 1: Download tokenizer files | COMMENT |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 103 | 0.5, # Step 0: 50% of max LR (warmup) | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 104 | 1.0, # Step 1: 100% of max LR (warmup complete) | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 105 | 1.0, # Step 2: We maunally added step of stable phase, to prevent LR from dropping to 0 at last step | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 106 | 7.0 / 8.0, # Step 3: 7/8 of max LR | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 107 | 6.0 / 8.0, # Step 4: 3/4 of max LR | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 108 | 5.0 / 8.0, # Step 5: 5/8 of max LR | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 109 | 4.0 / 8.0, # Step 6: 1/2 of max LR | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 110 | 3.0 / 8.0, # Step 7: 3/8 of max LR | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 111 | 2.0 / 8.0, # Step 8: 1/4 of max LR | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 112 | 1.0 / 8.0, # Step 9: 1/8 of max LR | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 146 | 0.5, # Step 0: 50% of max LR (warmup) | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 147 | 1.0, # Step 1: 100% of max LR (warmup complete) | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 148 | 1.0, # Step 2: Stable phase | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 149 | 1.0, # Step 3: Stable phase | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 150 | 1.0, # Step 4: Stable phase | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 151 | 1.0, # Step 5: We maunally added step of stable phase, to prevent LR from dropping to 0 at last step | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 152 | 0.8, # Step 6: Linear decay starts (80% of max LR) | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 153 | 0.6, # Step 7: 60% of max LR | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 154 | 0.4, # Step 8: 40% of max LR | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 155 | 0.2, # Step 9: 20% of max LR | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 212 | 0.2, # Step 0: 50% of max LR (warmup) | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 213 | 0.4, # Step 1: 100% of max LR (warmup complete) | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 214 | 0.6, # Step 2: Stable phase | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 215 | 0.8, # Step 3: Stable phase | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 216 | 1.0, # Step 4: Stable phase | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 249 | 0.5, # Step 0: 50% of max LR (warmup) | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 250 | 1.0, # Step 1: 100% of max LR (warmup complete) | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 251 | 1.0, # Step 2: We maunally added step of stable phase, to prevent LR from dropping to 0 at last step | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 252 | 1.0, # Step 3: Stable phase | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 253 | 1.0, # Step 4: Stable phase | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 254 | 1.0, # Step 5: Stable phase | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 255 | 1.0, # Step 6: Stable phase | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 256 | 1.0, # Step 7: Stable phase | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 257 | 1.0, # Step 8: Stable phase | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 258 | 1.0, # Step 9: Stable phase | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 292 | 0.2, # Step 0: 50% of max LR (warmup) | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 293 | 0.4, # Step 1: 100% of max LR (warmup complete) | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 294 | 0.6, # Step 2: Stable phase | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 295 | 0.8, # Step 3: Stable phase | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 296 | 1.0, # Step 4: Stable phase | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 297 | 1.0, # Step 5: We maunally added step of stable phase, to prevent LR from dropping to 0 at last step | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 298 | 0.8, # Step 6: Linear decay starts (80% of max LR) | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 299 | 0.6, # Step 7: 60% of max LR | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 300 | 0.4, # Step 8: 40% of max LR | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 301 | 0.2, # Step 9: 20% of max LR | CODE |
| LOW⚡ | scripts/checkpoint_compat_test.py | 228 | # Step 1: Reference run at load_commit (full training from scratch) | COMMENT |
| LOW⚡ | scripts/checkpoint_compat_test.py | 237 | # Step 2: Save run at save_commit (partial training + checkpoint) | COMMENT |
| LOW | scripts/checkpoint_compat_test.py | 253 | # Step 3: Resume run at load_commit (load checkpoint, train to end) | COMMENT |
| LOW | scripts/checkpoint_compat_test.py | 268 | # Step 4: Compare | COMMENT |
| LOW⚡ | .github/workflows/integration_test_8gpu_torchft.yaml | 32 | # Step 1: Dynamically compute the matrix based on conditions | COMMENT |
| LOW⚡ | .github/workflows/integration_test_8gpu_torchft.yaml | 40 | # Step 2: Use the dynamic matrix in the build-test job | COMMENT |
| LOW⚡ | .github/workflows/integration_test_8gpu_rl.yaml | 30 | # Step 1: Dynamically compute the matrix based on conditions | COMMENT |
| LOW⚡ | .github/workflows/integration_test_8gpu_rl.yaml | 40 | # Step 2: Use the dynamic matrix in the build-test job | COMMENT |
| LOW⚡ | …tegration_test_8gpu_transformers_modeling_backend.yaml | 31 | # Step 1: Dynamically compute the matrix based on conditions | COMMENT |
| 27 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/integration_tests/__init__.py | 12 | __all__ = [ | CODE |
| LOW⚡ | …skills/numerics_debugging/scripts/activation_tracer.py | 377 | def set_numerics_capture_active(active: bool) -> None: | CODE |
| LOW | …skills/numerics_debugging/scripts/activation_tracer.py | 873 | def _setup(self) -> None: | CODE |
| LOW | torchtitan/overrides/fused_mla.py | 77 | __all__ = [ | CODE |
| LOW | torchtitan/overrides/helion_rope.py | 69 | __all__ = ["HelionComplexRoPE", "HelionCosSinRoPE", "HelionRoPE"] | CODE |
| LOW | torchtitan/overrides/fused_swiglu.py | 79 | __all__ = [ | CODE |
| LOW | torchtitan/distributed/spmd_types.py | 33 | __all__ = [ | CODE |
| LOW | torchtitan/distributed/__init__.py | 9 | __all__ = [ | CODE |
| LOW | torchtitan/distributed/utils.py | 39 | def set_spmd_backend(spmd_backend: str) -> None: | CODE |
| LOW | torchtitan/distributed/utils.py | 318 | def set_batch_invariance(enable: bool) -> None: | CODE |
| LOW | torchtitan/distributed/parallel_dims.py | 21 | __all__ = [ | CODE |
| LOW | torchtitan/distributed/pipeline_parallel.py | 38 | __all__ = ["pipeline_llm", "pipeline_vlm"] | CODE |
| LOW | torchtitan/distributed/flex_shard/dist_muon.py | 53 | __all__ = [ | CODE |
| LOW | torchtitan/distributed/flex_shard/__init__.py | 12 | __all__ = [ | CODE |
| LOW | torchtitan/distributed/flex_shard/optimizer_reshard.py | 18 | __all__ = ["BlockShard", "BucketConfig", "ComputeLayout", "Owned"] | CODE |
| LOW | torchtitan/distributed/deepep/hybridep.py | 543 | __all__ = [ | CODE |
| LOW | torchtitan/distributed/context_parallel/__init__.py | 21 | __all__ = [ | CODE |
| LOW | torchtitan/distributed/minimal_async_ep/__init__.py | 15 | __all__ = [ | CODE |
| LOW | torchtitan/distributed/minimal_async_ep/api.py | 1017 | __all__ = [ | CODE |
| LOW | torchtitan/config/configurable.py | 15 | logger = logging.getLogger(__name__) | CODE |
| LOW | torchtitan/config/__init__.py | 34 | __all__ = [ | CODE |
| LOW | …/experiments/transformers_modeling_backend/__init__.py | 16 | __all__ = [ | CODE |
| LOW | …periments/transformers_modeling_backend/hf_sharding.py | 242 | def _set_layer_sharding_configs(layer: nn.Module, *, enable_sp: bool) -> None: | CODE |
| LOW | torchtitan/experiments/graph_trainer/custom_codegen.py | 418 | def _setup_custom_codegen(self) -> None: | CODE |
| LOW | torchtitan/experiments/graph_trainer/ep_chunk_pass.py | 185 | def _set_direction_meta(node: fx.Node, *, is_backward: bool) -> None: | CODE |
| LOW | torchtitan/experiments/graph_trainer/ep_overlap_pass.py | 159 | def _set_copy_non_blocking(node: fx.Node, non_blocking: bool) -> None: | CODE |
| LOW | …ents/graph_trainer/tests/test_bitwise_deterministic.py | 71 | def _set_deterministic(seed: int = SEED) -> None: | CODE |
| LOW | …xperiments/graph_trainer/tests/test_sac_peak_memory.py | 30 | def _set_deterministic() -> None: | CODE |
| LOW | …xperiments/graph_trainer/tests/test_graph_pp_passes.py | 419 | def _setup(self) -> None: | CODE |
| LOW | torchtitan/experiments/graph_trainer/graph_pp/runner.py | 46 | __all__ = [ | CODE |
| LOW | …chtitan/experiments/graph_trainer/graph_pp/__init__.py | 25 | __all__ = [ | CODE |
| LOW | torchtitan/experiments/torchft/__init__.py | 14 | __all__ = [ | CODE |
| LOW | torchtitan/experiments/torchft/optimizer.py | 19 | __all__ = ["TorchFTOptimizersContainer"] | CODE |
| LOW | torchtitan/experiments/torchft/config/__init__.py | 10 | __all__ = [ | CODE |
| LOW | …chtitan/experiments/torchft/tests/integration_tests.py | 16 | logger = logging.getLogger(__name__) | CODE |
| LOW | torchtitan/experiments/torchft/diloco/__init__.py | 9 | __all__ = [ | CODE |
| LOW | torchtitan/experiments/forge/__init__.py | 9 | __all__ = ["ForgeEngine"] | CODE |
| LOW | torchtitan/experiments/rl/controller.py | 140 | logger = logging.getLogger(__name__) | CODE |
| LOW | torchtitan/experiments/rl/renderer.py | 16 | logger = logging.getLogger(__name__) | CODE |
| LOW | torchtitan/experiments/rl/__init__.py | 47 | __all__ = [ | CODE |
| LOW | torchtitan/experiments/rl/train.py | 38 | logger = logging.getLogger(__name__) | CODE |
| LOW | torchtitan/experiments/rl/batch_invariance.py | 22 | logger = logging.getLogger(__name__) | CODE |
| LOW | torchtitan/experiments/rl/losses/__init__.py | 10 | __all__ = ["DAPOLoss", "GRPOLoss"] | CODE |
| LOW⚡ | torchtitan/experiments/rl/tests/test_bitwise_parity.py | 93 | logger = logging.getLogger(__name__) | CODE |
| LOW | torchtitan/experiments/rl/tests/test_bitwise_parity.py | 188 | def _set_generator_determinism(debug) -> None: | CODE |
| LOW | torchtitan/experiments/rl/models/attention.py | 34 | logger = logging.getLogger(__name__) | CODE |
| LOW | …titan/experiments/rl/observability/metrics/__init__.py | 14 | __all__ = [ | CODE |
| LOW | …itan/experiments/rl/observability/metrics/processor.py | 30 | __all__ = [ | CODE |
| LOW | …rchtitan/experiments/rl/observability/metrics/types.py | 17 | __all__ = [ | CODE |
| LOW | torchtitan/experiments/rl/rollout/rollouter.py | 39 | logger = logging.getLogger(__name__) | CODE |
| LOW | torchtitan/experiments/rl/rollout/__init__.py | 17 | __all__ = [ | CODE |
| LOW | torchtitan/experiments/rl/components/batcher.py | 26 | logger = logging.getLogger(__name__) | CODE |
| LOW | torchtitan/experiments/rl/rubrics/__init__.py | 9 | __all__ = ["RewardFn", "Rubric", "RubricOutput"] | CODE |
| LOW | torchtitan/experiments/rl/examples/search_r1/rubric.py | 127 | __all__ = ["RewardExactMatch"] | CODE |
| LOW | torchtitan/experiments/rl/examples/search_r1/env.py | 26 | logger = logging.getLogger(__name__) | CODE |
| LOW | …rchtitan/experiments/rl/examples/search_r1/__init__.py | 15 | __all__ = [ | CODE |
| LOW | …htitan/experiments/rl/examples/alphabet_sort/rubric.py | 116 | __all__ = ["RewardAlphabetSort", "score_sorted_list"] | STRING |
| LOW | …itan/experiments/rl/examples/alphabet_sort/__init__.py | 18 | __all__ = [ | CODE |
| LOW | …rchtitan/experiments/rl/examples/dapo_math/__init__.py | 19 | __all__ = [ | CODE |
| LOW | torchtitan/experiments/rl/actors/generator.py | 69 | logger = logging.getLogger(__name__) | CODE |
| 51 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | …h_trace_compaction/scripts/compact_cuda_graph_trace.py | 182 | Extract measured GPU slices that have a profiler stream. Args: events: Trace event list. Returns: | STRING |
| HIGH | …h_trace_compaction/scripts/compact_cuda_graph_trace.py | 463 | Verify slice identity and non-overlap of every compacted lane. Args: original_events: Unmodified trace even | STRING |
| HIGH | …h_trace_compaction/scripts/compact_cuda_graph_trace.py | 747 | Remap GPU flows and annotations, and replace old stream metadata. Args: events: Events whose measured slice | STRING |
| HIGH | …h_trace_compaction/scripts/compact_cuda_graph_trace.py | 806 | Compact CUDA graph streams in a parsed PyTorch profiler trace. Args: trace: Parsed profiler trace. Ret | STRING |
| HIGH | torchtitan/distributed/utils.py | 580 | Clip the gradient norm of an iterable of parameters. Gradient norm clipping requires computing the gradient no | STRING |
| HIGH | torchtitan/distributed/parallel_dims.py | 337 | Get a device mesh by dimension name(s), returning None if not enabled. Args: dims: Names of the mes | STRING |
| HIGH | torchtitan/distributed/parallel_dims.py | 400 | Get a device mesh by dimension name(s), raising if not available. Args: dims: Names of the mesh dim | STRING |
| HIGH | torchtitan/distributed/pipeline_parallel.py | 580 | Create pipeline stages based on specified module names for each stage. Also used by Graph PP to split the model int | STRING |
| HIGH | torchtitan/distributed/context_parallel/api.py | 133 | Shard inputs and attention masks across the context parallel mesh. This function distributes input tensors acr | STRING |
| HIGH | …/experiments/transformers_modeling_backend/pipeline.py | 156 | This API creates pipeline stages based on specified module names for each stage. Some model restrictions inclu | STRING |
| HIGH | …itan/experiments/graph_trainer/graph_pp/split_di_dw.py | 156 | Split a backward graph into input-gradient and weight-gradient graphs. Contract: Input: backward(save | STRING |
| HIGH | torchtitan/experiments/graph_trainer/graph_pp/runner.py | 714 | Register GraphPP action handlers on a runtime PP schedule. Args: schedule (_PipelineScheduleRuntime): Runti | STRING |
| HIGH | …htitan/experiments/graph_trainer/graph_pp/partition.py | 445 | Partition a post-pass GraphTrainer joint graph into GraphPP callables. The caller passes a flat ``minimal_fx_tracer | STRING |
| HIGH | …ments/graph_trainer/graph_pp/split_fsdp_collectives.py | 95 | Split forward FSDP all-gather chains from a forward graph. Contract: unshard(param_shards_and_replicated_para | STRING |
| HIGH | …ments/graph_trainer/graph_pp/split_fsdp_collectives.py | 251 | Split backward FSDP/DDP/HSDP reduce-grad epilogues. Contract: bw_no_fsdp(original_backward_inputs) -> | STRING |
| HIGH | …/experiments/graph_trainer/graph_pp/graph_multiplex.py | 48 | Concatenate backward and forward graphs into one boxed GraphPP callable. Contract: ``OVERLAP_F_B`` schedule a | STRING |
| HIGH | torchtitan/experiments/torchft/diloco/utils.py | 19 | This API creates fragments based on specified module names for each fragment. This method updates the model in | STRING |
| HIGH | torchtitan/models/common/multimodal.py | 43 | Locate each visual item's placeholder run in the token sequence. Args: tokens: ``(T,)`` token IDs. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/unit_tests/cpu/test_set_determinism.py | 46 | # Create a world_mesh mock | COMMENT |
| MEDIUM⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 27 | # Create a simple model with parameters | COMMENT |
| MEDIUM⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 29 | # Create an optimizer | COMMENT |
| MEDIUM⚡ | tests/unit_tests/cpu/test_lr_scheduler.py | 36 | # Create an optimizer container | COMMENT |
| MEDIUM | tests/unit_tests/cpu/test_lr_scheduler.py | 49 | # Create a trainer config with the specified parameters | COMMENT |
| MEDIUM | tests/unit_tests/cpu/test_lr_scheduler.py | 86 | # Create a job config with 10 steps, 2 warmup steps, and linear decay | COMMENT |
| MEDIUM | tests/unit_tests/cpu/test_lr_scheduler.py | 129 | # Create a job config with 10 steps, 2 warmup steps, 3 stable steps, and 5 decay steps | COMMENT |
| MEDIUM | tests/unit_tests/cpu/test_lr_scheduler.py | 171 | # Create a job config with a minimum learning rate | COMMENT |
| MEDIUM | tests/unit_tests/cpu/test_lr_scheduler.py | 195 | # Create a job config where warmup steps > training steps | COMMENT |
| MEDIUM | tests/unit_tests/cpu/test_lr_scheduler.py | 232 | # Create a job config with 10 steps, 2 warmup steps, and no decay phase | COMMENT |
| MEDIUM | tests/unit_tests/cpu/test_lr_scheduler.py | 274 | # Create a job config where warmup + decay steps > training steps | COMMENT |
| MEDIUM | tests/unit_tests/cpu/test_checkpoint.py | 772 | # Create a fake model with freqs_cis and other parameters | COMMENT |
| MEDIUM | tests/assets/cc12m_test/pack_test_dataset.py | 23 | # Create a TarWriter object to write the dataset to a tar archive | COMMENT |
| MEDIUM⚡ | scripts/loss_compare.py | 350 | # Create the output folder | COMMENT |
| MEDIUM⚡ | scripts/loss_compare.py | 845 | # Create a test case | COMMENT |
| MEDIUM | …ripts/checkpoint_conversion/numerical_tests_example.py | 151 | # Define the set of outputs to test loss for | COMMENT |
| MEDIUM | .github/scripts/update_version.sh | 6 | # Create a variable named __version__ at the end of __init__.py | COMMENT |
| MEDIUM | torchtitan/distributed/activation_checkpoint.py | 7 | # This file provides the util functions to apply activation checkpointing to the model. | COMMENT |
| MEDIUM | torchtitan/distributed/pipeline_parallel.py | 489 | # Create a set of modules to keep for faster lookup | COMMENT |
| MEDIUM | …/experiments/transformers_modeling_backend/pipeline.py | 196 | # Create a set of modules to keep for faster lookup | COMMENT |
| MEDIUM | …chtitan/experiments/graph_trainer/tests/test_passes.py | 389 | # Create a second PG to simulate expert-FSDP. | COMMENT |
| MEDIUM | …experiments/graph_trainer/tests/test_custom_codegen.py | 206 | # Create main module | COMMENT |
| MEDIUM | torchtitan/experiments/torchft/manager.py | 199 | # Create the outer optimizer based on the inner optimizer parameters. | COMMENT |
| MEDIUM | torchtitan/experiments/torchft/diloco/utils.py | 48 | # Create a set of modules to keep for faster lookup | COMMENT |
| MEDIUM | torchtitan/experiments/rl/environment/token.py | 226 | # Create a new list to avoid mutating previous states | COMMENT |
| MEDIUM | torchtitan/models/common/moe.py | 184 | """This class implements token-choice routing. In token-choice top-K routing, each token is | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/unit_tests/cpu/test_tp_kv_heads_validation.py | 38 | except Exception: | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_tokenizer.py | 376 | except Exception as e: | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_tokenizer.py | 385 | except Exception as e: | CODE |
| LOW⚡ | tests/unit_tests/cpu/test_checkpoint.py | 957 | except Exception as e: | CODE |
| LOW | tests/integration_tests/run_tests.py | 456 | except Exception as e: | CODE |
| LOW | tests/integration_tests/run_tests.py | 468 | except Exception as e: | CODE |
| MEDIUM⚡ | scripts/loss_compare.py | 325 | log_print(f"Error: Import file does not exist: {import_result}") | CODE |
| MEDIUM⚡ | scripts/loss_compare.py | 346 | log_print(f"Error: Output folder '{output_folder}' already exists") | CODE |
| MEDIUM⚡ | scripts/loss_compare.py | 834 | log_print(f"Error: No {metric_name} values found in baseline") | CODE |
| MEDIUM⚡ | scripts/loss_compare.py | 838 | log_print(f"Error: No {metric_name} values found in test") | CODE |
| MEDIUM⚡ | scripts/loss_compare.py | 842 | log_print(f"Error: No {metric_name} values found in import file") | CODE |
| MEDIUM | scripts/loss_compare.py | 290 | log_print("Error: All settings are identical") | CODE |
| MEDIUM | scripts/loss_compare.py | 303 | log_print(f"Error: --steps must be a positive integer, got: {steps}") | CODE |
| MEDIUM | scripts/loss_compare.py | 308 | log_print("Error: --import-result requires --assert-equal") | CODE |
| MEDIUM | scripts/loss_compare.py | 788 | log_print("Error: baseline-only mode requires --import-result") | CODE |
| MEDIUM | scripts/loss_compare.py | 799 | log_print(f"Error: metric '{name}' missing from {other_name} results") | CODE |
| LOW | .github/scripts/todo_debt_tracker.py | 45 | except Exception: | CODE |
| LOW | .github/scripts/todo_debt_tracker.py | 116 | except Exception as e: | CODE |
| LOW | .github/scripts/todo_debt_tracker.py | 183 | except Exception: | CODE |
| LOW | .github/scripts/todo_debt_tracker.py | 303 | except Exception as e: | CODE |
| MEDIUM | .github/scripts/todo_debt_tracker.py | 304 | print(f"Error reading {file_path}: {e}", file=sys.stderr) | CODE |
| LOW | torchtitan/__init__.py | 11 | except Exception: | CODE |
| LOW | torchtitan/train.py | 59 | except Exception: | CODE |
| LOW | …tan/experiments/transformers_modeling_backend/model.py | 741 | except Exception as e: | CODE |
| LOW | …_moe_model/scripts/numerical_equivalence_pretrained.py | 47 | except Exception: | CODE |
| LOW | …_moe_model/scripts/numerical_equivalence_pretrained.py | 192 | except Exception as e: | CODE |
| LOW | …/skills/add_moe_model/scripts/numerical_equivalence.py | 572 | except Exception as e: | CODE |
| LOW | …/skills/add_moe_model/scripts/numerical_equivalence.py | 622 | except Exception as e: | CODE |
| LOW | torchtitan/experiments/graph_trainer/custom_codegen.py | 64 | except Exception: | CODE |
| LOW | torchtitan/experiments/graph_trainer/ep_pass_utils.py | 218 | except Exception: | CODE |
| LOW | torchtitan/experiments/graph_trainer/cpu_offload.py | 167 | except Exception: | CODE |
| LOW | torchtitan/experiments/graph_trainer/cpu_offload.py | 179 | except Exception: | CODE |
| LOW | …eriments/graph_trainer/log_activation_memory_policy.py | 73 | except Exception: | CODE |
| LOW | torchtitan/experiments/graph_trainer/graph_pp/utils.py | 221 | except Exception as exc: | CODE |
| LOW | torchtitan/experiments/graph_trainer/graph_pp/utils.py | 241 | except Exception as exc: | CODE |
| LOW | torchtitan/experiments/forge/example_train.py | 457 | except Exception: | CODE |
| LOW | torchtitan/experiments/rl/controller.py | 453 | except Exception: | CODE |
| LOW | torchtitan/experiments/rl/controller.py | 458 | except Exception: | CODE |
| LOW⚡ | torchtitan/experiments/rl/controller.py | 476 | except Exception: | CODE |
| LOW⚡ | torchtitan/experiments/rl/controller.py | 481 | except Exception: | CODE |
| LOW⚡ | torchtitan/experiments/rl/controller.py | 487 | except Exception: | CODE |
| LOW | torchtitan/experiments/rl/controller.py | 984 | except Exception: | CODE |
| LOW | …/experiments/rl/observability/vllm_otel_stat_logger.py | 269 | except Exception as e: | CODE |
| LOW | …/experiments/rl/observability/vllm_otel_stat_logger.py | 374 | except Exception as e: | CODE |
| LOW | …itan/experiments/rl/observability/metrics/processor.py | 212 | except Exception: | CODE |
| LOW | …itan/experiments/rl/observability/metrics/processor.py | 223 | except Exception: | CODE |
| LOW | torchtitan/experiments/rl/rollout/rollouter.py | 435 | except Exception: | CODE |
| LOW | torchtitan/experiments/rl/examples/search_r1/env.py | 90 | except Exception as exc: | CODE |
| LOW | torchtitan/experiments/rl/actors/generator.py | 1218 | except Exception as exc: | CODE |
| LOW | torchtitan/experiments/rl/actors/generator.py | 1412 | except Exception: | CODE |
| MEDIUM | torchtitan/experiments/rl/scripts/loss_compare.py | 293 | log_print("Error: no losses found in TensorBoard events") | CODE |
| LOW | torchtitan/experiments/rl/environment/token.py | 165 | except Exception: | CODE |
| LOW | torchtitan/observability/structured_logger/README.md | 147 | except Exception: | CODE |
| LOW | torchtitan/components/metrics.py | 438 | except Exception as e: | CODE |
| LOW | torchtitan/components/data/loader.py | 173 | except Exception: | CODE |
| LOW | torchtitan/components/checkpointer/base.py | 58 | except Exception as error: | CODE |
| LOW | torchtitan/hf_datasets/multimodal/utils/video.py | 93 | except Exception as e: | CODE |
| LOW | torchtitan/hf_datasets/multimodal/utils/image.py | 275 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | run_train.sh | 1 | #!/usr/bin/bash | COMMENT |
| LOW | .ci/docker/common/utils.sh | 1 | #!/bin/bash | COMMENT |
| LOW | .ci/docker/common/install_deepep.sh | 1 | #!/bin/bash | COMMENT |
| LOW | tests/__init__.py | 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. | COMMENT |
| LOW | tests/unit_tests/__init__.py | 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. | COMMENT |
| LOW | tests/unit_tests/gpu/__init__.py | 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. | COMMENT |
| LOW | tests/unit_tests/gpu/flex_shard/__init__.py | 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. | COMMENT |
| LOW | tests/unit_tests/cpu/__init__.py | 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. | COMMENT |
| LOW | tests/unit_tests/cpu/flex_shard/__init__.py | 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. | COMMENT |
| LOW | tests/unit_tests/cpu/observability/__init__.py | 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. | COMMENT |
| LOW | …skills/numerics_debugging/scripts/activation_tracer.py | 81 | on ``input_hashes`` / ``output_hash`` for comparison. | COMMENT |
| LOW | …skills/numerics_debugging/scripts/activation_tracer.py | 201 | # Indexing | COMMENT |
| LOW | …skills/numerics_debugging/scripts/activation_tracer.py | 561 | record_ids=True, | COMMENT |
| LOW | …skills/numerics_debugging/scripts/activation_tracer.py | 641 | # through to the metadata block below. | COMMENT |
| LOW | …/skills/numerics_debugging/scripts/compare_numerics.py | 61 | stats: dict[str, str] = field(default_factory=dict) | COMMENT |
| LOW | …/skills/numerics_debugging/scripts/compare_numerics.py | 181 | COMMENT | |
| LOW | …/skills/numerics_debugging/scripts/compare_numerics.py | 661 | # log_tensor_hashes. Comma-separated lists of floats — we | COMMENT |
| LOW | .github/workflows/set-matrix.yaml | 81 | # Temporarily disable ROCm CI while the ROCm jobs are red. | COMMENT |
| LOW | .github/workflows/set-matrix.yaml | 101 | # "index-url": "https://download.pytorch.org/whl/nightly/rocm7.2", | COMMENT |
| LOW | .github/scripts/run_8xgpu_integration_tests.sh | 1 | #!/bin/bash | COMMENT |
| LOW | torchtitan_recipes/__init__.py | 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. | COMMENT |
| LOW | torchtitan/tools/utils.py | 201 | # data from https://www.amd.com/en/products/accelerators/instinct/mi200/mi250x.html (per GCD) | COMMENT |
| LOW | torchtitan/distributed/linear.py | 161 | # AG(X_k.T) @ dY produces dW.T. This mirrors the usual AG-linear wgrad | COMMENT |
| LOW | torchtitan/distributed/deepep/deepep.py | 81 | # ElasticBuffer.dispatch/combine are not autograd-aware. We wrap them in | COMMENT |
| LOW | torchtitan/config/manager.py | 281 | ) | COMMENT |
| LOW | …tan/experiments/transformers_modeling_backend/model.py | 741 | except Exception as e: | COMMENT |
| LOW | …rmers_modeling_backend/tests/test_flex_cp_numerical.py | 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. | COMMENT |
| LOW | …iments/transformers_modeling_backend/tests/__init__.py | 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. | COMMENT |
| LOW | …s/transformers_modeling_backend/tests/run_moe_tests.sh | 1 | #!/bin/bash | COMMENT |
| LOW | torchtitan/experiments/graph_trainer/make_fx_tracer.py | 481 | # engine dispatches backward to a worker thread that has a | COMMENT |
| LOW | torchtitan/experiments/graph_trainer/__init__.py | 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. | COMMENT |
| LOW | …itan/experiments/graph_trainer/run_train_precompile.sh | 1 | #!/usr/bin/bash | COMMENT |
| LOW | torchtitan/experiments/graph_trainer/inductor_passes.py | 201 | raise ValueError( | COMMENT |
| LOW | torchtitan/experiments/graph_trainer/tests/__init__.py | 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. | COMMENT |
| LOW | …n/experiments/graph_trainer/tests/integration_tests.py | 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. | COMMENT |
| LOW | …n/experiments/graph_trainer/tests/integration_tests.py | 721 | COMMENT | |
| LOW | torchtitan/experiments/torchft/tests/__init__.py | 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. | COMMENT |
| LOW | torchtitan/experiments/rl/controller.py | 641 | ) | COMMENT |
| LOW | torchtitan/experiments/rl/tests/__init__.py | 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. | COMMENT |
| LOW | torchtitan/experiments/rl/tests/integration_tests.py | 121 | ), | COMMENT |
| LOW | torchtitan/experiments/rl/models/attention.py | 141 | # absent). Re-read live per-layer metadata + kv_cache from the forward context | COMMENT |
| LOW | torchtitan/experiments/rl/models/vllm_wrapper.py | 381 | ) | COMMENT |
| LOW | torchtitan/experiments/rl/observability/__init__.py | 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. | COMMENT |
| LOW | torchtitan/experiments/rl/components/__init__.py | 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. | COMMENT |
| LOW | torchtitan/experiments/rl/examples/__init__.py | 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. | COMMENT |
| LOW | torchtitan/experiments/rl/actors/generator.py | 1341 | # state_dict() returns hook-produced copies for fused modules (e.g. | COMMENT |
| LOW | torchtitan/experiments/rl/scripts/__init__.py | 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. | COMMENT |
| LOW | torchtitan/models/kimi_k2_7/config_registry.py | 521 | # Fail during config parsing, before TP/FSDP creates _StridedShard | COMMENT |
| LOW | torchtitan/models/flux/model/model.py | 81 | # Correction 1: DoubleStreamBlocks have symmetric img/txt streams; | COMMENT |
| LOW | torchtitan/models/common/attention.py | 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. | COMMENT |
| LOW | torchtitan/models/muse_glimmer/model.py | 441 | with multimodal_context(): | COMMENT |
| LOW | torchtitan/observability/__init__.py | 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. | COMMENT |
| LOW | torchtitan/components/optimizer/lr_scheduler.py | 221 | COMMENT | |
| LOW | torchtitan/components/quantization/__init__.py | 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. | COMMENT |
| LOW | torchtitan/components/quantization/nvfp4.py | 161 | self, | COMMENT |
| LOW | torchtitan/hf_datasets/__init__.py | 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. | COMMENT |
| LOW | torchtitan/hf_datasets/multimodal/__init__.py | 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. | COMMENT |
| LOW | torchtitan/ops/__init__.py | 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | torchtitan/experiments/graph_trainer/fsdp_passes.py | 91 | for placeholder in gm.graph.find_nodes(op="placeholder"): | CODE |
| LOW | torchtitan/experiments/graph_trainer/fsdp_passes.py | 130 | if n.all_input_nodes[0].op == "placeholder": | CODE |
| LOW | torchtitan/experiments/graph_trainer/fsdp_passes.py | 1120 | if n in visited or n.op in ("placeholder", "get_attr"): | CODE |
| LOW | torchtitan/experiments/graph_trainer/ep_pass_utils.py | 312 | or node.op != "placeholder" | CODE |
| LOW | torchtitan/experiments/graph_trainer/ep_pass_utils.py | 329 | if node.op != "placeholder" or (val := tensor_meta(node)) is None: | CODE |
| LOW | torchtitan/experiments/graph_trainer/memory_policy.py | 70 | for node in gm.graph.find_nodes(op="placeholder"): | CODE |
| LOW⚡ | torchtitan/experiments/graph_trainer/inductor_passes.py | 64 | if node.op == "placeholder" and "val" in node.meta: | CODE |
| LOW⚡ | torchtitan/experiments/graph_trainer/inductor_passes.py | 80 | if node.op == "placeholder": | CODE |
| LOW⚡ | torchtitan/experiments/graph_trainer/inductor_passes.py | 101 | original_placeholders = list(gm.graph.find_nodes(op="placeholder")) | CODE |
| LOW⚡ | torchtitan/experiments/graph_trainer/inductor_passes.py | 110 | if node.op == "placeholder": | CODE |
| LOW | torchtitan/experiments/graph_trainer/inductor_passes.py | 383 | if node.op in ("placeholder", "output"): | CODE |
| LOW | torchtitan/experiments/graph_trainer/ep_chunk_pass.py | 573 | if node.op != "placeholder": | CODE |
| LOW | torchtitan/experiments/graph_trainer/ep_chunk_pass.py | 2315 | for idx, node in enumerate(n for n in gm.graph.nodes if n.op == "placeholder") | CODE |
| LOW⚡ | torchtitan/experiments/graph_trainer/ep_overlap_pass.py | 81 | _GRAPH_BOUNDARY_OPS = {"placeholder", "get_attr"} | CODE |
| LOW | torchtitan/experiments/graph_trainer/debug_utils.py | 34 | if node.op == "placeholder": | CODE |
| LOW | …n/experiments/graph_trainer/tests/test_trace_module.py | 89 | if node.op != "placeholder": | CODE |
| LOW | …n/experiments/graph_trainer/tests/test_trace_module.py | 172 | if node.op == "placeholder" | CODE |
| LOW | …n/experiments/graph_trainer/tests/test_trace_module.py | 427 | if node.op == "placeholder" | CODE |
| LOW | …n/experiments/graph_trainer/tests/test_trace_module.py | 451 | if node.op == "placeholder" | CODE |
| LOW | …n/experiments/graph_trainer/tests/test_trace_module.py | 472 | if node.op == "placeholder" | CODE |
| LOW | …chtitan/experiments/graph_trainer/tests/test_passes.py | 2132 | self.assertEqual(node.args[0].op, "placeholder") | CODE |
| LOW | …chtitan/experiments/graph_trainer/tests/test_passes.py | 5481 | if node.op == "placeholder": | CODE |
| LOW | …chtitan/experiments/graph_trainer/tests/test_passes.py | 5588 | if node.op == "placeholder": | CODE |
| LOW | …chtitan/experiments/graph_trainer/tests/test_passes.py | 5607 | self.assertEqual(node.args[0].op, "placeholder") | CODE |
| LOW | …chtitan/experiments/graph_trainer/tests/test_passes.py | 5685 | self.assertEqual(relu_node.args[0].op, "placeholder") | CODE |
| LOW | …chtitan/experiments/graph_trainer/tests/test_passes.py | 5784 | if node.op == "placeholder": | CODE |
| LOW | …chtitan/experiments/graph_trainer/tests/test_passes.py | 5884 | if node.op == "placeholder": | CODE |
| LOW | …chtitan/experiments/graph_trainer/tests/test_passes.py | 5925 | if node.op == "placeholder": | CODE |
| LOW | …chtitan/experiments/graph_trainer/tests/test_passes.py | 6255 | node.target for node in compile_gm.graph.find_nodes(op="placeholder") | CODE |
| LOW | …chtitan/experiments/graph_trainer/tests/test_passes.py | 6258 | node.meta for node in compile_gm.graph.find_nodes(op="placeholder") | CODE |
| LOW | …chtitan/experiments/graph_trainer/tests/test_passes.py | 6295 | node.target for node in wrapped.graph.find_nodes(op="placeholder") | CODE |
| LOW | …xperiments/graph_trainer/tests/test_graph_pp_runner.py | 479 | for node in gm.graph.find_nodes(op="placeholder"): | CODE |
| LOW | …xperiments/graph_trainer/tests/test_graph_pp_runner.py | 636 | bw_gm.graph.find_nodes(op="placeholder")[0].meta["val"] = bw_fake | CODE |
| LOW | …xperiments/graph_trainer/tests/test_graph_pp_runner.py | 637 | fw_gm.graph.find_nodes(op="placeholder")[0].meta["val"] = fw_fake | CODE |
| LOW | …xperiments/graph_trainer/tests/test_graph_pp_runner.py | 652 | placeholders = multiplexed.graph.find_nodes(op="placeholder") | CODE |
| LOW | …xperiments/graph_trainer/tests/test_graph_pp_runner.py | 696 | fw_gm.graph.find_nodes(op="placeholder")[0].meta["val"] = fw_fake | CODE |
| LOW⚡ | …xperiments/graph_trainer/tests/test_graph_pp_passes.py | 659 | sharded_param = gm.graph.find_nodes(op="placeholder")[0] | CODE |
| LOW | …xperiments/graph_trainer/tests/test_graph_pp_passes.py | 534 | return tuple(node.name for node in gm.graph.find_nodes(op="placeholder")) | CODE |
| LOW | …itan/experiments/graph_trainer/graph_pp/split_di_dw.py | 200 | for placeholder in list(bw_gm.graph.find_nodes(op="placeholder")): | CODE |
| LOW | …itan/experiments/graph_trainer/graph_pp/split_di_dw.py | 215 | placeholders = list(bw_gm.graph.find_nodes(op="placeholder")) | CODE |
| LOW⚡ | …htitan/experiments/graph_trainer/graph_pp/partition.py | 197 | for node in gm.graph.find_nodes(op="placeholder"): | CODE |
| LOW | …htitan/experiments/graph_trainer/graph_pp/partition.py | 320 | if mutated_base.op != "placeholder" and mutated_base in backward_nodes: | CODE |
| LOW | …htitan/experiments/graph_trainer/graph_pp/partition.py | 348 | and node.op == "placeholder" | CODE |
| LOW | …htitan/experiments/graph_trainer/graph_pp/partition.py | 475 | placeholders = list(joint.graph.find_nodes(op="placeholder")) | CODE |
| LOW | torchtitan/experiments/graph_trainer/graph_pp/utils.py | 289 | return tuple(node.name for node in gm.graph.find_nodes(op="placeholder")) | CODE |
| LOW | torchtitan/experiments/graph_trainer/graph_pp/utils.py | 322 | return {node for node in node_closure(values) if node.op == "placeholder"} | CODE |
| LOW⚡ | torchtitan/experiments/graph_trainer/graph_pp/utils.py | 386 | if node.op != "placeholder": | CODE |
| LOW⚡ | torchtitan/experiments/graph_trainer/graph_pp/utils.py | 399 | for node in gm.graph.find_nodes(op="placeholder"): | CODE |
| LOW | …an/experiments/graph_trainer/graph_pp/graph_builder.py | 384 | placeholders = self.modules.fw.graph.find_nodes(op="placeholder") | CODE |
| LOW | …an/experiments/graph_trainer/graph_pp/graph_builder.py | 750 | if node.op == "placeholder": | CODE |
| LOW | …ments/graph_trainer/graph_pp/split_fsdp_collectives.py | 132 | placeholders = graph.find_nodes(op="placeholder") | CODE |
| LOW | …ments/graph_trainer/graph_pp/split_fsdp_collectives.py | 288 | placeholders = graph.find_nodes(op="placeholder") | CODE |
| LOW | …/experiments/graph_trainer/graph_pp/graph_multiplex.py | 104 | fw_placeholders = multiplexed_gm.graph.find_nodes(op="placeholder") | CODE |
| LOW | …/experiments/graph_trainer/graph_pp/graph_multiplex.py | 109 | for node in bw_gm.graph.find_nodes(op="placeholder"): | CODE |
| LOW | …/experiments/graph_trainer/graph_pp/graph_multiplex.py | 121 | (node for node in multiplexed_gm.graph.nodes if node.op != "placeholder"), | CODE |
| LOW | …/experiments/graph_trainer/graph_pp/graph_multiplex.py | 128 | bw_nodes = dropwhile(lambda node: node.op == "placeholder", bw_nodes) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/unit_tests/cpu/test_override.py | 477 | parse_cli_imports(['mod={"block_size": 256, "flag": null}']), | CODE |
| HIGH | …/skills/numerics_debugging/scripts/compare_numerics.py | 1016 | const hidden = el.dataset.hideByCategory || el.dataset.hideByOpFilter; | CODE |
| HIGH | …/skills/numerics_debugging/scripts/compare_numerics.py | 1028 | let _opFilterTimer = null; | CODE |
| HIGH | …/skills/numerics_debugging/scripts/compare_numerics.py | 1037 | let re = null; | CODE |
| HIGH | scripts/loss_compare.py | 482 | log_print(" - To commit: git add -A && git commit -m 'message'") | CODE |
| HIGH⚡ | …ripts/checkpoint_conversion/numerical_tests_qwen3_5.py | 53 | """KL(softmax(b) || softmax(a)) — F.kl_div(log Q, P) computes KL(P || Q).""" | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | run_train.sh | 19 | # Set RANK to simulate a nonzero global rank, for example RANK=16. | COMMENT |
| LOW | tests/unit_tests/cpu/test_checkpoint.py | 113 | # Check if this is async_with_pinned_mem mode by looking for async_stager parameter | COMMENT |
| LOW | tests/unit_tests/cpu/test_checkpoint.py | 713 | cfg.interval = 10 # Set interval to 10 so step 1 wouldn't normally trigger save | CODE |
| LOW | tests/assets/cc12m_test/pack_test_dataset.py | 38 | # Write the file and its metadata to the TarWriter | COMMENT |
| LOW⚡ | scripts/loss_compare.py | 344 | # Check if output folder already exists | COMMENT |
| LOW | scripts/loss_compare.py | 760 | # Check if losses were extracted successfully | COMMENT |
| LOW | scripts/loss_compare.py | 1241 | # Check if git working directory is clean before switching commits | COMMENT |
| LOW | torchtitan/config/manager.py | 221 | # Check if we are using tokenizer.model, if so then we need to alert users to redownload the tokenizer | COMMENT |
| LOW | …chtitan/experiments/torchft/tests/integration_tests.py | 105 | # Check if we have enough GPUs | COMMENT |
| LOW | torchtitan/experiments/rl/generate.py | 246 | # Print results | COMMENT |
| LOW | torchtitan/experiments/rl/actors/generator.py | 1106 | # Add the request to the queue; the engine loop will admit + process it. | COMMENT |
| LOW | torchtitan/experiments/rl/actors/trainer.py | 275 | # Check if the requested context exceeds the model context length. | COMMENT |
| LOW | torchtitan/models/flux/validate.py | 147 | # Set model to eval mode | COMMENT |
| LOW | torchtitan/models/flux/model/state_dict_adapter.py | 38 | # Check if safetensors index file exists | COMMENT |
| LOW | torchtitan/components/metrics.py | 219 | # Check if the loss-visible rank is included in LOG_RANK environment variable | COMMENT |
| LOW | torchtitan/components/metrics.py | 390 | # Check if any logging backend is enabled | COMMENT |
| LOW | torchtitan/components/loss.py | 602 | # Check if it's training model or validation mode | COMMENT |
| LOW | torchtitan/components/validate.py | 148 | # Set model to eval mode | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/unit_tests/gpu/test_helion_rope.py | 31 | # tests below stay robust if a sibling test (e.g. test_override.py) calls | COMMENT |
| MEDIUM | tests/unit_tests/cpu/test_tokenizer.py | 178 | # 2. Compare vocabularies with more comprehensive sampling | COMMENT |
| MEDIUM | tests/unit_tests/cpu/test_tokenizer.py | 203 | # Test a random sample of tokens (more comprehensive than just common words) | COMMENT |
| MEDIUM | torchtitan/experiments/rl/routing/strategies.py | 189 | # easy to implement, but not robust for all scenarios. Revisit with an | COMMENT |
| MEDIUM | torchtitan/experiments/rl/routing/strategies.py | 190 | # more robust approach. | COMMENT |
| MEDIUM | torchtitan/components/tokenizer.py | 371 | # Process added_tokens_decoder (comprehensive special token definitions) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | …htitan/experiments/graph_trainer/llama3/parallelize.py | 0 | token count {training.num_tokens_per_microbatch_per_dp_rank} must be divisible by the product of tp degree ({parallel_di | STRING |
| HIGH | …chtitan/experiments/graph_trainer/qwen3/parallelize.py | 0 | token count {training.num_tokens_per_microbatch_per_dp_rank} must be divisible by the product of tp degree ({parallel_di | STRING |
| HIGH | …n/experiments/graph_trainer/deepseek_v3/parallelize.py | 0 | token count {training.num_tokens_per_microbatch_per_dp_rank} must be divisible by the product of tp degree ({parallel_di | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/unit_tests/gpu/test_qwen3_5_deltanet.py | 217 | CODE | |
| LOW | torchtitan/distributed/flex_shard/dist_muon.py | 271 | CODE | |
| LOW | …periments/transformers_modeling_backend/parallelize.py | 232 | CODE | |
| LOW | …formers_modeling_backend/tests/test_moe_parallelism.py | 79 | CODE | |
| LOW | …formers_modeling_backend/tests/test_moe_parallelism.py | 115 | CODE | |
| LOW | torchtitan/experiments/graph_trainer/simple_fsdp.py | 250 | CODE | |
| LOW | …ents/graph_trainer/tests/test_bitwise_deterministic.py | 185 | CODE | |
| LOW | …experiments/graph_trainer/tests/_trainer_test_utils.py | 23 | CODE | |
| LOW | torchtitan/models/llama3/model.py | 53 | CODE | |
| LOW | torchtitan/models/common/decoder.py | 308 | CODE | |
| LOW | torchtitan/models/muse_glimmer/__init__.py | 267 | CODE | |
| LOW | torchtitan/models/muse_glimmer/model.py | 190 | CODE | |
| LOW | torchtitan/hf_datasets/multimodal/utils/image.py | 200 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | torchtitan/experiments/rl/examples/search_r1/README.md | 1 | # Search-R1: multi-turn retrieval-augmented GRPO | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | torchtitan/experiments/rl/actors/generator.py | 674 | # The loop now executes the decision. In this example: STEP. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …s/transformers_modeling_backend/tests/run_moe_tests.sh | 4 | # Usage: | COMMENT |