Repository Analysis

Lightning-AI/pytorch-lightning

Pretrain, finetune ANY AI model of ANY size on 1 or 10,000+ GPUs with zero code changes.

27.3 Moderate AI signal View on GitHub
27.3
Adjusted Score
27.3
Raw Score
100%
Time Factor
2026-05-28
Last Push
31,163
Stars
Python
Language
150,807
Lines of Code
758
Files
3399
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 10HIGH 109MEDIUM 137LOW 3143

Pattern Findings

3399 matches across 14 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers2133 hits · 2072 pts
SeverityFileLineSnippet
LOWtests/parity_fabric/conftest.py21def reset_deterministic_algorithm():
LOWtests/parity_fabric/test_parity_simple.py128def test_parity_single_device(precision, accelerator):
LOWtests/tests_fabric/test_connector.py270def test_precision_and_precision_plugin_raises():
LOWtests/tests_fabric/test_connector.py277def test_interactive_compatible_dp_strategy_gpu(_, __, monkeypatch):
LOWtests/tests_fabric/test_connector.py284def test_interactive_compatible_strategy_ddp_fork(monkeypatch):
LOWtests/tests_fabric/test_connector.py319def test_strategy_choice_multi_node_gpu(_, strategy, strategy_class, devices):
LOWtests/tests_fabric/test_connector.py324def test_num_nodes_input_validation():
LOWtests/tests_fabric/test_connector.py332def test_cuda_accelerator_can_not_run_on_system(_):
LOWtests/tests_fabric/test_connector.py382def test_accelerator_gpu_with_devices(devices, strategy_class):
LOWtests/tests_fabric/test_connector.py390def test_accelerator_auto_with_devices_gpu():
LOWtests/tests_fabric/test_connector.py396def test_set_devices_if_none_cpu():
LOWtests/tests_fabric/test_connector.py402def test_unsupported_strategy_types_on_cpu_and_fallback():
LOWtests/tests_fabric/test_connector.py448def test_strategy_choice_gpu_str(strategy, strategy_class):
LOWtests/tests_fabric/test_connector.py453def test_device_type_when_strategy_instance_cpu_passed():
LOWtests/tests_fabric/test_connector.py460def test_device_type_when_strategy_instance_gpu_passed():
LOWtests/tests_fabric/test_connector.py467def test_validate_precision_type(precision):
LOWtests/tests_fabric/test_connector.py776def test_gpu_accelerator_backend_choice(expected_accelerator_flag, expected_accelerator_class):
LOWtests/tests_fabric/test_connector.py784def test_gpu_accelerator_backend_choice_cuda(*_):
LOWtests/tests_fabric/test_connector.py793def test_gpu_accelerator_backend_choice_mps(*_: object) -> object:
LOWtests/tests_fabric/test_connector.py801def test_gpu_accelerator_no_gpu_backend_found_error(*_):
LOWtests/tests_fabric/test_connector.py884def test_precision_selection_model_parallel(_, precision, raises):
LOWtests/tests_fabric/test_connector.py890def test_bitsandbytes_precision_cuda_required(monkeypatch):
LOWtests/tests_fabric/test_connector.py899def test_strategy_str_passed_being_case_insensitive(_, strategy, strategy_cls):
LOWtests/tests_fabric/test_connector.py81def test_accelerator_choice_tpu(accelerator, devices, tpu_available, monkeypatch):
LOWtests/tests_fabric/test_connector.py95def test_strategy_choice_ddp_on_cpu():
LOWtests/tests_fabric/test_connector.py100def _test_strategy_choice_ddp_and_cpu(ddp_strategy_class):
LOWtests/tests_fabric/test_connector.py124def test_custom_cluster_environment_in_slurm_environment(_):
LOWtests/tests_fabric/test_connector.py133 def creates_processes_externally(self) -> bool:
LOWtests/tests_fabric/test_connector.py247def test_fallback_from_ddp_spawn_to_ddp_on_cluster(_, __, env_vars, expected_environment):
LOWtests/tests_fabric/test_connector.py257def test_interactive_incompatible_backend_error(_, monkeypatch):
LOWtests/tests_fabric/test_connector.py300def test_invalid_ddp_strategy_with_mps(accelerator, strategy, strategy_class):
LOWtests/tests_fabric/test_connector.py346def test_tpu_accelerator_can_not_run_on_system(_):
LOWtests/tests_fabric/test_connector.py353def test_accelerator_invalid_type_devices(_, device_count):
LOWtests/tests_fabric/test_connector.py371def test_accelerator_cpu_with_devices(devices, strategy_class):
LOWtests/tests_fabric/test_connector.py415def test_invalid_accelerator_choice():
LOWtests/tests_fabric/test_connector.py421def test_invalid_strategy_choice(invalid_strategy):
LOWtests/tests_fabric/test_connector.py433def test_strategy_choice_cpu_str(strategy, strategy_class):
LOWtests/tests_fabric/test_connector.py491def test_precision_conversion(patch1, patch2, precision, expected_precision, should_warn):
LOWtests/tests_fabric/test_connector.py504def test_multi_device_default_strategy():
LOWtests/tests_fabric/test_connector.py513def test_strategy_choice_ddp_spawn_cpu():
LOWtests/tests_fabric/test_connector.py524def test_strategy_choice_ddp_fork_in_interactive():
LOWtests/tests_fabric/test_connector.py536def test_strategy_choice_ddp_fork_cpu():
LOWtests/tests_fabric/test_connector.py558def test_strategy_choice_ddp_spawn(*_):
LOWtests/tests_fabric/test_connector.py570def test_strategy_choice_ddp_slurm(_, strategy, job_name, expected_env):
LOWtests/tests_fabric/test_connector.py606def test_strategy_choice_ddp_torchelastic(*_):
LOWtests/tests_fabric/test_connector.py627def test_torchelastic_priority_over_slurm(*_):
LOWtests/tests_fabric/test_connector.py648def test_strategy_choice_ddp_kubeflow(*_):
LOWtests/tests_fabric/test_connector.py667def test_strategy_choice_ddp_cpu_kubeflow():
LOWtests/tests_fabric/test_connector.py689def test_strategy_choice_ddp_cpu_slurm(strategy):
LOWtests/tests_fabric/test_connector.py699def test_unsupported_tpu_choice(_, tpu_available):
LOWtests/tests_fabric/test_connector.py715def test_connector_with_tpu_accelerator_instance(tpu_available, monkeypatch):
LOWtests/tests_fabric/test_connector.py729def test_devices_auto_choice_mps():
LOWtests/tests_fabric/test_connector.py741def test_parallel_devices_in_strategy_conflict_with_accelerator(parallel_devices, accelerator):
LOWtests/tests_fabric/test_connector.py757def test_plugin_only_one_instance_for_one_type(plugins, expected):
LOWtests/tests_fabric/test_connector.py764def test_passing_zero_and_empty_list_to_devices_flag(accelerator, devices):
LOWtests/tests_fabric/test_connector.py812def test_ddp_fork_on_unsupported_platform(_, __, strategy):
LOWtests/tests_fabric/test_connector.py861def test_precision_selection_amp_ddp(strategy, devices, is_custom_plugin, plugin_cls):
LOWtests/tests_fabric/test_connector.py915def test_precision_from_environment(_, precision, expected):
LOWtests/tests_fabric/test_connector.py938def test_accelerator_strategy_from_environment(accelerator, strategy, expected_accelerator, expected_strategy):
LOWtests/tests_fabric/test_connector.py953def test_devices_from_environment(*_):
2073 more matches not shown…
Over-Commented Block509 hits · 498 pts
SeverityFileLineSnippet
LOW.codecov.yml1# Copyright The Lightning AI team.
LOW.pre-commit-config.yaml1# Copyright The Lightning AI team.
LOWpyproject.toml1# Copyright The Lightning AI team.
LOW.readthedocs.yml1# Copyright The Lightning AI team.
LOWsetup.py1#!/usr/bin/env python
LOWtests/parity_fabric/test_parity_ddp.py1# Copyright The Lightning AI team.
LOWtests/parity_fabric/conftest.py1# Copyright The Lightning AI team.
LOWtests/parity_fabric/models.py1# Copyright The Lightning AI team.
LOWtests/parity_fabric/run_standalone_tasks.sh1#!/bin/bash
LOWtests/parity_fabric/utils.py1# Copyright The Lightning AI team.
LOWtests/parity_fabric/test_parity_simple.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/test_connector.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/conftest.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/test_fabric.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/test_wrappers.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/test_cli.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/loggers/test_tensorboard.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/loggers/test_csv.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/accelerators/test_mps.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/accelerators/test_registry.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/accelerators/test_cpu.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/accelerators/test_xla.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/accelerators/test_cuda.py1# Copyright The Lightning AI team.
LOW…sts/tests_fabric/plugins/environments/test_kubeflow.py1# Copyright The Lightning AI team.
LOW…ts/tests_fabric/plugins/environments/test_lightning.py1# Copyright The Lightning AI team.
LOW…tests_fabric/plugins/environments/test_torchelastic.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/plugins/environments/test_lsf.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/plugins/environments/test_xla.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/plugins/environments/test_slurm.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/plugins/environments/test_mpi.py1# Copyright The Lightning AI team.
LOW…ts_fabric/plugins/precision/test_double_integration.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/plugins/precision/test_amp.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/plugins/precision/test_half.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/plugins/precision/test_fsdp.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/plugins/precision/test_double.py1# Copyright The Lightning AI team.
LOW…ts_fabric/plugins/precision/test_transformer_engine.py1# Copyright The Lightning AI team.
LOW…ts/tests_fabric/plugins/precision/test_bitsandbytes.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/plugins/precision/test_deepspeed.py1# Copyright The Lightning AI team.
LOW…tests_fabric/plugins/precision/test_xla_integration.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/plugins/precision/test_xla.py1# Copyright The Lightning AI team.
LOW…fabric/plugins/precision/test_deepspeed_integration.py1# Copyright The Lightning AI team.
LOW…tests_fabric/plugins/precision/test_amp_integration.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/strategies/test_registry.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/strategies/test_xla_fsdp.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/strategies/test_strategy.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/strategies/test_fsdp.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/strategies/test_ddp.py1# Copyright The Lightning AI team.
LOW…s/tests_fabric/strategies/test_xla_fsdp_integration.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/strategies/test_dp.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/strategies/test_deepspeed.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/strategies/test_xla.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/strategies/test_model_parallel.py1# Copyright The Lightning AI team.
LOW…/tests_fabric/strategies/test_deepspeed_integration.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/strategies/test_single_device.py1# Copyright The Lightning AI team.
LOW…s_fabric/strategies/test_model_parallel_integration.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/strategies/test_ddp_integration.py1# Copyright The Lightning AI team.
LOWtests/tests_fabric/strategies/test_fsdp_integration.py1# Copyright The Lightning AI team.
LOW…_fabric/strategies/launchers/test_subprocess_script.py1# Copyright The Lightning AI team.
LOW…ts_fabric/strategies/launchers/test_multiprocessing.py1# Copyright The Lightning AI team.
LOW…rategies/launchers/test_multiprocessing_integration.py1# Copyright The Lightning AI team.
449 more matches not shown…
Cross-File Repetition86 hits · 430 pts
SeverityFileLineSnippet
HIGHtests/parity_fabric/conftest.py0ensures that torch determinism settings are reset before the next test runs.
HIGHtests/tests_fabric/conftest.py0ensures that torch determinism settings are reset before the next test runs.
HIGHtests/tests_pytorch/conftest.py0ensures that torch determinism settings are reset before the next test runs.
HIGHtests/tests_fabric/test_fabric.py0test that the strategy returns the context manager for initializing the module.
HIGHtests/tests_pytorch/trainer/test_trainer.py0test that the strategy returns the context manager for initializing the module.
HIGHtests/tests_pytorch/trainer/test_trainer.py0test that the strategy returns the context manager for initializing the module.
HIGHtests/tests_fabric/loggers/test_tensorboard.py0verify that manual versioning works for string versions, e.g. '2020-02-05-162402'.
HIGHtests/tests_fabric/loggers/test_csv.py0verify that manual versioning works for string versions, e.g. '2020-02-05-162402'.
HIGHtests/tests_pytorch/loggers/test_tensorboard.py0verify that manual versioning works for string versions, e.g. '2020-02-05-162402'.
HIGHtests/tests_pytorch/loggers/test_csv.py0verify that manual versioning works for string versions, e.g. '2020-02-05-162402'.
HIGH…sts/tests_fabric/plugins/environments/test_kubeflow.py0test the default attributes when no environment variables are set.
HIGH…ts/tests_fabric/plugins/environments/test_lightning.py0test the default attributes when no environment variables are set.
HIGH…tests_fabric/plugins/environments/test_torchelastic.py0test the default attributes when no environment variables are set.
HIGHtests/tests_fabric/plugins/environments/test_xla.py0test the default attributes when no environment variables are set.
HIGHtests/tests_fabric/plugins/environments/test_slurm.py0test the default attributes when no environment variables are set.
HIGHtests/tests_fabric/plugins/environments/test_mpi.py0test the default attributes when no environment variables are set.
HIGHtests/tests_fabric/plugins/precision/test_fsdp.py0test to ensure that the context manager correctly is set to bfloat16.
HIGHtests/tests_fabric/plugins/precision/test_fsdp.py0test to ensure that the context manager correctly is set to bfloat16.
HIGHtests/tests_pytorch/plugins/precision/test_fsdp.py0test to ensure that the context manager correctly is set to bfloat16.
HIGHtests/tests_fabric/strategies/test_xla_fsdp.py0test that the strategy returns the expected values depending on whether we're in the main process or not.
HIGHtests/tests_fabric/strategies/test_xla.py0test that the strategy returns the expected values depending on whether we're in the main process or not.
HIGHtests/tests_pytorch/strategies/test_xla.py0test that the strategy returns the expected values depending on whether we're in the main process or not.
HIGHtests/tests_fabric/strategies/test_fsdp.py0test that the strategy validates the contents at the checkpoint path.
HIGHtests/tests_fabric/strategies/test_model_parallel.py0test that the strategy validates the contents at the checkpoint path.
HIGHtests/tests_pytorch/strategies/test_fsdp.py0test that the strategy validates the contents at the checkpoint path.
HIGHtests/tests_pytorch/strategies/test_model_parallel.py0test that the strategy validates the contents at the checkpoint path.
HIGHtests/tests_fabric/strategies/test_fsdp.py0test that the timeout gets passed to the ``torch.distributed.init_process_group`` function.
HIGHtests/tests_fabric/strategies/test_ddp.py0test that the timeout gets passed to the ``torch.distributed.init_process_group`` function.
HIGHtests/tests_fabric/strategies/test_model_parallel.py0test that the timeout gets passed to the ``torch.distributed.init_process_group`` function.
HIGHtests/tests_pytorch/strategies/test_fsdp.py0test that the timeout gets passed to the ``torch.distributed.init_process_group`` function.
HIGHtests/tests_pytorch/strategies/test_ddp.py0test that the timeout gets passed to the ``torch.distributed.init_process_group`` function.
HIGHtests/tests_pytorch/strategies/test_model_parallel.py0test that the timeout gets passed to the ``torch.distributed.init_process_group`` function.
HIGHtests/tests_fabric/strategies/test_ddp.py0test that the module under the init-context gets moved to the right device and dtype.
HIGH…s_fabric/strategies/test_model_parallel_integration.py0test that the module under the init-context gets moved to the right device and dtype.
HIGHtests/tests_fabric/strategies/test_fsdp_integration.py0test that the module under the init-context gets moved to the right device and dtype.
HIGHtests/tests_pytorch/strategies/test_fsdp.py0test that the module under the init-context gets moved to the right device and dtype.
HIGHtests/tests_pytorch/strategies/test_ddp.py0test that the module under the init-context gets moved to the right device and dtype.
HIGH…_pytorch/strategies/test_model_parallel_integration.py0test that the module under the init-context gets moved to the right device and dtype.
HIGH…/tests_fabric/strategies/test_deepspeed_integration.py0test to ensure zero stage 3 works with a parallel model.
HIGHtests/tests_pytorch/strategies/test_deepspeed.py0test to ensure zero stage 3 works with a parallel model.
HIGHtests/tests_pytorch/strategies/test_deepspeed.py0test to ensure zero stage 3 works with a parallel model.
HIGHtests/tests_pytorch/loggers/test_mlflow.py0test that the logger creates the folders and files in the right place.
HIGHtests/tests_pytorch/loggers/test_mlflow.py0test that the logger creates the folders and files in the right place.
HIGHtests/tests_pytorch/loggers/test_wandb.py0test that the logger creates the folders and files in the right place.
HIGHtests/tests_pytorch/loggers/test_wandb.py0test that the logger creates the folders and files in the right place.
HIGHtests/tests_pytorch/loggers/test_wandb.py0test that the logger creates the folders and files in the right place.
HIGHtests/tests_pytorch/models/test_restore.py0tests use case where trainer saves the model, and user loads it from tags independently.
HIGHtests/tests_pytorch/models/test_restore.py0tests use case where trainer saves the model, and user loads it from tags independently.
HIGHtests/tests_pytorch/models/test_restore.py0tests use case where trainer saves the model, and user loads it from tags independently.
HIGHtests/tests_pytorch/trainer/test_trainer.py0tests use case where trainer saves the model, and user loads it from tags independently.
HIGHtests/tests_pytorch/trainer/test_trainer.py0tests use case where trainer saves the model, and user loads it from tags independently.
HIGH…s/tests_pytorch/checkpointing/test_model_checkpoint.py0test that no checkpoint is saved when an exception is raised during a sanity check or a fast dev run, or when a checkpoi
HIGH…s/tests_pytorch/checkpointing/test_model_checkpoint.py0test that no checkpoint is saved when an exception is raised during a sanity check or a fast dev run, or when a checkpoi
HIGH…s/tests_pytorch/checkpointing/test_model_checkpoint.py0test that no checkpoint is saved when an exception is raised during a sanity check or a fast dev run, or when a checkpoi
HIGHtests/tests_pytorch/trainer/test_dataloaders.py0verify inf train, val & test dataloaders (e.g. iterabledataset) passed with batch limit as number.
HIGHtests/tests_pytorch/trainer/test_dataloaders.py0verify inf train, val & test dataloaders (e.g. iterabledataset) passed with batch limit as number.
HIGHtests/tests_pytorch/trainer/test_dataloaders.py0verify inf train, val & test dataloaders (e.g. iterabledataset) passed with batch limit as number.
HIGHsrc/lightning/fabric/loggers/tensorboard.py0the directory for this run's tensorboard checkpoint. by default, it is named ``'version_${self.version}'`` but it can be
HIGHsrc/lightning/pytorch/loggers/litlogger.py0the directory for this run's tensorboard checkpoint. by default, it is named ``'version_${self.version}'`` but it can be
HIGHsrc/lightning/pytorch/loggers/tensorboard.py0the directory for this run's tensorboard checkpoint. by default, it is named ``'version_${self.version}'`` but it can be
26 more matches not shown…
Unused Imports382 hits · 378 pts
SeverityFileLineSnippet
LOWtests/tests_pytorch/accelerators/test_cpu.py9
LOWtests/tests_pytorch/strategies/test_ddp_integration.py24
LOWtests/tests_pytorch/utilities/test_imports.py31
LOW…ests_pytorch/utilities/test_deepspeed_model_summary.py19
LOWtests/tests_pytorch/helpers/__init__.py1
LOWtests/tests_pytorch/helpers/__init__.py1
LOWtests/tests_pytorch/helpers/__init__.py1
LOWtests/tests_pytorch/helpers/__init__.py1
LOWtests/tests_pytorch/helpers/__init__.py7
LOW…s_pytorch/trainer/logging_/test_distributed_logging.py18
LOWrequirements/pytorch/check-avail-extras.py2
LOWrequirements/pytorch/check-avail-extras.py3
LOWrequirements/pytorch/check-avail-extras.py4
LOWrequirements/pytorch/check-avail-extras.py5
LOWrequirements/pytorch/check-avail-extras.py6
LOWdocs/source-pytorch/conf.py17
LOWdocs/source-fabric/conf.py13
LOWexamples/fabric/reinforcement_learning/rl/utils.py11
LOWexamples/fabric/reinforcement_learning/rl/utils.py11
LOWsrc/lightning/__init__.py16
LOWsrc/lightning/__init__.py17
LOWsrc/lightning/__init__.py18
LOWsrc/lightning/__init__.py19
LOWsrc/lightning/__init__.py20
LOWsrc/lightning/__init__.py21
LOWsrc/lightning/__init__.py21
LOWsrc/lightning/__init__.py22
LOWsrc/lightning/fabric/fabric.py79
LOWsrc/lightning/fabric/__init__.py35
LOWsrc/lightning/fabric/__init__.py36
LOWsrc/lightning/fabric/__init__.py38
LOWsrc/lightning/fabric/__init__.py41
LOWsrc/lightning/fabric/__init__.py10
LOWsrc/lightning/fabric/__init__.py12
LOWsrc/lightning/fabric/__init__.py14
LOWsrc/lightning/fabric/loggers/__init__.py13
LOWsrc/lightning/fabric/loggers/__init__.py14
LOWsrc/lightning/fabric/loggers/__init__.py15
LOWsrc/lightning/fabric/accelerators/__init__.py16
LOWsrc/lightning/fabric/accelerators/__init__.py17
LOWsrc/lightning/fabric/accelerators/__init__.py17
LOWsrc/lightning/fabric/accelerators/__init__.py18
LOWsrc/lightning/fabric/accelerators/__init__.py20
LOWsrc/lightning/fabric/plugins/__init__.py14
LOWsrc/lightning/fabric/plugins/__init__.py15
LOWsrc/lightning/fabric/plugins/__init__.py16
LOWsrc/lightning/fabric/plugins/__init__.py17
LOWsrc/lightning/fabric/plugins/__init__.py18
LOWsrc/lightning/fabric/plugins/__init__.py19
LOWsrc/lightning/fabric/plugins/__init__.py20
LOWsrc/lightning/fabric/plugins/__init__.py21
LOWsrc/lightning/fabric/plugins/__init__.py22
LOWsrc/lightning/fabric/plugins/__init__.py23
LOWsrc/lightning/fabric/plugins/__init__.py24
LOWsrc/lightning/fabric/plugins/__init__.py25
LOWsrc/lightning/fabric/plugins/__init__.py26
LOWsrc/lightning/fabric/plugins/environments/__init__.py14
LOWsrc/lightning/fabric/plugins/environments/__init__.py15
LOWsrc/lightning/fabric/plugins/environments/__init__.py16
LOWsrc/lightning/fabric/plugins/environments/__init__.py17
322 more matches not shown…
Decorative Section Separators72 hits · 254 pts
SeverityFileLineSnippet
MEDIUMREADME.md142# --------------------------------
MEDIUMREADME.md144# --------------------------------
MEDIUMREADME.md175# -------------------
MEDIUMREADME.md177# -------------------
MEDIUMREADME.md181# -------------------
MEDIUMREADME.md183# -------------------
MEDIUMtests/tests_pytorch/models/test_hparams.py96# -------------------------
MEDIUMtests/tests_pytorch/models/test_hparams.py98# -------------------------
MEDIUMtests/tests_pytorch/models/test_hparams.py263# -------------------------
MEDIUMtests/tests_pytorch/models/test_hparams.py265# -------------------------
MEDIUMtests/tests_pytorch/helpers/deterministic_model.py61 # -----------------------------
MEDIUMtests/tests_pytorch/helpers/deterministic_model.py63 # -----------------------------
MEDIUMtests/tests_pytorch/trainer/flags/test_fast_dev_run.py115 # -----------------------
MEDIUMtests/tests_pytorch/trainer/flags/test_fast_dev_run.py117 # -----------------------
MEDIUM…ts_pytorch/trainer/logging_/test_train_loop_logging.py49 # -----------
MEDIUM…ts_pytorch/trainer/logging_/test_train_loop_logging.py51 # -----------
MEDIUM…ts_pytorch/trainer/logging_/test_train_loop_logging.py54 # -----------
MEDIUM…ts_pytorch/trainer/logging_/test_train_loop_logging.py56 # -----------
MEDIUM…ts_pytorch/trainer/logging_/test_train_loop_logging.py66 # -----------
MEDIUM…ts_pytorch/trainer/logging_/test_train_loop_logging.py68 # -----------
MEDIUMdocs/source-pytorch/conf.py27# -----------------------
MEDIUMdocs/source-pytorch/conf.py29# -----------------------
MEDIUMdocs/source-pytorch/conf.py36# -----------------------
MEDIUMdocs/source-pytorch/conf.py38# -----------------------
MEDIUM…ples/pytorch/domain_templates/semantic_segmentation.py376 # ------------------------
MEDIUM…ples/pytorch/domain_templates/semantic_segmentation.py378 # ------------------------
MEDIUM…ples/pytorch/domain_templates/semantic_segmentation.py381 # ------------------------
MEDIUM…ples/pytorch/domain_templates/semantic_segmentation.py383 # ------------------------
MEDIUM…ples/pytorch/domain_templates/semantic_segmentation.py386 # ------------------------
MEDIUM…ples/pytorch/domain_templates/semantic_segmentation.py388 # ------------------------
MEDIUM…pytorch/domain_templates/generative_adversarial_net.py204 # ------------------------
MEDIUM…pytorch/domain_templates/generative_adversarial_net.py206 # ------------------------
MEDIUM…pytorch/domain_templates/generative_adversarial_net.py209 # ------------------------
MEDIUM…pytorch/domain_templates/generative_adversarial_net.py211 # ------------------------
MEDIUM…pytorch/domain_templates/generative_adversarial_net.py217 # ------------------------
MEDIUM…pytorch/domain_templates/generative_adversarial_net.py219 # ------------------------
MEDIUMsrc/lightning/fabric/plugins/environments/slurm.py76 # -----------------------
MEDIUMsrc/lightning/fabric/plugins/environments/slurm.py78 # -----------------------
MEDIUMsrc/lightning/fabric/plugins/environments/slurm.py89 # -----------------------
MEDIUMsrc/lightning/fabric/plugins/environments/slurm.py91 # -----------------------
MEDIUMsrc/lightning/pytorch/loggers/litlogger.py121 # ──────────────────────────────────────────────────────────────────────────────
MEDIUMsrc/lightning/pytorch/loggers/litlogger.py123 # ──────────────────────────────────────────────────────────────────────────────
MEDIUMsrc/lightning/pytorch/loggers/litlogger.py238 # ──────────────────────────────────────────────────────────────────────────────
MEDIUMsrc/lightning/pytorch/loggers/litlogger.py240 # ──────────────────────────────────────────────────────────────────────────────
MEDIUMsrc/lightning/pytorch/loggers/litlogger.py290 # ──────────────────────────────────────────────────────────────────────────────
MEDIUMsrc/lightning/pytorch/loggers/litlogger.py292 # ──────────────────────────────────────────────────────────────────────────────
MEDIUMsrc/lightning/pytorch/loggers/litlogger.py387 # ──────────────────────────────────────────────────────────────────────────────
MEDIUMsrc/lightning/pytorch/loggers/litlogger.py389 # ──────────────────────────────────────────────────────────────────────────────
MEDIUMsrc/lightning/pytorch/loggers/litlogger.py404 # ──────────────────────────────────────────────────────────────────────────────
MEDIUMsrc/lightning/pytorch/loggers/litlogger.py406 # ──────────────────────────────────────────────────────────────────────────────
MEDIUMsrc/lightning/pytorch/loops/training_epoch_loop.py297 # =====================================================================
MEDIUMsrc/lightning/pytorch/loops/training_epoch_loop.py302 # =====================================================================
MEDIUMsrc/lightning/pytorch/loops/training_epoch_loop.py381 # -----------------------------------------
MEDIUMsrc/lightning/pytorch/loops/training_epoch_loop.py383 # -----------------------------------------
MEDIUMsrc/lightning/pytorch/loops/training_epoch_loop.py387 # -----------------------------------------
MEDIUMsrc/lightning/pytorch/loops/training_epoch_loop.py389 # -----------------------------------------
MEDIUMsrc/lightning/pytorch/loops/optimization/automatic.py180 # -------------------
MEDIUMsrc/lightning/pytorch/loops/optimization/automatic.py182 # -------------------
MEDIUMsrc/lightning/pytorch/loops/optimization/automatic.py187 # ------------------------------
MEDIUMsrc/lightning/pytorch/loops/optimization/automatic.py189 # ------------------------------
12 more matches not shown…
Self-Referential Comments57 hits · 128 pts
SeverityFileLineSnippet
MEDIUM…s_fabric/strategies/test_model_parallel_integration.py455 # Create a FSDP sharded model
MEDIUM…s_fabric/strategies/test_model_parallel_integration.py469 # Create a raw state-dict checkpoint to test `Fabric.load_raw` too
MEDIUMtests/tests_fabric/strategies/test_fsdp_integration.py306 # Create a FSDP sharded model
MEDIUMtests/tests_fabric/strategies/test_fsdp_integration.py325 # Create a raw state-dict checkpoint to test `Fabric.load_raw` too
MEDIUMtests/tests_fabric/utilities/test_cloud_io.py123 # Create a fake adlfs module so isinstance check works
MEDIUMtests/tests_pytorch/tuner/test_lr_finder.py811 # Create a simple backbone-head architecture
MEDIUMtests/tests_pytorch/loggers/test_wandb.py656 # Create a config file with the log_model parameter set. This seems necessary to be able
MEDIUMtests/tests_pytorch/callbacks/test_pruning.py430 # Create a pruning callback that applies both pruning and LTH at epoch 1
MEDIUM…_pytorch/strategies/test_model_parallel_integration.py507 # Create a regular model and load the checkpoint into it
MEDIUM…_pytorch/strategies/test_model_parallel_integration.py537 # Create a distributed model and load the checkpoint into it
MEDIUMtests/tests_pytorch/models/test_hparams.py353 instance = super().__call__(*args, **kwargs) # Create the instance
MEDIUM…ts/tests_pytorch/trainer/flags/test_overfit_batches.py131 # Create a reference train dataloader without shuffling.
MEDIUMexamples/fabric/kfold_cv/train_fabric.py105 # Create the Lightning Fabric object. The parameters like accelerator, strategy, devices etc. will be provided
MEDIUMexamples/fabric/tensor_parallel/train.py18 # Define the size of the 2D parallelism
MEDIUMexamples/fabric/tensor_parallel/train.py38 # Define the optimizer
MEDIUMexamples/fabric/image_classifier/train_fabric.py74 # Create the Lightning Fabric object. The parameters like accelerator, strategy, devices etc. will be proided
MEDIUMexamples/fabric/dcgan/train_torch.py67 # Create the dataloader
MEDIUMexamples/fabric/dcgan/train_torch.py90 # Create the generator
MEDIUMexamples/fabric/dcgan/train_torch.py100 # Create the Discriminator
MEDIUMexamples/fabric/dcgan/train_fabric.py68 # Create the dataloader
MEDIUMexamples/fabric/dcgan/train_fabric.py83 # Create the generator
MEDIUMexamples/fabric/dcgan/train_fabric.py89 # Create the Discriminator
MEDIUMexamples/fabric/reinforcement_learning/train_torch.py157 # Define the agent and the optimizer and setup them with DistributedDataParallel
MEDIUMexamples/fabric/reinforcement_learning/train_fabric.py93 # Define the agent and the optimizer and setup them with Fabric
MEDIUM…abric/reinforcement_learning/train_fabric_decoupled.py50 # Initialize Fabric object
MEDIUM…abric/reinforcement_learning/train_fabric_decoupled.py68 # Define the agent
MEDIUM…abric/reinforcement_learning/train_fabric_decoupled.py234 # Define the agent and the optimizer and setup them with Fabric
MEDIUM…abric/reinforcement_learning/train_fabric_decoupled.py330 # Create a global group, assigning it to the collective: used by the player to exchange
MEDIUM…abric/reinforcement_learning/train_fabric_decoupled.py335 # Create a group between rank-0 (player) and rank-1 (trainer), assigning it to the collective:
MEDIUM…abric/reinforcement_learning/train_fabric_decoupled.py339 # Create a new group, without assigning it to the collective: in this way the trainers can
MEDIUMexamples/fabric/meta_learning/train_fabric.py62 # Create the Fabric object
MEDIUMexamples/pytorch/tensor_parallel/train.py51 # Define the size of the 2D parallelism
MEDIUMsrc/lightning/fabric/accelerators/registry.py23 """This class is a Registry that stores information about the Accelerators.
MEDIUMsrc/lightning/fabric/plugins/io/checkpoint_io.py79 """This method is called to teardown the process."""
MEDIUMsrc/lightning/fabric/plugins/precision/precision.py158 """This method is called to teardown the training process.
MEDIUMsrc/lightning/fabric/strategies/registry.py20 """This class is a Registry that stores information about the Training Strategies.
MEDIUMsrc/lightning/fabric/strategies/strategy.py365 """This method is called to teardown the training process.
MEDIUMsrc/lightning/fabric/utilities/types.py53 """This class is used to detect if an object is stateful using `isinstance(obj, _Stateful)`."""
MEDIUMsrc/lightning/fabric/utilities/distributed.py422 # Create a barrier with an 'infinite' timeout (only reliably possible over the GLOO backend)
MEDIUMsrc/lightning/fabric/utilities/data.py177 """This function is used to handle the sampler, batch_sampler arguments associated within a DataLoader for its re-
MEDIUMsrc/lightning/pytorch/overrides/distributed.py236 """This class is used to wrap a :class:`torch.utils.data.BatchSampler` and capture its indices."""
MEDIUMsrc/lightning/pytorch/loggers/mlflow.py369 # Create a temporary directory to log on mlflow
MEDIUMsrc/lightning/pytorch/core/optimizer.py40 """This class is used to wrap the user optimizers and handle properly the backward and optimizer_step logic across
MEDIUMsrc/lightning/pytorch/core/optimizer.py64 """This function is just a helper for advanced users.
MEDIUMsrc/lightning/pytorch/callbacks/pruning.py447 """This function is responsible of sanitizing ``parameters_to_prune`` and ``parameter_names``. If
MEDIUMsrc/lightning/pytorch/callbacks/finetuning.py49 r"""This class implements the base logic for writing your own Finetuning Callback.
MEDIUMsrc/lightning/pytorch/callbacks/finetuning.py128 """This function is used to flatten a module or an iterable of modules into a list of its leaf modules (modules
MEDIUMsrc/lightning/pytorch/callbacks/finetuning.py227 """This function is used to exclude any parameter which already exists in this optimizer.
MEDIUMsrc/lightning/pytorch/callbacks/lr_monitor.py251 """This function is used the remap the keys if param groups for a given optimizer increased."""
MEDIUMsrc/lightning/pytorch/plugins/io/async_plugin.py86 """This method is called to close the threads."""
MEDIUMsrc/lightning/pytorch/strategies/strategy.py527 """This method is called to teardown the training process.
MEDIUMsrc/lightning/pytorch/profilers/pytorch.py105 """This class is used to override the schedule logic from the profiler and perform recording for both
MEDIUMsrc/lightning/pytorch/utilities/data.py238 """This function is used to handle the sampler, batch_sampler arguments associated within a DataLoader for its re-
MEDIUMsrc/lightning/pytorch/loops/fetchers.py87 """This class is used to control batch fetching flow.
MEDIUMsrc/lightning/pytorch/loops/fetchers.py147 """This class is used to return directly the `dataloader_iter` to the ``LightningModule`` training_step for users
MEDIUM…lightning/pytorch/trainer/connectors/data_connector.py237 """This function is used to created the distributed sampler injected within the user DataLoader."""
MEDIUM…/pytorch/trainer/connectors/logger_connector/result.py456 """This function is used to iterate over current valid metrics."""
Docstring Block Structure23 hits · 115 pts
SeverityFileLineSnippet
HIGHsrc/lightning/fabric/fabric.py377Set up one or more optimizers for accelerated training. Some strategies do not allow setting up model and optim
HIGHsrc/lightning/fabric/fabric.py536Clip the gradients of the model to a given max value or max norm. Args: module: The module whose pa
HIGHsrc/lightning/fabric/fabric.py734Skip gradient synchronization during backward to avoid redundant communication overhead. Use this context manag
HIGHsrc/lightning/fabric/fabric.py956Launch and initialize all the processes needed for distributed execution. Args: function: Optional
HIGHsrc/lightning/fabric/accelerators/cpu.py81Parses the cpu_cores given in the format as accepted by the ``devices`` argument in the :class:`~lightning.pytorch.t
HIGHsrc/lightning/fabric/plugins/io/torch_io.py67Loads checkpoint using :func:`torch.load`, with additional handling for ``fsspec`` remote loading of files. Arg
HIGHsrc/lightning/fabric/strategies/deepspeed.py478Load the contents from a checkpoint and restore the state of the given objects. Args: path: A path
HIGHsrc/lightning/fabric/utilities/logger.py78Flatten hierarchical dict, e.g. ``{'a': {'b': 'c'}} -> {'a/b': 'c'}``. Args: params: Dictionary containing
HIGHsrc/lightning/fabric/utilities/device_parser.py24 Args: gpus: Non-empty list of ints representing which GPUs to use Returns: Designated root GPU
HIGHsrc/lightning/fabric/utilities/device_parser.py54Parses the GPU IDs given in the format as accepted by the :class:`~lightning.pytorch.trainer.trainer.Trainer`. Args
HIGHsrc/lightning/fabric/utilities/device_parser.py117Checks that each of the GPUs in the list is actually available. Raises a MisconfigurationException if any of the GPU
HIGHsrc/lightning/pytorch/loggers/comet.py46Track your parameters, metrics, source code and more using `Comet <https://www.comet.com/?utm_source=lightning.pytor
HIGHsrc/lightning/pytorch/loggers/wandb.py52Log using `Weights and Biases <https://docs.wandb.ai/guides/integrations/lightning>`_. **Installation and set-up**
HIGHsrc/lightning/pytorch/loggers/logger.py106Merge a sequence with dictionaries into one dictionary by aggregating the same keys with some given function. Args:
HIGHsrc/lightning/pytorch/accelerators/cuda.py65Gets stats for the given GPU device. Args: device: GPU device for which to get stats Retur
HIGHsrc/lightning/pytorch/accelerators/cuda.py123Get GPU stats including memory, fan speed, and temperature from nvidia-smi. Args: device: GPU device for wh
HIGHsrc/lightning/pytorch/callbacks/pruning.py82Model pruning Callback, using PyTorch's prune utilities. This callback is responsible of pruning networks parame
HIGHsrc/lightning/pytorch/callbacks/model_checkpoint.py51Save the model after every epoch by monitoring a quantity. Every logged metrics are passed to the :class:`~lightning
HIGHsrc/lightning/pytorch/callbacks/early_stopping.py49Monitor a metric and stop training when it stops improving. Args: monitor: quantity to be monitored.
HIGHsrc/lightning/pytorch/trainer/setup.py185Convert a time interval into seconds. This helper parses different representations of a time interval and norma
HIGHsrc/lightning/pytorch/trainer/trainer.py651Perform one evaluation epoch over the validation set. Args: model: The model to validate.
HIGHsrc/lightning/pytorch/trainer/trainer.py769Perform one evaluation epoch over the test set. It's separated from fit to make sure you never run on your test
HIGHsrc/lightning/pytorch/trainer/trainer.py888Run inference on your data. This will call the model forward function to compute predictions. Useful to perform
Hallucination Indicators10 hits · 95 pts
SeverityFileLineSnippet
CRITICALtests/tests_pytorch/test_cli.py545 assert cli.config.fit.model.class_path.endswith(".BoringCkptPathSubclass")
CRITICAL…s/tests_pytorch/core/test_metric_result_integration.py608 pl.trainer.connectors.logger_connector.result.warning_cache.clear()
CRITICAL…_pytorch/strategies/test_model_parallel_integration.py319 assert self.model.w1.weight.device_mesh.size(0) == 2
CRITICAL…_pytorch/strategies/test_model_parallel_integration.py320 assert self.model.w1.weight.device_mesh.size(1) == 2
CRITICALtests/tests_pytorch/loops/test_loops.py255 assert trainer.fit_loop.epoch_loop.val_loop.batch_progress.state_dict() == expected
CRITICALsrc/lightning/pytorch/tuner/batch_size_scaling.py409 trainer.fit_loop.epoch_loop.automatic_optimization.optim_progress.reset()
CRITICALsrc/lightning/pytorch/tuner/batch_size_scaling.py411 trainer.fit_loop.epoch_loop.manual_optimization.optim_step_progress.reset()
CRITICALsrc/lightning/pytorch/strategies/ddp.py253 self._model_averager = torch.distributed.algorithms.model_averaging.averagers.PeriodicModelAverager(
CRITICALsrc/lightning/pytorch/trainer/trainer.py1363 self.fit_loop.epoch_loop.val_loop._data_source.is_defined()
CRITICAL…c/lightning/pytorch/trainer/configuration_validator.py65 has_val_loader = trainer.fit_loop.epoch_loop.val_loop._data_source.is_defined()
Deep Nesting77 hits · 76 pts
SeverityFileLineSnippet
LOWsetup.py88
LOWtests/tests_fabric/conftest.py85
LOWtests/tests_pytorch/conftest.py142
LOWtests/tests_pytorch/tuner/test_scale_batch_size.py356
LOW…sts/tests_pytorch/callbacks/test_throughput_monitor.py426
LOWtests/tests_pytorch/utilities/test_combined_loader.py472
LOWtests/tests_pytorch/loops/test_loops.py637
LOWtests/tests_pytorch/loops/test_loops.py638
LOWtests/tests_pytorch/trainer/test_trainer.py756
LOW…ests_pytorch/trainer/logging_/test_logger_connector.py40
LOW…ests_pytorch/trainer/logging_/test_logger_connector.py473
LOW.actions/assistant.py58
LOWexamples/fabric/image_classifier/train_torch.py55
LOWexamples/fabric/image_classifier/train_fabric.py73
LOWexamples/fabric/build_your_own_trainer/trainer.py523
LOWexamples/fabric/dcgan/train_torch.py48
LOWexamples/fabric/dcgan/train_fabric.py49
LOWexamples/fabric/reinforcement_learning/train_torch.py110
LOWexamples/fabric/reinforcement_learning/train_fabric.py66
LOW…abric/reinforcement_learning/train_fabric_decoupled.py42
LOW…abric/reinforcement_learning/train_fabric_decoupled.py214
LOW…amples/pytorch/domain_templates/reinforce_learn_ppo.py286
LOWsrc/lightning/fabric/fabric.py1128
LOWsrc/lightning/fabric/cli.py188
LOWsrc/lightning/fabric/connector.py164
LOW…ghtning/fabric/plugins/precision/transformer_engine.py151
LOWsrc/lightning/fabric/strategies/fsdp.py415
LOWsrc/lightning/fabric/strategies/fsdp.py515
LOWsrc/lightning/fabric/strategies/strategy.py406
LOWsrc/lightning/fabric/strategies/model_parallel.py544
LOWsrc/lightning/fabric/utilities/throughput.py546
LOWsrc/lightning/fabric/utilities/logger.py77
LOWsrc/lightning/fabric/utilities/cloud_io.py85
LOWsrc/lightning/fabric/utilities/data.py173
LOWsrc/lightning/fabric/utilities/data.py359
LOWsrc/lightning/pytorch/tuner/batch_size_scaling.py180
LOWsrc/lightning/pytorch/tuner/batch_size_scaling.py235
LOWsrc/lightning/pytorch/tuner/lr_finder.py199
LOWsrc/lightning/pytorch/tuner/tuning.py31
LOWsrc/lightning/pytorch/loggers/wandb.py378
LOWsrc/lightning/pytorch/core/optimizer.py200
LOWsrc/lightning/pytorch/core/optimizer.py250
LOWsrc/lightning/pytorch/core/module.py1139
LOWsrc/lightning/pytorch/core/module.py1168
LOWsrc/lightning/pytorch/core/module.py1494
LOWsrc/lightning/pytorch/callbacks/pruning.py66
LOWsrc/lightning/pytorch/callbacks/pruning.py444
LOWsrc/lightning/pytorch/callbacks/model_checkpoint.py340
LOWsrc/lightning/pytorch/callbacks/finetuning.py113
LOWsrc/lightning/pytorch/callbacks/lr_monitor.py250
LOWsrc/lightning/pytorch/callbacks/early_stopping.py246
LOW…/lightning/pytorch/callbacks/progress/tqdm_progress.py422
LOWsrc/lightning/pytorch/strategies/fsdp.py524
LOWsrc/lightning/pytorch/strategies/fsdp.py588
LOWsrc/lightning/pytorch/profilers/pytorch.py167
LOWsrc/lightning/pytorch/profilers/pytorch.py194
LOWsrc/lightning/pytorch/utilities/model_helpers.py29
LOWsrc/lightning/pytorch/utilities/data.py43
LOWsrc/lightning/pytorch/utilities/data.py62
LOWsrc/lightning/pytorch/utilities/data.py233
17 more matches not shown…
Redundant / Tautological Comments17 hits · 28 pts
SeverityFileLineSnippet
LOWtests/tests_pytorch/profilers/test_profiler.py715 # Check if setting max_name_column_width results in a wider table (more dashes)
LOW…ts/tests_pytorch/trainer/flags/test_overfit_batches.py210 # Check if the batches are identical
LOW…ghtning/fabric/plugins/precision/transformer_engine.py174 # Check if bias exists before attempting to clone its data
LOWsrc/lightning/fabric/utilities/cloud_io.py170 # Check if the path is not already taken by a file. If not, it is considered a valid directory-like path
LOWsrc/lightning/pytorch/tuner/batch_size_scaling.py207 # Check if this is the last trial before trying to double
LOWsrc/lightning/pytorch/tuner/batch_size_scaling.py271 # Check if we've reached max_trials before trying to adjust batch size
LOWsrc/lightning/pytorch/tuner/lr_finder.py424 # Check if we diverging
LOWsrc/lightning/pytorch/core/module.py1384 # Set gradients to `None` instead of zero to improve performance (not required on `torch>=2.0.0`).
LOWsrc/lightning/pytorch/callbacks/pruning.py280 # Check if the parameter has been pruned (has _orig suffix)
LOWsrc/lightning/pytorch/callbacks/model_checkpoint.py355 # Check if we should skip due to trainer/callback state
LOWsrc/lightning/pytorch/callbacks/model_checkpoint.py376 if not saved_models: # Check if dictionary is not empty
LOWsrc/lightning/pytorch/strategies/model_parallel.py400 # Check if key starts with "prefix." (the compiled module path)
LOWsrc/lightning/pytorch/utilities/parsing.py249 # Check if attribute in model
LOWsrc/lightning/pytorch/utilities/parsing.py253 # Check if attribute in model.hparams, either namespace or dict
LOWsrc/lightning/pytorch/utilities/parsing.py258 # Check if the attribute in datamodule (datamodule gets registered in Trainer)
LOW…ng/pytorch/trainer/connectors/accelerator_connector.py576 # Set benchmark to False to ensure determinism
LOW…tning/pytorch/trainer/connectors/callback_connector.py182 # Check if LitLogger is being used with log_model enabled
Excessive Try-Catch Wrapping17 hits · 20 pts
SeverityFileLineSnippet
LOW…sts/tests_pytorch/callbacks/test_throughput_monitor.py464 except Exception as e:
LOWtests/tests_pytorch/helpers/datasets.py112 except Exception as ex:
LOWtests/tests_pytorch/helpers/threading.py27 except Exception as e:
MEDIUMtests/tests_pytorch/helpers/threading.py24def run(self):
LOW…sts/tests_pytorch/trainer/test_ddp_sigterm_handling.py62 except Exception as e:
LOWtests/tests_pytorch/trainer/test_trainer.py157 except Exception:
LOWtests/tests_pytorch/trainer/test_trainer.py168 except Exception:
LOW…torch/trainer/optimization/test_manual_optimization.py195 except Exception:
LOWsrc/lightning/fabric/loggers/tensorboard.py215 except Exception as ex:
LOWsrc/lightning/fabric/utilities/logger.py70 except Exception:
LOWsrc/lightning/pytorch/tuner/batch_size_scaling.py100 except Exception as ex:
LOWsrc/lightning/pytorch/tuner/lr_finder.py284 except Exception as ex:
LOWsrc/lightning/pytorch/core/datamodule.py291 except Exception:
LOWsrc/lightning/pytorch/loops/training_epoch_loop.py266 except Exception:
MEDIUMsrc/lightning/pytorch/loops/training_epoch_loop.py259def _broadcast_sigterm_tensor(self) -> None:
LOWsrc/lightning/pytorch/demos/mnist_datamodule.py112 except Exception as ex:
MEDIUMsrc/lightning/pytorch/demos/mnist_datamodule.py138 print(f"Error {ex} downloading `torchvision.datasets.MNIST`")
AI Slop Vocabulary9 hits · 14 pts
SeverityFileLineSnippet
MEDIUMtests/parity_fabric/utils.py27 # The median is more robust to outliers than the mean
MEDIUMtests/tests_fabric/utilities/test_data.py452 """This test asserts, that custom `BatchSampler`, with all the arguments, that are required in order to properly
LOWtests/tests_pytorch/callbacks/test_weight_averaging.py105 # model and will just call the epoch-level hooks. For that reason, we check that we are not restarting before
LOWtests/tests_pytorch/callbacks/test_weight_averaging.py154 # model and will just call the epoch-level hooks. For that reason, we check that we are not restarting before
LOW…/tests_pytorch/callbacks/test_stochastic_weight_avg.py107 # not update the model and just call the epoch-level hooks, for that reason, we check that we are not
MEDIUMtests/tests_pytorch/utilities/test_data.py144 """This test asserts, that custom `BatchSampler`, with all the arguments, that are required in order to properly
MEDIUMsrc/lightning/fabric/accelerators/cuda.py161 return major >= 8 # Ampere and later leverage tensor cores, where this setting becomes useful
LOWsrc/lightning/fabric/utilities/logger.py60 # If it's a class, don't try to instantiate it, just return the name
MEDIUMsrc/lightning/fabric/utilities/distributed.py350 """Reset the sampler list in order to get new sampling."""
Slop Phrases5 hits · 10 pts
SeverityFileLineSnippet
LOWexamples/fabric/image_classifier/train_fabric.py93 # don't forget to call `setup_dataloaders` to prepare for dataloaders for distributed training.
LOWexamples/fabric/image_classifier/train_fabric.py93 # don't forget to call `setup_dataloaders` to prepare for dataloaders for distributed training.
LOWexamples/fabric/image_classifier/train_fabric.py99 # don't forget to call `setup` to prepare for model / optimizer for distributed training.
LOWexamples/fabric/image_classifier/train_fabric.py99 # don't forget to call `setup` to prepare for model / optimizer for distributed training.
LOW…tning/fabric/strategies/launchers/subprocess_script.py132 # if hydra is available and initialized, make sure to set the cwd correctly
Example Usage Blocks2 hits · 3 pts
SeverityFileLineSnippet
LOWtests/legacy/generate_checkpoints.sh2# Usage:
LOWdocs/generate_docs_for_tags.sh2# Usage: