Pretrain, finetune ANY AI model of ANY size on 1 or 10,000+ GPUs with zero code changes.
This report presents the forensic synthetic code analysis of Lightning-AI/pytorch-lightning, a Python project with 31,237 GitHub stars. SynthScan v2.0 examined 151,972 lines of code across 758 source files, recording 3563 pattern matches distributed across 17 syntactic categories. The overall adjusted score of 27.7 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 3563 distinct pattern matches across 17 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/parity_fabric/conftest.py | 21 | def reset_deterministic_algorithm(): | CODE |
| LOW | tests/parity_fabric/test_parity_simple.py | 128 | def test_parity_single_device(precision, accelerator): | CODE |
| LOW⚡ | tests/tests_fabric/test_connector.py | 270 | def test_precision_and_precision_plugin_raises(): | CODE |
| LOW⚡ | tests/tests_fabric/test_connector.py | 277 | def test_interactive_compatible_dp_strategy_gpu(_, __, monkeypatch): | CODE |
| LOW⚡ | tests/tests_fabric/test_connector.py | 284 | def test_interactive_compatible_strategy_ddp_fork(monkeypatch): | CODE |
| LOW⚡ | tests/tests_fabric/test_connector.py | 319 | def test_strategy_choice_multi_node_gpu(_, strategy, strategy_class, devices): | CODE |
| LOW⚡ | tests/tests_fabric/test_connector.py | 324 | def test_num_nodes_input_validation(): | CODE |
| LOW⚡ | tests/tests_fabric/test_connector.py | 332 | def test_cuda_accelerator_can_not_run_on_system(_): | CODE |
| LOW⚡ | tests/tests_fabric/test_connector.py | 382 | def test_accelerator_gpu_with_devices(devices, strategy_class): | CODE |
| LOW⚡ | tests/tests_fabric/test_connector.py | 390 | def test_accelerator_auto_with_devices_gpu(): | CODE |
| LOW⚡ | tests/tests_fabric/test_connector.py | 396 | def test_set_devices_if_none_cpu(): | CODE |
| LOW⚡ | tests/tests_fabric/test_connector.py | 402 | def test_unsupported_strategy_types_on_cpu_and_fallback(): | CODE |
| LOW⚡ | tests/tests_fabric/test_connector.py | 448 | def test_strategy_choice_gpu_str(strategy, strategy_class): | CODE |
| LOW⚡ | tests/tests_fabric/test_connector.py | 453 | def test_device_type_when_strategy_instance_cpu_passed(): | CODE |
| LOW⚡ | tests/tests_fabric/test_connector.py | 460 | def test_device_type_when_strategy_instance_gpu_passed(): | CODE |
| LOW⚡ | tests/tests_fabric/test_connector.py | 467 | def test_validate_precision_type(precision): | CODE |
| LOW⚡ | tests/tests_fabric/test_connector.py | 776 | def test_gpu_accelerator_backend_choice(expected_accelerator_flag, expected_accelerator_class): | CODE |
| LOW⚡ | tests/tests_fabric/test_connector.py | 784 | def test_gpu_accelerator_backend_choice_cuda(*_): | CODE |
| LOW⚡ | tests/tests_fabric/test_connector.py | 793 | def test_gpu_accelerator_backend_choice_mps(*_: object) -> object: | CODE |
| LOW⚡ | tests/tests_fabric/test_connector.py | 801 | def test_gpu_accelerator_no_gpu_backend_found_error(*_): | CODE |
| LOW⚡ | tests/tests_fabric/test_connector.py | 884 | def test_precision_selection_model_parallel(_, precision, raises): | CODE |
| LOW⚡ | tests/tests_fabric/test_connector.py | 890 | def test_bitsandbytes_precision_cuda_required(monkeypatch): | CODE |
| LOW⚡ | tests/tests_fabric/test_connector.py | 899 | def test_strategy_str_passed_being_case_insensitive(_, strategy, strategy_cls): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 81 | def test_accelerator_choice_tpu(accelerator, devices, tpu_available, monkeypatch): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 95 | def test_strategy_choice_ddp_on_cpu(): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 100 | def _test_strategy_choice_ddp_and_cpu(ddp_strategy_class): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 124 | def test_custom_cluster_environment_in_slurm_environment(_): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 133 | def creates_processes_externally(self) -> bool: | CODE |
| LOW | tests/tests_fabric/test_connector.py | 247 | def test_fallback_from_ddp_spawn_to_ddp_on_cluster(_, __, env_vars, expected_environment): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 257 | def test_interactive_incompatible_backend_error(_, monkeypatch): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 300 | def test_invalid_ddp_strategy_with_mps(accelerator, strategy, strategy_class): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 346 | def test_tpu_accelerator_can_not_run_on_system(_): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 353 | def test_accelerator_invalid_type_devices(_, device_count): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 371 | def test_accelerator_cpu_with_devices(devices, strategy_class): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 415 | def test_invalid_accelerator_choice(): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 421 | def test_invalid_strategy_choice(invalid_strategy): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 433 | def test_strategy_choice_cpu_str(strategy, strategy_class): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 491 | def test_precision_conversion(patch1, patch2, precision, expected_precision, should_warn): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 504 | def test_multi_device_default_strategy(): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 513 | def test_strategy_choice_ddp_spawn_cpu(): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 524 | def test_strategy_choice_ddp_fork_in_interactive(): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 536 | def test_strategy_choice_ddp_fork_cpu(): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 558 | def test_strategy_choice_ddp_spawn(*_): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 570 | def test_strategy_choice_ddp_slurm(_, strategy, job_name, expected_env): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 606 | def test_strategy_choice_ddp_torchelastic(*_): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 627 | def test_torchelastic_priority_over_slurm(*_): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 648 | def test_strategy_choice_ddp_kubeflow(*_): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 667 | def test_strategy_choice_ddp_cpu_kubeflow(): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 689 | def test_strategy_choice_ddp_cpu_slurm(strategy): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 699 | def test_unsupported_tpu_choice(_, tpu_available): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 715 | def test_connector_with_tpu_accelerator_instance(tpu_available, monkeypatch): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 729 | def test_devices_auto_choice_mps(): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 741 | def test_parallel_devices_in_strategy_conflict_with_accelerator(parallel_devices, accelerator): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 757 | def test_plugin_only_one_instance_for_one_type(plugins, expected): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 764 | def test_passing_zero_and_empty_list_to_devices_flag(accelerator, devices): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 812 | def test_ddp_fork_on_unsupported_platform(_, __, strategy): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 861 | def test_precision_selection_amp_ddp(strategy, devices, is_custom_plugin, plugin_cls): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 915 | def test_precision_from_environment(_, precision, expected): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 938 | def test_accelerator_strategy_from_environment(accelerator, strategy, expected_accelerator, expected_strategy): | CODE |
| LOW | tests/tests_fabric/test_connector.py | 953 | def test_devices_from_environment(*_): | CODE |
| 2119 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .codecov.yml | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | .pre-commit-config.yaml | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | pyproject.toml | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | .readthedocs.yml | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | setup.py | 1 | #!/usr/bin/env python | COMMENT |
| LOW | tests/parity_fabric/test_parity_ddp.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/parity_fabric/conftest.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/parity_fabric/models.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/parity_fabric/run_standalone_tasks.sh | 1 | #!/bin/bash | COMMENT |
| LOW | tests/parity_fabric/utils.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/parity_fabric/test_parity_simple.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/test_connector.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/conftest.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/test_fabric.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/test_wrappers.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/test_cli.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/loggers/test_tensorboard.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/loggers/test_csv.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/accelerators/test_mps.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/accelerators/test_registry.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/accelerators/test_cpu.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/accelerators/test_xla.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/accelerators/test_cuda.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | …sts/tests_fabric/plugins/environments/test_kubeflow.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | …ts/tests_fabric/plugins/environments/test_lightning.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | …tests_fabric/plugins/environments/test_torchelastic.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/plugins/environments/test_lsf.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/plugins/environments/test_xla.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/plugins/environments/test_slurm.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/plugins/environments/test_mpi.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | …ts_fabric/plugins/precision/test_double_integration.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/plugins/precision/test_amp.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/plugins/precision/test_half.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/plugins/precision/test_fsdp.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/plugins/precision/test_double.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | …ts_fabric/plugins/precision/test_transformer_engine.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | …ts/tests_fabric/plugins/precision/test_bitsandbytes.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/plugins/precision/test_deepspeed.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | …tests_fabric/plugins/precision/test_xla_integration.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/plugins/precision/test_xla.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | …fabric/plugins/precision/test_deepspeed_integration.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | …tests_fabric/plugins/precision/test_amp_integration.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/strategies/test_registry.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/strategies/test_xla_fsdp.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/strategies/test_strategy.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/strategies/test_fsdp.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/strategies/test_ddp.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | …s/tests_fabric/strategies/test_xla_fsdp_integration.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/strategies/test_dp.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/strategies/test_deepspeed.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/strategies/test_xla.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/strategies/test_model_parallel.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | …/tests_fabric/strategies/test_deepspeed_integration.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/strategies/test_single_device.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | …s_fabric/strategies/test_model_parallel_integration.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/strategies/test_ddp_integration.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | tests/tests_fabric/strategies/test_fsdp_integration.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | …_fabric/strategies/launchers/test_subprocess_script.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | …ts_fabric/strategies/launchers/test_multiprocessing.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| LOW | …rategies/launchers/test_multiprocessing_integration.py | 1 | # Copyright The Lightning AI team. | COMMENT |
| 449 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/tests_pytorch/accelerators/test_cpu.py | 9 | CODE | |
| LOW | tests/tests_pytorch/strategies/test_ddp_integration.py | 24 | CODE | |
| LOW | tests/tests_pytorch/utilities/test_imports.py | 31 | CODE | |
| LOW | …ests_pytorch/utilities/test_deepspeed_model_summary.py | 19 | CODE | |
| LOW | tests/tests_pytorch/helpers/__init__.py | 1 | CODE | |
| LOW | tests/tests_pytorch/helpers/__init__.py | 1 | CODE | |
| LOW | tests/tests_pytorch/helpers/__init__.py | 1 | CODE | |
| LOW | tests/tests_pytorch/helpers/__init__.py | 1 | CODE | |
| LOW | tests/tests_pytorch/helpers/__init__.py | 7 | CODE | |
| LOW | …s_pytorch/trainer/logging_/test_distributed_logging.py | 18 | CODE | |
| LOW | requirements/pytorch/check-avail-extras.py | 2 | CODE | |
| LOW | requirements/pytorch/check-avail-extras.py | 3 | CODE | |
| LOW | requirements/pytorch/check-avail-extras.py | 4 | CODE | |
| LOW | requirements/pytorch/check-avail-extras.py | 5 | CODE | |
| LOW | requirements/pytorch/check-avail-extras.py | 6 | CODE | |
| LOW | docs/source-pytorch/conf.py | 17 | CODE | |
| LOW | docs/source-fabric/conf.py | 13 | CODE | |
| LOW | examples/fabric/reinforcement_learning/rl/utils.py | 11 | CODE | |
| LOW | examples/fabric/reinforcement_learning/rl/utils.py | 11 | CODE | |
| LOW | src/lightning/__init__.py | 16 | CODE | |
| LOW | src/lightning/__init__.py | 17 | CODE | |
| LOW | src/lightning/__init__.py | 18 | CODE | |
| LOW | src/lightning/__init__.py | 19 | CODE | |
| LOW | src/lightning/__init__.py | 20 | CODE | |
| LOW | src/lightning/__init__.py | 21 | CODE | |
| LOW | src/lightning/__init__.py | 21 | CODE | |
| LOW | src/lightning/__init__.py | 22 | CODE | |
| LOW | src/lightning/fabric/fabric.py | 79 | CODE | |
| LOW | src/lightning/fabric/__init__.py | 35 | CODE | |
| LOW | src/lightning/fabric/__init__.py | 36 | CODE | |
| LOW | src/lightning/fabric/__init__.py | 38 | CODE | |
| LOW | src/lightning/fabric/__init__.py | 41 | CODE | |
| LOW | src/lightning/fabric/__init__.py | 10 | CODE | |
| LOW | src/lightning/fabric/__init__.py | 12 | CODE | |
| LOW | src/lightning/fabric/__init__.py | 14 | CODE | |
| LOW | src/lightning/fabric/loggers/__init__.py | 13 | CODE | |
| LOW | src/lightning/fabric/loggers/__init__.py | 14 | CODE | |
| LOW | src/lightning/fabric/loggers/__init__.py | 15 | CODE | |
| LOW | src/lightning/fabric/accelerators/__init__.py | 16 | CODE | |
| LOW | src/lightning/fabric/accelerators/__init__.py | 17 | CODE | |
| LOW | src/lightning/fabric/accelerators/__init__.py | 17 | CODE | |
| LOW | src/lightning/fabric/accelerators/__init__.py | 18 | CODE | |
| LOW | src/lightning/fabric/accelerators/__init__.py | 20 | CODE | |
| LOW | src/lightning/fabric/plugins/__init__.py | 14 | CODE | |
| LOW | src/lightning/fabric/plugins/__init__.py | 15 | CODE | |
| LOW | src/lightning/fabric/plugins/__init__.py | 16 | CODE | |
| LOW | src/lightning/fabric/plugins/__init__.py | 17 | CODE | |
| LOW | src/lightning/fabric/plugins/__init__.py | 18 | CODE | |
| LOW | src/lightning/fabric/plugins/__init__.py | 19 | CODE | |
| LOW | src/lightning/fabric/plugins/__init__.py | 20 | CODE | |
| LOW | src/lightning/fabric/plugins/__init__.py | 21 | CODE | |
| LOW | src/lightning/fabric/plugins/__init__.py | 22 | CODE | |
| LOW | src/lightning/fabric/plugins/__init__.py | 23 | CODE | |
| LOW | src/lightning/fabric/plugins/__init__.py | 24 | CODE | |
| LOW | src/lightning/fabric/plugins/__init__.py | 25 | CODE | |
| LOW | src/lightning/fabric/plugins/__init__.py | 26 | CODE | |
| LOW | src/lightning/fabric/plugins/environments/__init__.py | 14 | CODE | |
| LOW | src/lightning/fabric/plugins/environments/__init__.py | 15 | CODE | |
| LOW | src/lightning/fabric/plugins/environments/__init__.py | 16 | CODE | |
| LOW | src/lightning/fabric/plugins/environments/__init__.py | 17 | CODE | |
| 322 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/parity_fabric/conftest.py | 0 | ensures that torch determinism settings are reset before the next test runs. | STRING |
| HIGH | tests/tests_fabric/conftest.py | 0 | ensures that torch determinism settings are reset before the next test runs. | STRING |
| HIGH | tests/tests_pytorch/conftest.py | 0 | ensures that torch determinism settings are reset before the next test runs. | STRING |
| HIGH | tests/tests_fabric/loggers/test_tensorboard.py | 0 | verify that manual versioning works for string versions, e.g. '2020-02-05-162402'. | STRING |
| HIGH | tests/tests_fabric/loggers/test_csv.py | 0 | verify that manual versioning works for string versions, e.g. '2020-02-05-162402'. | STRING |
| HIGH | tests/tests_pytorch/loggers/test_tensorboard.py | 0 | verify that manual versioning works for string versions, e.g. '2020-02-05-162402'. | STRING |
| HIGH | tests/tests_pytorch/loggers/test_csv.py | 0 | verify that manual versioning works for string versions, e.g. '2020-02-05-162402'. | STRING |
| HIGH | …sts/tests_fabric/plugins/environments/test_kubeflow.py | 0 | test the default attributes when no environment variables are set. | STRING |
| HIGH | …ts/tests_fabric/plugins/environments/test_lightning.py | 0 | test the default attributes when no environment variables are set. | STRING |
| HIGH | …tests_fabric/plugins/environments/test_torchelastic.py | 0 | test the default attributes when no environment variables are set. | STRING |
| HIGH | tests/tests_fabric/plugins/environments/test_xla.py | 0 | test the default attributes when no environment variables are set. | STRING |
| HIGH | tests/tests_fabric/plugins/environments/test_slurm.py | 0 | test the default attributes when no environment variables are set. | STRING |
| HIGH | tests/tests_fabric/plugins/environments/test_mpi.py | 0 | test the default attributes when no environment variables are set. | STRING |
| HIGH | tests/tests_fabric/strategies/test_xla_fsdp.py | 0 | test that the strategy returns the expected values depending on whether we're in the main process or not. | STRING |
| HIGH | tests/tests_fabric/strategies/test_xla.py | 0 | test that the strategy returns the expected values depending on whether we're in the main process or not. | STRING |
| HIGH | tests/tests_pytorch/strategies/test_xla.py | 0 | test that the strategy returns the expected values depending on whether we're in the main process or not. | STRING |
| HIGH | tests/tests_fabric/strategies/test_strategy.py | 0 | test that the module under configure_model gets moved to the right device and dtype. | STRING |
| HIGH | tests/tests_pytorch/strategies/test_common.py | 0 | test that the module under configure_model gets moved to the right device and dtype. | STRING |
| HIGH | tests/tests_fabric/strategies/test_ddp.py | 0 | test that the module under configure_model gets moved to the right device and dtype. | STRING |
| HIGH | …s_fabric/strategies/test_model_parallel_integration.py | 0 | test that the module under configure_model gets moved to the right device and dtype. | STRING |
| HIGH | tests/tests_fabric/strategies/test_fsdp_integration.py | 0 | test that the module under configure_model gets moved to the right device and dtype. | STRING |
| HIGH | tests/tests_pytorch/strategies/test_fsdp.py | 0 | test that the module under configure_model gets moved to the right device and dtype. | STRING |
| HIGH | tests/tests_pytorch/strategies/test_ddp.py | 0 | test that the module under configure_model gets moved to the right device and dtype. | STRING |
| HIGH | …_pytorch/strategies/test_model_parallel_integration.py | 0 | test that the module under configure_model gets moved to the right device and dtype. | STRING |
| HIGH | tests/tests_fabric/strategies/test_fsdp.py | 0 | test that the strategy does not accept storage options for saving checkpoints. | STRING |
| HIGH | tests/tests_pytorch/strategies/test_fsdp.py | 0 | test that the strategy does not accept storage options for saving checkpoints. | STRING |
| HIGH | tests/tests_fabric/strategies/test_deepspeed.py | 0 | test that the strategy does not accept storage options for saving checkpoints. | STRING |
| HIGH | tests/tests_fabric/strategies/test_model_parallel.py | 0 | test that the strategy does not accept storage options for saving checkpoints. | STRING |
| HIGH | tests/tests_pytorch/strategies/test_model_parallel.py | 0 | test that the strategy does not accept storage options for saving checkpoints. | STRING |
| HIGH | tests/tests_fabric/strategies/test_fsdp.py | 0 | test that the strategy validates the contents at the checkpoint path. | STRING |
| HIGH | tests/tests_fabric/strategies/test_model_parallel.py | 0 | test that the strategy validates the contents at the checkpoint path. | STRING |
| HIGH | tests/tests_pytorch/strategies/test_fsdp.py | 0 | test that the strategy validates the contents at the checkpoint path. | STRING |
| HIGH | tests/tests_pytorch/strategies/test_model_parallel.py | 0 | test that the strategy validates the contents at the checkpoint path. | STRING |
| HIGH | tests/tests_fabric/strategies/test_fsdp.py | 0 | test that the timeout gets passed to the ``torch.distributed.init_process_group`` function. | STRING |
| HIGH | tests/tests_fabric/strategies/test_ddp.py | 0 | test that the timeout gets passed to the ``torch.distributed.init_process_group`` function. | STRING |
| HIGH | tests/tests_fabric/strategies/test_model_parallel.py | 0 | test that the timeout gets passed to the ``torch.distributed.init_process_group`` function. | STRING |
| HIGH | tests/tests_pytorch/strategies/test_fsdp.py | 0 | test that the timeout gets passed to the ``torch.distributed.init_process_group`` function. | STRING |
| HIGH | tests/tests_pytorch/strategies/test_ddp.py | 0 | test that the timeout gets passed to the ``torch.distributed.init_process_group`` function. | STRING |
| HIGH | tests/tests_pytorch/strategies/test_model_parallel.py | 0 | test that the timeout gets passed to the ``torch.distributed.init_process_group`` function. | STRING |
| HIGH | tests/tests_fabric/strategies/test_fsdp.py | 0 | regression: a gs:// url must reach the dcp layer uncorrupted (not gs:/). | STRING |
| HIGH | tests/tests_fabric/strategies/test_model_parallel.py | 0 | regression: a gs:// url must reach the dcp layer uncorrupted (not gs:/). | STRING |
| HIGH | tests/tests_pytorch/strategies/test_fsdp.py | 0 | regression: a gs:// url must reach the dcp layer uncorrupted (not gs:/). | STRING |
| HIGH | tests/tests_pytorch/strategies/test_model_parallel.py | 0 | regression: a gs:// url must reach the dcp layer uncorrupted (not gs:/). | STRING |
| HIGH | …s/tests_fabric/strategies/test_xla_fsdp_integration.py | 0 | test that `move_to_device` does nothing, modelparallel decides which device parameters get moved to which device (shardi | STRING |
| HIGH | tests/tests_fabric/strategies/test_fsdp_integration.py | 0 | test that `move_to_device` does nothing, modelparallel decides which device parameters get moved to which device (shardi | STRING |
| HIGH | …s_fabric/strategies/test_model_parallel_integration.py | 0 | test that `move_to_device` does nothing, modelparallel decides which device parameters get moved to which device (shardi | STRING |
| HIGH | src/lightning/fabric/loggers/tensorboard.py | 0 | the directory for this run's tensorboard checkpoint. by default, it is named ``'version_${self.version}'`` but it can be | STRING |
| HIGH | src/lightning/pytorch/loggers/litlogger.py | 0 | the directory for this run's tensorboard checkpoint. by default, it is named ``'version_${self.version}'`` but it can be | STRING |
| HIGH | src/lightning/pytorch/loggers/tensorboard.py | 0 | the directory for this run's tensorboard checkpoint. by default, it is named ``'version_${self.version}'`` but it can be | STRING |
| HIGH | src/lightning/fabric/plugins/precision/precision.py | 0 | this method is called to teardown the training process. it is the right place to release memory and free other resources | STRING |
| HIGH | src/lightning/fabric/strategies/strategy.py | 0 | this method is called to teardown the training process. it is the right place to release memory and free other resources | STRING |
| HIGH | src/lightning/pytorch/strategies/strategy.py | 0 | this method is called to teardown the training process. it is the right place to release memory and free other resources | STRING |
| HIGH | src/lightning/fabric/strategies/ddp.py | 0 | reduces a tensor from several distributed processes to one aggregated tensor. args: tensor: the tensor to sync and reduc | STRING |
| HIGH | src/lightning/pytorch/strategies/ddp.py | 0 | reduces a tensor from several distributed processes to one aggregated tensor. args: tensor: the tensor to sync and reduc | STRING |
| HIGH | src/lightning/pytorch/strategies/fsdp.py | 0 | reduces a tensor from several distributed processes to one aggregated tensor. args: tensor: the tensor to sync and reduc | STRING |
| HIGH | src/lightning/fabric/strategies/xla_fsdp.py | 0 | function to gather a tensor from several distributed processes. args: tensor: tensor to all-gather. group: unused. sync_ | STRING |
| HIGH | src/lightning/fabric/strategies/xla.py | 0 | function to gather a tensor from several distributed processes. args: tensor: tensor to all-gather. group: unused. sync_ | STRING |
| HIGH | src/lightning/pytorch/strategies/xla.py | 0 | function to gather a tensor from several distributed processes. args: tensor: tensor to all-gather. group: unused. sync_ | STRING |
| HIGH | src/lightning/pytorch/profilers/advanced.py | 0 | profiler to check if there are any bottlenecks in your code. | STRING |
| HIGH | src/lightning/pytorch/profilers/pytorch.py | 0 | profiler to check if there are any bottlenecks in your code. | STRING |
| 3 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | README.md | 142 | # -------------------------------- | COMMENT |
| MEDIUM⚡ | README.md | 144 | # -------------------------------- | COMMENT |
| MEDIUM⚡ | README.md | 175 | # ------------------- | COMMENT |
| MEDIUM⚡ | README.md | 177 | # ------------------- | COMMENT |
| MEDIUM⚡ | README.md | 181 | # ------------------- | COMMENT |
| MEDIUM⚡ | README.md | 183 | # ------------------- | COMMENT |
| MEDIUM⚡ | tests/tests_pytorch/models/test_hparams.py | 96 | # ------------------------- | COMMENT |
| MEDIUM⚡ | tests/tests_pytorch/models/test_hparams.py | 98 | # ------------------------- | COMMENT |
| MEDIUM | tests/tests_pytorch/models/test_hparams.py | 263 | # ------------------------- | COMMENT |
| MEDIUM | tests/tests_pytorch/models/test_hparams.py | 265 | # ------------------------- | COMMENT |
| MEDIUM⚡ | tests/tests_pytorch/helpers/deterministic_model.py | 61 | # ----------------------------- | COMMENT |
| MEDIUM⚡ | tests/tests_pytorch/helpers/deterministic_model.py | 63 | # ----------------------------- | COMMENT |
| MEDIUM | tests/tests_pytorch/trainer/flags/test_fast_dev_run.py | 115 | # ----------------------- | COMMENT |
| MEDIUM | tests/tests_pytorch/trainer/flags/test_fast_dev_run.py | 117 | # ----------------------- | COMMENT |
| MEDIUM⚡ | …ts_pytorch/trainer/logging_/test_train_loop_logging.py | 49 | # ----------- | COMMENT |
| MEDIUM⚡ | …ts_pytorch/trainer/logging_/test_train_loop_logging.py | 51 | # ----------- | COMMENT |
| MEDIUM⚡ | …ts_pytorch/trainer/logging_/test_train_loop_logging.py | 54 | # ----------- | COMMENT |
| MEDIUM⚡ | …ts_pytorch/trainer/logging_/test_train_loop_logging.py | 56 | # ----------- | COMMENT |
| MEDIUM⚡ | …ts_pytorch/trainer/logging_/test_train_loop_logging.py | 66 | # ----------- | COMMENT |
| MEDIUM⚡ | …ts_pytorch/trainer/logging_/test_train_loop_logging.py | 68 | # ----------- | COMMENT |
| MEDIUM⚡ | docs/source-pytorch/conf.py | 27 | # ----------------------- | COMMENT |
| MEDIUM⚡ | docs/source-pytorch/conf.py | 29 | # ----------------------- | COMMENT |
| MEDIUM⚡ | docs/source-pytorch/conf.py | 36 | # ----------------------- | COMMENT |
| MEDIUM⚡ | docs/source-pytorch/conf.py | 38 | # ----------------------- | COMMENT |
| MEDIUM⚡ | …ples/pytorch/domain_templates/semantic_segmentation.py | 376 | # ------------------------ | COMMENT |
| MEDIUM⚡ | …ples/pytorch/domain_templates/semantic_segmentation.py | 378 | # ------------------------ | COMMENT |
| MEDIUM⚡ | …ples/pytorch/domain_templates/semantic_segmentation.py | 381 | # ------------------------ | COMMENT |
| MEDIUM⚡ | …ples/pytorch/domain_templates/semantic_segmentation.py | 383 | # ------------------------ | COMMENT |
| MEDIUM⚡ | …ples/pytorch/domain_templates/semantic_segmentation.py | 386 | # ------------------------ | COMMENT |
| MEDIUM⚡ | …ples/pytorch/domain_templates/semantic_segmentation.py | 388 | # ------------------------ | COMMENT |
| MEDIUM⚡ | …pytorch/domain_templates/generative_adversarial_net.py | 204 | # ------------------------ | COMMENT |
| MEDIUM⚡ | …pytorch/domain_templates/generative_adversarial_net.py | 206 | # ------------------------ | COMMENT |
| MEDIUM⚡ | …pytorch/domain_templates/generative_adversarial_net.py | 209 | # ------------------------ | COMMENT |
| MEDIUM⚡ | …pytorch/domain_templates/generative_adversarial_net.py | 211 | # ------------------------ | COMMENT |
| MEDIUM⚡ | …pytorch/domain_templates/generative_adversarial_net.py | 217 | # ------------------------ | COMMENT |
| MEDIUM⚡ | …pytorch/domain_templates/generative_adversarial_net.py | 219 | # ------------------------ | COMMENT |
| MEDIUM | src/lightning/fabric/plugins/environments/slurm.py | 76 | # ----------------------- | COMMENT |
| MEDIUM | src/lightning/fabric/plugins/environments/slurm.py | 78 | # ----------------------- | COMMENT |
| MEDIUM | src/lightning/fabric/plugins/environments/slurm.py | 89 | # ----------------------- | COMMENT |
| MEDIUM | src/lightning/fabric/plugins/environments/slurm.py | 91 | # ----------------------- | COMMENT |
| MEDIUM | src/lightning/pytorch/loggers/litlogger.py | 121 | # ────────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/lightning/pytorch/loggers/litlogger.py | 123 | # ────────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/lightning/pytorch/loggers/litlogger.py | 238 | # ────────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/lightning/pytorch/loggers/litlogger.py | 240 | # ────────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/lightning/pytorch/loggers/litlogger.py | 290 | # ────────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/lightning/pytorch/loggers/litlogger.py | 292 | # ────────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/lightning/pytorch/loggers/litlogger.py | 387 | # ────────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/lightning/pytorch/loggers/litlogger.py | 389 | # ────────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | src/lightning/pytorch/loggers/litlogger.py | 404 | # ────────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | src/lightning/pytorch/loggers/litlogger.py | 406 | # ────────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/lightning/pytorch/loops/training_epoch_loop.py | 297 | # ===================================================================== | COMMENT |
| MEDIUM | src/lightning/pytorch/loops/training_epoch_loop.py | 302 | # ===================================================================== | COMMENT |
| MEDIUM⚡ | src/lightning/pytorch/loops/training_epoch_loop.py | 381 | # ----------------------------------------- | COMMENT |
| MEDIUM⚡ | src/lightning/pytorch/loops/training_epoch_loop.py | 383 | # ----------------------------------------- | COMMENT |
| MEDIUM⚡ | src/lightning/pytorch/loops/training_epoch_loop.py | 387 | # ----------------------------------------- | COMMENT |
| MEDIUM⚡ | src/lightning/pytorch/loops/training_epoch_loop.py | 389 | # ----------------------------------------- | COMMENT |
| MEDIUM⚡ | src/lightning/pytorch/loops/optimization/automatic.py | 180 | # ------------------- | COMMENT |
| MEDIUM⚡ | src/lightning/pytorch/loops/optimization/automatic.py | 182 | # ------------------- | COMMENT |
| MEDIUM⚡ | src/lightning/pytorch/loops/optimization/automatic.py | 187 | # ------------------------------ | COMMENT |
| MEDIUM⚡ | src/lightning/pytorch/loops/optimization/automatic.py | 189 | # ------------------------------ | COMMENT |
| 12 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …s_fabric/strategies/test_model_parallel_integration.py | 455 | # Create a FSDP sharded model | COMMENT |
| MEDIUM | …s_fabric/strategies/test_model_parallel_integration.py | 469 | # Create a raw state-dict checkpoint to test `Fabric.load_raw` too | COMMENT |
| MEDIUM | tests/tests_fabric/strategies/test_fsdp_integration.py | 306 | # Create a FSDP sharded model | COMMENT |
| MEDIUM | tests/tests_fabric/strategies/test_fsdp_integration.py | 325 | # Create a raw state-dict checkpoint to test `Fabric.load_raw` too | COMMENT |
| MEDIUM | tests/tests_fabric/utilities/test_cloud_io.py | 133 | # Create a fake adlfs module so isinstance check works | COMMENT |
| MEDIUM | tests/tests_pytorch/tuner/test_lr_finder.py | 811 | # Create a simple backbone-head architecture | COMMENT |
| MEDIUM⚡ | tests/tests_pytorch/loggers/test_wandb.py | 656 | # Create a config file with the log_model parameter set. This seems necessary to be able | COMMENT |
| MEDIUM | tests/tests_pytorch/callbacks/test_pruning.py | 430 | # Create a pruning callback that applies both pruning and LTH at epoch 1 | COMMENT |
| MEDIUM | …_pytorch/strategies/test_model_parallel_integration.py | 507 | # Create a regular model and load the checkpoint into it | COMMENT |
| MEDIUM | …_pytorch/strategies/test_model_parallel_integration.py | 537 | # Create a distributed model and load the checkpoint into it | COMMENT |
| MEDIUM | tests/tests_pytorch/models/test_hparams.py | 353 | instance = super().__call__(*args, **kwargs) # Create the instance | CODE |
| MEDIUM | …ts/tests_pytorch/trainer/flags/test_overfit_batches.py | 131 | # Create a reference train dataloader without shuffling. | COMMENT |
| MEDIUM | examples/fabric/kfold_cv/train_fabric.py | 105 | # Create the Lightning Fabric object. The parameters like accelerator, strategy, devices etc. will be provided | COMMENT |
| MEDIUM | examples/fabric/tensor_parallel/train.py | 18 | # Define the size of the 2D parallelism | COMMENT |
| MEDIUM | examples/fabric/tensor_parallel/train.py | 38 | # Define the optimizer | COMMENT |
| MEDIUM | examples/fabric/image_classifier/train_fabric.py | 74 | # Create the Lightning Fabric object. The parameters like accelerator, strategy, devices etc. will be proided | COMMENT |
| MEDIUM | examples/fabric/dcgan/train_torch.py | 67 | # Create the dataloader | COMMENT |
| MEDIUM | examples/fabric/dcgan/train_torch.py | 90 | # Create the generator | COMMENT |
| MEDIUM | examples/fabric/dcgan/train_torch.py | 100 | # Create the Discriminator | COMMENT |
| MEDIUM | examples/fabric/dcgan/train_fabric.py | 68 | # Create the dataloader | COMMENT |
| MEDIUM | examples/fabric/dcgan/train_fabric.py | 83 | # Create the generator | COMMENT |
| MEDIUM | examples/fabric/dcgan/train_fabric.py | 89 | # Create the Discriminator | COMMENT |
| MEDIUM | examples/fabric/reinforcement_learning/train_torch.py | 157 | # Define the agent and the optimizer and setup them with DistributedDataParallel | COMMENT |
| MEDIUM | examples/fabric/reinforcement_learning/train_fabric.py | 93 | # Define the agent and the optimizer and setup them with Fabric | COMMENT |
| MEDIUM | …abric/reinforcement_learning/train_fabric_decoupled.py | 50 | # Initialize Fabric object | COMMENT |
| MEDIUM | …abric/reinforcement_learning/train_fabric_decoupled.py | 68 | # Define the agent | COMMENT |
| MEDIUM | …abric/reinforcement_learning/train_fabric_decoupled.py | 234 | # Define the agent and the optimizer and setup them with Fabric | COMMENT |
| MEDIUM⚡ | …abric/reinforcement_learning/train_fabric_decoupled.py | 330 | # Create a global group, assigning it to the collective: used by the player to exchange | COMMENT |
| MEDIUM⚡ | …abric/reinforcement_learning/train_fabric_decoupled.py | 335 | # Create a group between rank-0 (player) and rank-1 (trainer), assigning it to the collective: | COMMENT |
| MEDIUM⚡ | …abric/reinforcement_learning/train_fabric_decoupled.py | 339 | # Create a new group, without assigning it to the collective: in this way the trainers can | COMMENT |
| MEDIUM | examples/fabric/meta_learning/train_fabric.py | 62 | # Create the Fabric object | COMMENT |
| MEDIUM | examples/pytorch/tensor_parallel/train.py | 51 | # Define the size of the 2D parallelism | COMMENT |
| MEDIUM | src/lightning/fabric/accelerators/registry.py | 23 | """This class is a Registry that stores information about the Accelerators. | STRING |
| MEDIUM | src/lightning/fabric/plugins/io/checkpoint_io.py | 79 | """This method is called to teardown the process.""" | STRING |
| MEDIUM | src/lightning/fabric/plugins/precision/precision.py | 158 | """This method is called to teardown the training process. | STRING |
| MEDIUM | src/lightning/fabric/strategies/registry.py | 20 | """This class is a Registry that stores information about the Training Strategies. | STRING |
| MEDIUM | src/lightning/fabric/strategies/strategy.py | 365 | """This method is called to teardown the training process. | STRING |
| MEDIUM | src/lightning/fabric/utilities/types.py | 53 | """This class is used to detect if an object is stateful using `isinstance(obj, _Stateful)`.""" | STRING |
| MEDIUM | src/lightning/fabric/utilities/distributed.py | 422 | # Create a barrier with an 'infinite' timeout (only reliably possible over the GLOO backend) | COMMENT |
| MEDIUM | src/lightning/fabric/utilities/data.py | 177 | """This function is used to handle the sampler, batch_sampler arguments associated within a DataLoader for its re- | STRING |
| MEDIUM | src/lightning/pytorch/overrides/distributed.py | 236 | """This class is used to wrap a :class:`torch.utils.data.BatchSampler` and capture its indices.""" | STRING |
| MEDIUM | src/lightning/pytorch/loggers/mlflow.py | 369 | # Create a temporary directory to log on mlflow | STRING |
| MEDIUM | src/lightning/pytorch/core/optimizer.py | 40 | """This class is used to wrap the user optimizers and handle properly the backward and optimizer_step logic across | STRING |
| MEDIUM | src/lightning/pytorch/core/optimizer.py | 64 | """This function is just a helper for advanced users. | STRING |
| MEDIUM | src/lightning/pytorch/callbacks/pruning.py | 447 | """This function is responsible of sanitizing ``parameters_to_prune`` and ``parameter_names``. If | STRING |
| MEDIUM | src/lightning/pytorch/callbacks/finetuning.py | 49 | r"""This class implements the base logic for writing your own Finetuning Callback. | STRING |
| MEDIUM | src/lightning/pytorch/callbacks/finetuning.py | 128 | """This function is used to flatten a module or an iterable of modules into a list of its leaf modules (modules | STRING |
| MEDIUM | src/lightning/pytorch/callbacks/finetuning.py | 227 | """This function is used to exclude any parameter which already exists in this optimizer. | STRING |
| MEDIUM | src/lightning/pytorch/callbacks/lr_monitor.py | 251 | """This function is used the remap the keys if param groups for a given optimizer increased.""" | STRING |
| MEDIUM | src/lightning/pytorch/plugins/io/async_plugin.py | 86 | """This method is called to close the threads.""" | STRING |
| MEDIUM | src/lightning/pytorch/strategies/strategy.py | 527 | """This method is called to teardown the training process. | STRING |
| MEDIUM | src/lightning/pytorch/profilers/pytorch.py | 105 | """This class is used to override the schedule logic from the profiler and perform recording for both | STRING |
| MEDIUM | src/lightning/pytorch/utilities/data.py | 238 | """This function is used to handle the sampler, batch_sampler arguments associated within a DataLoader for its re- | STRING |
| MEDIUM | src/lightning/pytorch/loops/fetchers.py | 87 | """This class is used to control batch fetching flow. | STRING |
| MEDIUM | src/lightning/pytorch/loops/fetchers.py | 147 | """This class is used to return directly the `dataloader_iter` to the ``LightningModule`` training_step for users | STRING |
| MEDIUM | …lightning/pytorch/trainer/connectors/data_connector.py | 237 | """This function is used to created the distributed sampler injected within the user DataLoader.""" | STRING |
| MEDIUM | …/pytorch/trainer/connectors/logger_connector/result.py | 456 | """This function is used to iterate over current valid metrics.""" | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | src/lightning/fabric/fabric.py | 377 | Set up one or more optimizers for accelerated training. Some strategies do not allow setting up model and optim | STRING |
| HIGH | src/lightning/fabric/fabric.py | 536 | Clip the gradients of the model to a given max value or max norm. Args: module: The module whose pa | STRING |
| HIGH | src/lightning/fabric/fabric.py | 734 | Skip gradient synchronization during backward to avoid redundant communication overhead. Use this context manag | STRING |
| HIGH | src/lightning/fabric/fabric.py | 956 | Launch and initialize all the processes needed for distributed execution. Args: function: Optional | STRING |
| HIGH | src/lightning/fabric/accelerators/cpu.py | 81 | Parses the cpu_cores given in the format as accepted by the ``devices`` argument in the :class:`~lightning.pytorch.t | STRING |
| HIGH | src/lightning/fabric/plugins/io/torch_io.py | 67 | Loads checkpoint using :func:`torch.load`, with additional handling for ``fsspec`` remote loading of files. Arg | STRING |
| HIGH | src/lightning/fabric/strategies/deepspeed.py | 478 | Load the contents from a checkpoint and restore the state of the given objects. Args: path: A path | STRING |
| HIGH | src/lightning/fabric/utilities/logger.py | 78 | Flatten hierarchical dict, e.g. ``{'a': {'b': 'c'}} -> {'a/b': 'c'}``. Args: params: Dictionary containing | STRING |
| HIGH | src/lightning/fabric/utilities/device_parser.py | 24 | Args: gpus: Non-empty list of ints representing which GPUs to use Returns: Designated root GPU | STRING |
| HIGH | src/lightning/fabric/utilities/device_parser.py | 54 | Parses the GPU IDs given in the format as accepted by the :class:`~lightning.pytorch.trainer.trainer.Trainer`. Args | STRING |
| HIGH | src/lightning/fabric/utilities/device_parser.py | 117 | Checks that each of the GPUs in the list is actually available. Raises a MisconfigurationException if any of the GPU | STRING |
| HIGH | src/lightning/pytorch/loggers/comet.py | 46 | Track your parameters, metrics, source code and more using `Comet <https://www.comet.com/?utm_source=lightning.pytor | STRING |
| HIGH | src/lightning/pytorch/loggers/wandb.py | 52 | Log using `Weights and Biases <https://docs.wandb.ai/guides/integrations/lightning>`_. **Installation and set-up** | STRING |
| HIGH | src/lightning/pytorch/loggers/logger.py | 106 | Merge a sequence with dictionaries into one dictionary by aggregating the same keys with some given function. Args: | STRING |
| HIGH | src/lightning/pytorch/accelerators/cuda.py | 65 | Gets stats for the given GPU device. Args: device: GPU device for which to get stats Retur | STRING |
| HIGH | src/lightning/pytorch/accelerators/cuda.py | 123 | Get GPU stats including memory, fan speed, and temperature from nvidia-smi. Args: device: GPU device for wh | STRING |
| HIGH | src/lightning/pytorch/callbacks/pruning.py | 82 | Model pruning Callback, using PyTorch's prune utilities. This callback is responsible of pruning networks parame | STRING |
| HIGH | src/lightning/pytorch/callbacks/model_checkpoint.py | 51 | Save the model after every epoch by monitoring a quantity. Every logged metrics are passed to the :class:`~lightning | STRING |
| HIGH | src/lightning/pytorch/callbacks/early_stopping.py | 49 | Monitor a metric and stop training when it stops improving. Args: monitor: quantity to be monitored. | STRING |
| HIGH | src/lightning/pytorch/trainer/setup.py | 185 | Convert a time interval into seconds. This helper parses different representations of a time interval and norma | STRING |
| HIGH | src/lightning/pytorch/trainer/trainer.py | 651 | Perform one evaluation epoch over the validation set. Args: model: The model to validate. | STRING |
| HIGH | src/lightning/pytorch/trainer/trainer.py | 769 | Perform one evaluation epoch over the test set. It's separated from fit to make sure you never run on your test | STRING |
| HIGH | src/lightning/pytorch/trainer/trainer.py | 888 | Run inference on your data. This will call the model forward function to compute predictions. Useful to perform | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/tests_pytorch/strategies/test_ddp_integration.py | 236 | def update_main_process_results(self, trainer, extra) -> None: | CODE |
| LOW | src/lightning/__init__.py | 24 | __all__ = [ | CODE |
| LOW | src/lightning/__about__.py | 32 | __all__ = [ | STRING |
| LOW | src/lightning/fabric/__init__.py | 43 | __all__ = ["Fabric", "seed_everything", "is_wrapped"] | CODE |
| LOW | src/lightning/fabric/cli.py | 171 | def _set_env_variables(args: Namespace) -> None: | CODE |
| LOW⚡ | src/lightning/fabric/connector.py | 335 | def _set_parallel_devices_and_init_accelerator(self) -> None: | CODE |
| LOW | src/lightning/fabric/connector.py | 362 | def _set_devices_flag_if_auto_passed(self) -> None: | CODE |
| LOW | src/lightning/fabric/plugins/__init__.py | 28 | __all__ = [ | CODE |
| LOW | …ing/fabric/plugins/environments/cluster_environment.py | 45 | def set_world_size(self, size: int) -> None: | CODE |
| LOW | …ing/fabric/plugins/environments/cluster_environment.py | 53 | def set_global_rank(self, rank: int) -> None: | CODE |
| LOW | src/lightning/fabric/plugins/environments/slurm.py | 138 | def set_world_size(self, size: int) -> None: | CODE |
| LOW | src/lightning/fabric/plugins/environments/slurm.py | 146 | def set_global_rank(self, rank: int) -> None: | CODE |
| LOW | src/lightning/fabric/plugins/environments/kubeflow.py | 61 | def set_world_size(self, size: int) -> None: | CODE |
| LOW | src/lightning/fabric/plugins/environments/kubeflow.py | 69 | def set_global_rank(self, rank: int) -> None: | CODE |
| LOW | src/lightning/fabric/plugins/environments/mpi.py | 90 | def set_world_size(self, size: int) -> None: | CODE |
| LOW | src/lightning/fabric/plugins/environments/mpi.py | 99 | def set_global_rank(self, rank: int) -> None: | CODE |
| LOW | …/lightning/fabric/plugins/environments/torchelastic.py | 66 | def set_world_size(self, size: int) -> None: | CODE |
| LOW | …/lightning/fabric/plugins/environments/torchelastic.py | 74 | def set_global_rank(self, rank: int) -> None: | CODE |
| LOW | src/lightning/fabric/plugins/environments/lightning.py | 81 | def set_world_size(self, size: int) -> None: | CODE |
| LOW | src/lightning/fabric/plugins/environments/lightning.py | 89 | def set_global_rank(self, rank: int) -> None: | CODE |
| LOW⚡ | src/lightning/fabric/plugins/environments/lsf.py | 58 | def _set_init_progress_group_env_vars(self) -> None: | CODE |
| LOW | src/lightning/fabric/plugins/environments/lsf.py | 103 | def set_world_size(self, size: int) -> None: | CODE |
| LOW | src/lightning/fabric/plugins/environments/lsf.py | 118 | def set_global_rank(self, rank: int) -> None: | CODE |
| LOW | src/lightning/fabric/plugins/environments/xla.py | 79 | def set_world_size(self, size: int) -> None: | CODE |
| LOW | src/lightning/fabric/plugins/environments/xla.py | 100 | def set_global_rank(self, rank: int) -> None: | CODE |
| LOW | src/lightning/fabric/plugins/io/__init__.py | 18 | __all__ = ["CheckpointIO", "TorchCheckpointIO", "XLACheckpointIO"] | CODE |
| LOW | src/lightning/fabric/plugins/collectives/__init__.py | 5 | __all__ = [ | CODE |
| LOW | src/lightning/fabric/plugins/precision/__init__.py | 24 | __all__ = [ | CODE |
| LOW⚡ | src/lightning/fabric/strategies/ddp.py | 234 | def _setup_distributed(self) -> None: | CODE |
| LOW⚡ | src/lightning/fabric/strategies/ddp.py | 246 | def _set_world_ranks(self) -> None: | CODE |
| LOW⚡ | src/lightning/fabric/strategies/fsdp.py | 685 | def _setup_distributed(self) -> None: | CODE |
| LOW⚡ | src/lightning/fabric/strategies/fsdp.py | 698 | def _set_world_ranks(self) -> None: | CODE |
| LOW | src/lightning/fabric/strategies/fsdp.py | 814 | def _setup_activation_checkpointing(module: Module, activation_checkpointing_kwargs: dict) -> None: | CODE |
| LOW | src/lightning/fabric/strategies/deepspeed.py | 648 | def _setup_distributed(self) -> None: | CODE |
| LOW⚡ | src/lightning/fabric/strategies/deepspeed.py | 675 | def _set_node_environment_variables(self) -> None: | CODE |
| LOW⚡ | src/lightning/fabric/strategies/deepspeed.py | 683 | def _set_deepspeed_activation_checkpointing(self) -> None: | CODE |
| LOW⚡ | src/lightning/fabric/strategies/model_parallel.py | 309 | def _setup_distributed(self) -> None: | CODE |
| LOW⚡ | src/lightning/fabric/strategies/model_parallel.py | 322 | def _set_world_ranks(self) -> None: | CODE |
| LOW | src/lightning/fabric/strategies/model_parallel.py | 343 | def _set_requires_grad_sync(self, requires_grad_sync: bool) -> None: | CODE |
| LOW | src/lightning/fabric/strategies/launchers/__init__.py | 18 | __all__ = [ | CODE |
| LOW | src/lightning/fabric/utilities/__init__.py | 29 | __all__ = [ | CODE |
| LOW | src/lightning/fabric/utilities/spike.py | 142 | def _update_stats(self, val: torch.Tensor) -> None: | CODE |
| LOW | src/lightning/fabric/utilities/seed.py | 150 | def _set_rng_states(rng_state_dict: dict[str, Any]) -> None: | CODE |
| LOW⚡ | src/lightning/fabric/utilities/distributed.py | 376 | def set_epoch(self, epoch: int) -> None: | CODE |
| LOW⚡ | src/lightning/fabric/utilities/distributed.py | 390 | def _set_num_threads_if_needed(num_processes: int = 1) -> None: | CODE |
| LOW | src/lightning/fabric/utilities/data.py | 419 | def _set_sampler_epoch(dataloader: object, epoch: int) -> None: | CODE |
| LOW | src/lightning/fabric/utilities/testing/__init__.py | 3 | __all__ = ["_runif_reasons"] | CODE |
| LOW | src/lightning/pytorch/__init__.py | 34 | __all__ = ["Trainer", "LightningDataModule", "LightningModule", "Callback", "seed_everything"] | CODE |
| LOW | src/lightning/pytorch/cli.py | 775 | def _set_seed(self) -> None: | CODE |
| LOW | src/lightning/pytorch/cli.py | 846 | def _set_dict_nested(data: dict, key: str, value: Any) -> None: | CODE |
| LOW | src/lightning/pytorch/loggers/__init__.py | 22 | __all__ = [ | CODE |
| LOW | src/lightning/pytorch/core/saving.py | 218 | def update_hparams(hparams: dict, updates: dict) -> None: | CODE |
| LOW | src/lightning/pytorch/core/__init__.py | 18 | __all__ = ["LightningDataModule", "LightningModule"] | CODE |
| LOW | src/lightning/pytorch/core/mixins/hparams_mixin.py | 133 | def _set_hparams(self, hp: Union[MutableMapping, Namespace, str]) -> None: | CODE |
| LOW | src/lightning/pytorch/accelerators/__init__.py | 14 | __all__ = [ | CODE |
| LOW | src/lightning/pytorch/accelerators/cuda.py | 56 | def set_nvidia_flags(local_rank: int) -> None: | CODE |
| LOW | src/lightning/pytorch/callbacks/__init__.py | 37 | __all__ = [ | CODE |
| LOW | …/lightning/pytorch/callbacks/progress/tqdm_progress.py | 464 | def _update_n(bar: _tqdm, value: int) -> None: | CODE |
| LOW | src/lightning/pytorch/plugins/__init__.py | 18 | __all__ = [ | CODE |
| LOW | src/lightning/pytorch/plugins/io/__init__.py | 17 | __all__ = [ | CODE |
| 34 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | tests/tests_pytorch/test_cli.py | 543 | assert cli.config.fit.model.class_path.endswith(".BoringCkptPathSubclass") | CODE |
| CRITICAL | …s/tests_pytorch/core/test_metric_result_integration.py | 608 | pl.trainer.connectors.logger_connector.result.warning_cache.clear() | CODE |
| CRITICAL | …_pytorch/strategies/test_model_parallel_integration.py | 319 | assert self.model.w1.weight.device_mesh.size(0) == 2 | CODE |
| CRITICAL | …_pytorch/strategies/test_model_parallel_integration.py | 320 | assert self.model.w1.weight.device_mesh.size(1) == 2 | CODE |
| CRITICAL | tests/tests_pytorch/loops/test_loops.py | 255 | assert trainer.fit_loop.epoch_loop.val_loop.batch_progress.state_dict() == expected | CODE |
| CRITICAL | src/lightning/pytorch/tuner/batch_size_scaling.py | 409 | trainer.fit_loop.epoch_loop.automatic_optimization.optim_progress.reset() | CODE |
| CRITICAL | src/lightning/pytorch/tuner/batch_size_scaling.py | 411 | trainer.fit_loop.epoch_loop.manual_optimization.optim_step_progress.reset() | CODE |
| CRITICAL | src/lightning/pytorch/strategies/ddp.py | 265 | self._model_averager = torch.distributed.algorithms.model_averaging.averagers.PeriodicModelAverager( | CODE |
| CRITICAL | src/lightning/pytorch/trainer/trainer.py | 1363 | self.fit_loop.epoch_loop.val_loop._data_source.is_defined() | CODE |
| CRITICAL | …c/lightning/pytorch/trainer/configuration_validator.py | 65 | has_val_loader = trainer.fit_loop.epoch_loop.val_loop._data_source.is_defined() | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 88 | CODE | |
| LOW | tests/tests_fabric/conftest.py | 85 | CODE | |
| LOW | tests/tests_pytorch/conftest.py | 142 | CODE | |
| LOW | tests/tests_pytorch/tuner/test_scale_batch_size.py | 356 | CODE | |
| LOW | …sts/tests_pytorch/callbacks/test_throughput_monitor.py | 426 | CODE | |
| LOW | tests/tests_pytorch/utilities/test_combined_loader.py | 472 | CODE | |
| LOW | tests/tests_pytorch/loops/test_loops.py | 637 | CODE | |
| LOW | tests/tests_pytorch/loops/test_loops.py | 638 | CODE | |
| LOW | tests/tests_pytorch/trainer/test_trainer.py | 756 | CODE | |
| LOW | …ests_pytorch/trainer/logging_/test_logger_connector.py | 40 | CODE | |
| LOW | …ests_pytorch/trainer/logging_/test_logger_connector.py | 473 | CODE | |
| LOW | .actions/assistant.py | 58 | CODE | |
| LOW | examples/fabric/image_classifier/train_torch.py | 55 | CODE | |
| LOW | examples/fabric/image_classifier/train_fabric.py | 73 | CODE | |
| LOW | examples/fabric/build_your_own_trainer/trainer.py | 523 | CODE | |
| LOW | examples/fabric/dcgan/train_torch.py | 48 | CODE | |
| LOW | examples/fabric/dcgan/train_fabric.py | 49 | CODE | |
| LOW | examples/fabric/reinforcement_learning/train_torch.py | 110 | CODE | |
| LOW | examples/fabric/reinforcement_learning/train_fabric.py | 66 | CODE | |
| LOW | …abric/reinforcement_learning/train_fabric_decoupled.py | 42 | CODE | |
| LOW | …abric/reinforcement_learning/train_fabric_decoupled.py | 214 | CODE | |
| LOW | …amples/pytorch/domain_templates/reinforce_learn_ppo.py | 286 | CODE | |
| LOW | src/lightning/fabric/fabric.py | 1128 | CODE | |
| LOW | src/lightning/fabric/cli.py | 188 | CODE | |
| LOW | src/lightning/fabric/connector.py | 164 | CODE | |
| LOW | …ghtning/fabric/plugins/precision/transformer_engine.py | 151 | CODE | |
| LOW | src/lightning/fabric/strategies/fsdp.py | 433 | CODE | |
| LOW | src/lightning/fabric/strategies/fsdp.py | 531 | CODE | |
| LOW | src/lightning/fabric/strategies/strategy.py | 406 | CODE | |
| LOW | src/lightning/fabric/strategies/model_parallel.py | 560 | CODE | |
| LOW | src/lightning/fabric/utilities/throughput.py | 566 | CODE | |
| LOW | src/lightning/fabric/utilities/logger.py | 77 | CODE | |
| LOW | src/lightning/fabric/utilities/cloud_io.py | 87 | CODE | |
| LOW | src/lightning/fabric/utilities/data.py | 173 | CODE | |
| LOW | src/lightning/fabric/utilities/data.py | 359 | CODE | |
| LOW | src/lightning/pytorch/tuner/batch_size_scaling.py | 180 | CODE | |
| LOW | src/lightning/pytorch/tuner/batch_size_scaling.py | 235 | CODE | |
| LOW | src/lightning/pytorch/tuner/lr_finder.py | 199 | CODE | |
| LOW | src/lightning/pytorch/tuner/tuning.py | 31 | CODE | |
| LOW | src/lightning/pytorch/loggers/wandb.py | 378 | CODE | |
| LOW | src/lightning/pytorch/core/optimizer.py | 200 | CODE | |
| LOW | src/lightning/pytorch/core/optimizer.py | 250 | CODE | |
| LOW | src/lightning/pytorch/core/module.py | 1140 | CODE | |
| LOW | src/lightning/pytorch/core/module.py | 1181 | CODE | |
| LOW | src/lightning/pytorch/core/module.py | 1510 | CODE | |
| LOW | src/lightning/pytorch/callbacks/pruning.py | 66 | CODE | |
| LOW | src/lightning/pytorch/callbacks/pruning.py | 444 | CODE | |
| LOW | src/lightning/pytorch/callbacks/model_checkpoint.py | 340 | CODE | |
| LOW | src/lightning/pytorch/callbacks/finetuning.py | 113 | CODE | |
| LOW | src/lightning/pytorch/callbacks/lr_monitor.py | 250 | CODE | |
| LOW | src/lightning/pytorch/callbacks/early_stopping.py | 246 | CODE | |
| LOW | …/lightning/pytorch/callbacks/progress/tqdm_progress.py | 422 | CODE | |
| LOW | src/lightning/pytorch/strategies/fsdp.py | 539 | CODE | |
| LOW | src/lightning/pytorch/strategies/fsdp.py | 601 | CODE | |
| LOW | src/lightning/pytorch/profilers/pytorch.py | 167 | CODE | |
| LOW | src/lightning/pytorch/profilers/pytorch.py | 194 | CODE | |
| LOW | src/lightning/pytorch/utilities/model_helpers.py | 29 | CODE | |
| LOW | src/lightning/pytorch/utilities/data.py | 43 | CODE | |
| LOW | src/lightning/pytorch/utilities/data.py | 62 | CODE | |
| LOW | src/lightning/pytorch/utilities/data.py | 233 | CODE | |
| 17 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/tests_pytorch/trainer/test_trainer.py | 1317 | CODE | |
| LOW | …ests_pytorch/trainer/connectors/test_data_connector.py | 263 | CODE | |
| LOW | examples/fabric/build_your_own_trainer/trainer.py | 19 | CODE | |
| LOW | examples/fabric/meta_learning/train_torch.py | 56 | CODE | |
| LOW | examples/fabric/meta_learning/train_fabric.py | 52 | CODE | |
| LOW | …mples/pytorch/domain_templates/reinforce_learn_Qnet.py | 236 | CODE | |
| LOW | …amples/pytorch/domain_templates/reinforce_learn_ppo.py | 155 | CODE | |
| LOW | src/lightning/fabric/fabric.py | 134 | CODE | |
| LOW | src/lightning/fabric/strategies/ddp.py | 56 | CODE | |
| LOW | src/lightning/fabric/strategies/fsdp.py | 150 | CODE | |
| LOW | src/lightning/fabric/strategies/deepspeed.py | 58 | CODE | |
| LOW | src/lightning/fabric/strategies/xla_fsdp.py | 84 | CODE | |
| LOW | src/lightning/fabric/utilities/testing/_runif.py | 30 | CODE | |
| LOW | src/lightning/pytorch/cli.py | 322 | CODE | |
| LOW | src/lightning/pytorch/tuner/lr_finder.py | 199 | CODE | |
| LOW | src/lightning/pytorch/tuner/tuning.py | 31 | CODE | |
| LOW | src/lightning/pytorch/tuner/tuning.py | 119 | CODE | |
| LOW | src/lightning/pytorch/loggers/mlflow.py | 116 | CODE | |
| LOW | src/lightning/pytorch/loggers/wandb.py | 294 | CODE | |
| LOW | src/lightning/pytorch/loggers/litlogger.py | 58 | CODE | |
| LOW | src/lightning/pytorch/core/module.py | 386 | CODE | |
| LOW | src/lightning/pytorch/core/module.py | 552 | CODE | |
| LOW | src/lightning/pytorch/core/module.py | 670 | CODE | |
| LOW | src/lightning/pytorch/callbacks/lr_finder.py | 91 | CODE | |
| LOW | src/lightning/pytorch/callbacks/pruning.py | 66 | CODE | |
| LOW | src/lightning/pytorch/callbacks/model_checkpoint.py | 263 | CODE | |
| LOW | src/lightning/pytorch/callbacks/finetuning.py | 408 | CODE | |
| LOW | src/lightning/pytorch/callbacks/early_stopping.py | 114 | CODE | |
| LOW | src/lightning/pytorch/callbacks/lambda_function.py | 41 | CODE | |
| LOW | src/lightning/pytorch/strategies/ddp.py | 71 | CODE | |
| LOW | src/lightning/pytorch/strategies/fsdp.py | 157 | CODE | |
| LOW | src/lightning/pytorch/strategies/deepspeed.py | 80 | CODE | |
| LOW | src/lightning/pytorch/profilers/pytorch.py | 233 | CODE | |
| LOW | src/lightning/pytorch/utilities/types.py | 54 | CODE | |
| LOW | src/lightning/pytorch/utilities/testing/_runif.py | 26 | CODE | |
| LOW | …tning/pytorch/utilities/model_summary/model_summary.py | 323 | CODE | |
| LOW | src/lightning/pytorch/demos/transformer.py | 82 | CODE | |
| LOW | src/lightning/pytorch/trainer/trainer.py | 91 | CODE | |
| LOW | …ng/pytorch/trainer/connectors/accelerator_connector.py | 75 | CODE | |
| LOW | …/pytorch/trainer/connectors/logger_connector/result.py | 355 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/tests_pytorch/profilers/test_profiler.py | 715 | # Check if setting max_name_column_width results in a wider table (more dashes) | COMMENT |
| LOW | …ts/tests_pytorch/trainer/flags/test_overfit_batches.py | 210 | # Check if the batches are identical | COMMENT |
| LOW | …ghtning/fabric/plugins/precision/transformer_engine.py | 174 | # Check if bias exists before attempting to clone its data | COMMENT |
| LOW | src/lightning/fabric/utilities/cloud_io.py | 172 | # Check if the path is not already taken by a file. If not, it is considered a valid directory-like path | COMMENT |
| LOW | src/lightning/pytorch/tuner/batch_size_scaling.py | 207 | # Check if this is the last trial before trying to double | COMMENT |
| LOW | src/lightning/pytorch/tuner/batch_size_scaling.py | 271 | # Check if we've reached max_trials before trying to adjust batch size | COMMENT |
| LOW | src/lightning/pytorch/tuner/lr_finder.py | 430 | # Check if we diverging | COMMENT |
| LOW | src/lightning/pytorch/core/module.py | 1400 | # Set gradients to `None` instead of zero to improve performance (not required on `torch>=2.0.0`). | COMMENT |
| LOW | src/lightning/pytorch/callbacks/pruning.py | 280 | # Check if the parameter has been pruned (has _orig suffix) | COMMENT |
| LOW | src/lightning/pytorch/callbacks/model_checkpoint.py | 355 | # Check if we should skip due to trainer/callback state | COMMENT |
| LOW | src/lightning/pytorch/callbacks/model_checkpoint.py | 376 | if not saved_models: # Check if dictionary is not empty | CODE |
| LOW | src/lightning/pytorch/strategies/model_parallel.py | 404 | # Check if key starts with "prefix." (the compiled module path) | COMMENT |
| LOW⚡ | src/lightning/pytorch/utilities/parsing.py | 249 | # Check if attribute in model | COMMENT |
| LOW⚡ | src/lightning/pytorch/utilities/parsing.py | 253 | # Check if attribute in model.hparams, either namespace or dict | COMMENT |
| LOW⚡ | src/lightning/pytorch/utilities/parsing.py | 258 | # Check if the attribute in datamodule (datamodule gets registered in Trainer) | COMMENT |
| LOW | …ng/pytorch/trainer/connectors/accelerator_connector.py | 576 | # Set benchmark to False to ensure determinism | COMMENT |
| LOW⚡ | …tning/pytorch/trainer/connectors/callback_connector.py | 182 | # Check if LitLogger is being used with log_model enabled | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …sts/tests_pytorch/callbacks/test_throughput_monitor.py | 464 | except Exception as e: | CODE |
| LOW | tests/tests_pytorch/helpers/datasets.py | 112 | except Exception as ex: | CODE |
| LOW | tests/tests_pytorch/helpers/threading.py | 27 | except Exception as e: | CODE |
| MEDIUM | tests/tests_pytorch/helpers/threading.py | 24 | def run(self): | CODE |
| LOW | …sts/tests_pytorch/trainer/test_ddp_sigterm_handling.py | 62 | except Exception as e: | CODE |
| LOW | tests/tests_pytorch/trainer/test_trainer.py | 157 | except Exception: | CODE |
| LOW | tests/tests_pytorch/trainer/test_trainer.py | 168 | except Exception: | CODE |
| LOW | …torch/trainer/optimization/test_manual_optimization.py | 195 | except Exception: | CODE |
| LOW | src/lightning/fabric/loggers/tensorboard.py | 215 | except Exception as ex: | STRING |
| LOW | src/lightning/fabric/utilities/logger.py | 70 | except Exception: | CODE |
| LOW | src/lightning/pytorch/tuner/batch_size_scaling.py | 100 | except Exception as ex: | CODE |
| LOW | src/lightning/pytorch/tuner/lr_finder.py | 290 | except Exception as ex: | CODE |
| LOW | src/lightning/pytorch/core/datamodule.py | 291 | except Exception: | CODE |
| LOW | src/lightning/pytorch/loops/training_epoch_loop.py | 266 | except Exception: | CODE |
| MEDIUM | src/lightning/pytorch/loops/training_epoch_loop.py | 259 | def _broadcast_sigterm_tensor(self) -> None: | CODE |
| LOW | src/lightning/pytorch/demos/mnist_datamodule.py | 112 | except Exception as ex: | CODE |
| MEDIUM | src/lightning/pytorch/demos/mnist_datamodule.py | 138 | print(f"Error {ex} downloading `torchvision.datasets.MNIST`") | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/parity_fabric/utils.py | 27 | # The median is more robust to outliers than the mean | COMMENT |
| MEDIUM | tests/tests_fabric/utilities/test_data.py | 452 | """This test asserts, that custom `BatchSampler`, with all the arguments, that are required in order to properly | STRING |
| LOW | tests/tests_pytorch/callbacks/test_weight_averaging.py | 105 | # model and will just call the epoch-level hooks. For that reason, we check that we are not restarting before | COMMENT |
| LOW | tests/tests_pytorch/callbacks/test_weight_averaging.py | 154 | # model and will just call the epoch-level hooks. For that reason, we check that we are not restarting before | COMMENT |
| LOW | …/tests_pytorch/callbacks/test_stochastic_weight_avg.py | 107 | # not update the model and just call the epoch-level hooks, for that reason, we check that we are not | COMMENT |
| MEDIUM | tests/tests_pytorch/utilities/test_data.py | 144 | """This test asserts, that custom `BatchSampler`, with all the arguments, that are required in order to properly | STRING |
| MEDIUM | src/lightning/fabric/accelerators/cuda.py | 161 | return major >= 8 # Ampere and later leverage tensor cores, where this setting becomes useful | CODE |
| LOW | src/lightning/fabric/utilities/logger.py | 60 | # If it's a class, don't try to instantiate it, just return the name | COMMENT |
| MEDIUM | src/lightning/fabric/utilities/distributed.py | 350 | """Reset the sampler list in order to get new sampling.""" | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | README.md | 143 | # Step 1: Define a LightningModule | COMMENT |
| LOW⚡ | README.md | 176 | # Step 2: Define data | COMMENT |
| LOW⚡ | README.md | 182 | # Step 3: Train | COMMENT |
| LOW | src/pytorch_lightning/README.md | 93 | ### Step 0: Install | COMMENT |
| LOW | src/pytorch_lightning/README.md | 144 | ### Step 1: Add these imports | COMMENT |
| LOW | src/pytorch_lightning/README.md | 157 | ### Step 2: Define a LightningModule (nn.Module subclass) | COMMENT |
| LOW | src/pytorch_lightning/README.md | 190 | ### Step 3: Train! | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | examples/fabric/image_classifier/train_fabric.py | 93 | # don't forget to call `setup_dataloaders` to prepare for dataloaders for distributed training. | COMMENT |
| LOW⚡ | examples/fabric/image_classifier/train_fabric.py | 93 | # don't forget to call `setup_dataloaders` to prepare for dataloaders for distributed training. | COMMENT |
| LOW⚡ | examples/fabric/image_classifier/train_fabric.py | 99 | # don't forget to call `setup` to prepare for model / optimizer for distributed training. | COMMENT |
| LOW⚡ | examples/fabric/image_classifier/train_fabric.py | 99 | # don't forget to call `setup` to prepare for model / optimizer for distributed training. | COMMENT |
| LOW | …tning/fabric/strategies/launchers/subprocess_script.py | 132 | # if hydra is available and initialized, make sure to set the cwd correctly | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/legacy/generate_checkpoints.sh | 2 | # Usage: | COMMENT |
| LOW | docs/generate_docs_for_tags.sh | 2 | # Usage: | COMMENT |