MCPcopy Create free account

hub / github.com/Lightning-AI/pytorch-lightning / types & classes

Types & classes1,239 in github.com/Lightning-AI/pytorch-lightning

↓ 984 callersClassTrainer
src/lightning/pytorch/trainer/trainer.py:89
↓ 359 callersClassBoringModel
Testing PL Module. Use as follows: - subclass - modify the behavior for what you want .. warning:: This is meant for testing/debugg
src/lightning/pytorch/demos/boring_classes.py:96
↓ 135 callersClassFabric
r"""Fabric accelerates your PyTorch training or inference code with minimal changes required. Key Features: - Automatic placement of mode
src/lightning/fabric/fabric.py:86
↓ 126 callersClassModelCheckpoint
r"""Save the model after every epoch by monitoring a quantity. Every logged metrics are passed to the :class:`~lightning.pytorch.loggers.logger.Lo
src/lightning/pytorch/callbacks/model_checkpoint.py:50
↓ 109 callersClassRandomDataset
.. warning:: This is meant for testing/debugging and is experimental.
src/lightning/pytorch/demos/boring_classes.py:49
↓ 103 callersClassMisconfigurationException
Exception used to inform users of misuse with Lightning.
src/lightning/fabric/utilities/exceptions.py:16
↓ 70 callersClass_Connector
The Connector parses several Fabric arguments and instantiates the Strategy including its owned components. A. accelerator flag could be:
src/lightning/fabric/connector.py:74
↓ 68 callersClassDeepSpeedStrategy
src/lightning/fabric/strategies/deepspeed.py:55
↓ 58 callersClassLightningCLI
Implementation of a configurable command line tool for pytorch-lightning.
src/lightning/pytorch/cli.py:319
↓ 57 callersClassFSDPStrategy
r"""Strategy for Fully Sharded Data Parallel provided by torch.distributed. Fully Sharded Training shards the entire model across all available G
src/lightning/fabric/strategies/fsdp.py:86
↓ 56 callersClassCSVLogger
r"""Log to the local file system in CSV format. Logs are saved to ``os.path.join(root_dir, name, version)``. Args: root_dir: The roo
src/lightning/fabric/loggers/csv_logs.py:33
↓ 54 callersClassModelParallelStrategy
Enables user-defined parallelism applied to a model. .. warning:: This is an :ref:`experimental <versioning:Experimental API>` feature. Cur
src/lightning/fabric/strategies/model_parallel.py:67
↓ 52 callersClassTensorBoardLogger
r"""Log to local file system in `TensorBoard <https://www.tensorflow.org/tensorboard>`_ format. Implemented using :class:`~tensorboardX.SummaryWr
src/lightning/fabric/loggers/tensorboard.py:43
↓ 46 callersClassTuner
Tuner class to tune your model.
src/lightning/pytorch/tuner/tuning.py:25
↓ 38 callersClassDDPStrategy
Strategy for multi-process single-device training on one or multiple nodes.
src/lightning/fabric/strategies/ddp.py:53
↓ 31 callersClassClassifDataModule
tests/tests_pytorch/helpers/datamodules.py:101
↓ 29 callersClassCombinedLoader
Combines different iterables under specific sampling modes. Args: iterables: the iterable or collection of iterables to sample from.
src/lightning/pytorch/utilities/combined_loader.py:222
↓ 29 callersClassLitLogger
Logger that enables remote experiment tracking, logging, and artifact management on lightning.ai.
src/lightning/pytorch/loggers/litlogger.py:53
↓ 27 callersClassEarlyStopping
r"""Monitor a metric and stop training when it stops improving. Args: monitor: quantity to be monitored. min_delta: minimum chang
src/lightning/pytorch/callbacks/early_stopping.py:48
↓ 27 callersClassSingleDeviceStrategy
Strategy that handles communication on a single device.
src/lightning/fabric/strategies/single_device.py:29
↓ 26 callersClassFSDPPrecision
Precision plugin for training with Fully Sharded Data Parallel (FSDP). .. warning:: This is an :ref:`experimental <versioning:Experimental API>`
src/lightning/fabric/plugins/precision/fsdp.py:37
↓ 24 callersClassClassificationModel
tests/tests_pytorch/helpers/simple_models.py:28
↓ 22 callersClassLearningRateMonitor
r"""Automatically monitor and logs learning rate for learning rate schedulers during training. Args: logging_interval: set to ``'epoch'``
src/lightning/pytorch/callbacks/lr_monitor.py:38
↓ 22 callersClassLightningEnvironment
The default environment used by Lightning for a single node or free cluster (not managed). There are two modes the Lightning environment can oper
src/lightning/fabric/plugins/environments/lightning.py:24
↓ 22 callersClassRichProgressBar
Create a progress bar with `rich text formatting <https://github.com/Textualize/rich>`_. Install it with pip: .. code-block:: bash
src/lightning/pytorch/callbacks/progress/rich_progress.py:268
↓ 20 callersClassTQDMProgressBar
r"""This is the default progress bar used by Lightning. It prints to ``stdout`` using the :mod:`tqdm` package and shows up to four different bars:
src/lightning/pytorch/callbacks/progress/tqdm_progress.py:64
↓ 17 callersClass_DtypeContextManager
A context manager to change the default tensor type when tensors get created. See: :func:`torch.set_default_dtype`
src/lightning/fabric/plugins/precision/utils.py:26
↓ 17 callersClass_MultiProcessingLauncher
r"""Launches processes that run a given function in parallel, and joins them all at the end. The main process in which this launcher is invoked c
src/lightning/fabric/strategies/launchers/multiprocessing.py:39
↓ 16 callersClassBoringDataModule
.. warning:: This is meant for testing/debugging and is experimental.
src/lightning/pytorch/demos/boring_classes.py:157
↓ 16 callersClassMLFlowLogger
Log using `MLflow <https://mlflow.org>`_. Install it with pip: .. code-block:: bash pip install mlflow # or mlflow-skinny ..
src/lightning/pytorch/loggers/mlflow.py:49
↓ 16 callersClassMixedPrecision
Plugin for Automatic Mixed Precision (AMP) training with ``torch.autocast``. Args: precision: Whether to use ``torch.float16`` (``'16-mix
src/lightning/fabric/plugins/precision/amp.py:30
↓ 15 callersClass_FabricModule
src/lightning/fabric/wrappers.py:101
↓ 14 callersClassBatchSizeModel
tests/tests_pytorch/tuner/test_scale_batch_size.py:44
↓ 14 callersClassBoringModel
tests/tests_fabric/test_fabric.py:48
↓ 14 callersClassLogInTwoMethods
tests/tests_pytorch/checkpointing/test_model_checkpoint.py:58
↓ 14 callersClassTestModel
tests/tests_pytorch/callbacks/test_weight_averaging.py:31
↓ 14 callersClassXLAPrecision
Plugin for training with XLA. Args: precision: Full precision (32-true) or half precision (16-true, bf16-true). Raises: Valu
src/lightning/fabric/plugins/precision/xla.py:27
↓ 13 callersClassSLURMEnvironment
Cluster environment for training on a cluster managed by SLURM. You can configure the `main_address` and `main_port` properties via the env varia
src/lightning/fabric/plugins/environments/slurm.py:33
↓ 13 callersClassWandbLogger
r"""Log using `Weights and Biases <https://docs.wandb.ai/guides/integrations/lightning>`_. **Installation and set-up** Install with pip:
src/lightning/pytorch/loggers/wandb.py:51
↓ 13 callersClassXLAStrategy
Strategy for training multiple TPU devices using the :func:`torch_xla.distributed.xla_multiprocessing.spawn` method.
src/lightning/fabric/strategies/xla.py:39
↓ 13 callersClass_AcceleratorConnector
src/lightning/pytorch/trainer/connectors/accelerator_connector.py:74
↓ 12 callersClassPrecision
Base class for all plugins handling the precision-specific parts of the training. The class attribute precision must be overwritten in child clas
src/lightning/fabric/plugins/precision/precision.py:39
↓ 12 callersClassTestModel
tests/tests_pytorch/trainer/test_trainer.py:186
↓ 11 callersClassDeepSpeedPrecision
Precision plugin for DeepSpeed integration. Args: precision: Full precision (32-true), half precision (16-true, bf16-true) or
src/lightning/fabric/plugins/precision/deepspeed.py:33
↓ 11 callersClassHalfPrecision
Plugin for training with half precision. Args: precision: Whether to use ``torch.float16`` (``'16-true'``) or ``torch.bfloat16`` (``'bf16
src/lightning/fabric/plugins/precision/half.py:27
↓ 11 callersClassModelSummary
r"""Generates a summary of all layers in a :class:`~lightning.pytorch.core.LightningModule`. Args: max_depth: The maximum depth of layer
src/lightning/pytorch/callbacks/model_summary.py:39
↓ 11 callersClassTestModel
tests/tests_pytorch/trainer/logging_/test_train_loop_logging.py:44
↓ 11 callersClassTestModel
tests/tests_pytorch/trainer/logging_/test_eval_loop_logging.py:45
↓ 11 callersClassTimer
The Timer callback tracks the time spent in the training, validation, and test loops and interrupts the Trainer if the given time limit for the tr
src/lightning/pytorch/callbacks/timer.py:42
↓ 11 callersClass_SubprocessScriptLauncher
r"""A process launcher that invokes the current script as many times as desired in a single node. This launcher needs to be invoked on each node.
src/lightning/fabric/strategies/launchers/subprocess_script.py:36
↓ 10 callersClassLightningModule
tests/tests_pytorch/utilities/test_signature_utils.py:7
↓ 10 callersClassMNIST
Customized `MNIST <http://yann.lecun.com/exdb/mnist/>`_ dataset for testing PyTorch Lightning without the torchvision dependency. Part of the
tests/tests_pytorch/helpers/datasets.py:27
↓ 10 callersClassPyTorchProfiler
src/lightning/pytorch/profilers/pytorch.py:219
↓ 10 callersClass_ResultCollection
Collection (dictionary) of :class:`~lightning.pytorch.trainer.connectors.logger_connector.result._ResultMetric` Example:: # you can log
src/lightning/pytorch/trainer/connectors/logger_connector/result.py:312
↓ 10 callersClasspl_legacy_patch
Registers legacy artifacts (classes, methods, etc.) that were removed but still need to be included for unpickling old checkpoints. The following
src/lightning/pytorch/utilities/migration/utils.py:79
↓ 9 callersClassSimpleProfiler
This profiler simply records the duration of actions (in seconds) and reports the mean duration of each action and the total time spent over the e
src/lightning/pytorch/profilers/simple.py:36
↓ 9 callersClassTestModel
tests/tests_pytorch/strategies/test_deepspeed.py:182
↓ 9 callersClassThroughputMonitor
r"""Computes and logs throughput with the :class:`~lightning.fabric.utilities.throughput.Throughput` Example:: class MyModel(LightningMo
src/lightning/pytorch/callbacks/throughput_monitor.py:42
↓ 9 callersClassXLAEnvironment
Cluster environment for training on a TPU Pod with the `PyTorch/XLA <https://pytorch.org/xla>`_ library. A list of environment variables set by X
src/lightning/fabric/plugins/environments/xla.py:26
↓ 9 callersClass_FabricOptimizer
src/lightning/fabric/wrappers.py:52
↓ 9 callersClass_Sync
src/lightning/pytorch/trainer/connectors/logger_connector/result.py:50
↓ 8 callersClassCometLogger
r"""Track your parameters, metrics, source code and more using `Comet <https://www.comet.com/?utm_source=lightning.pytorch&utm_medium=referral>`_.
src/lightning/pytorch/loggers/comet.py:45
↓ 8 callersClassCustomBoringModel
tests/tests_pytorch/tuner/test_lr_finder.py:44
↓ 8 callersClassEMATestCallback
tests/tests_pytorch/callbacks/test_weight_averaging.py:80
↓ 8 callersClassGradientAccumulationScheduler
r"""Change gradient accumulation factor according to scheduling. Args: scheduling: scheduling in format {epoch: accumulation_factor}
src/lightning/pytorch/callbacks/gradient_accumulation_scheduler.py:34
↓ 8 callersClassRandomDataset
tests/tests_fabric/helpers/datasets.py:8
↓ 8 callersClassRandomIterableDataset
.. warning:: This is meant for testing/debugging and is experimental.
src/lightning/pytorch/demos/boring_classes.py:65
↓ 8 callersClassTestModel
tests/tests_pytorch/trainer/optimization/test_manual_optimization.py:106
↓ 8 callersClassWikiText2
Mini version of WikiText2.
src/lightning/pytorch/demos/transformer.py:113
↓ 8 callersClassXLAAccelerator
Accelerator for XLA devices, normally TPUs. .. warning:: Use of this accelerator beyond import and instantiation is experimental.
src/lightning/fabric/accelerators/xla.py:26
↓ 8 callersClassXLAFSDPStrategy
r"""Strategy for training multiple XLA devices using the :func:`torch_xla.distributed.xla_fully_sharded_data_parallel.XlaFullyShardedDataParallel`
src/lightning/fabric/strategies/xla_fsdp.py:54
↓ 7 callersClassAttributeDict
A container to store state variables of your program. This is a drop-in replacement for a Python dictionary, with the additional functionality to
src/lightning/fabric/utilities/data.py:462
↓ 7 callersClassBatchSizeFinder
Finds the largest batch size supported by a given model before encountering an out of memory (OOM) error. All you need to do is add it as a callb
src/lightning/pytorch/callbacks/batch_size_finder.py:33
↓ 7 callersClassBitsandbytesPrecision
Plugin for quantizing weights with `bitsandbytes <https://github.com/bitsandbytes-foundation/bitsandbytes>`__. .. warning:: This is an :ref:`exp
src/lightning/fabric/plugins/precision/bitsandbytes.py:46
↓ 7 callersClassCounter
tests/tests_pytorch/trainer/test_dataloaders.py:209
↓ 7 callersClassEMAWeightAveraging
Exponential Moving Average (EMA) Weight Averaging callback.
src/lightning/pytorch/callbacks/weight_averaging.py:366
↓ 7 callersClassFeedForward
tests/tests_fabric/strategies/test_model_parallel_integration.py:39
↓ 7 callersClassLRSchedulerConfig
src/lightning/pytorch/utilities/types.py:81
↓ 7 callersClassMyLightningCLI
tests/tests_pytorch/test_cli.py:196
↓ 7 callersClassTestModel
tests/tests_pytorch/trainer/properties/test_log_dir.py:23
↓ 7 callersClass_Metadata
src/lightning/pytorch/trainer/connectors/logger_connector/result.py:106
↓ 7 callersClass_ModuleMode
Captures the ``nn.Module.training`` (bool) mode of every submodule, and allows it to be restored later on.
src/lightning/pytorch/utilities/model_helpers.py:64
↓ 7 callersClass_Progress
Track aggregated and current progress. Args: total: Intended to track the total progress of an event. current: Intended to track
src/lightning/pytorch/loops/progress.py:139
↓ 7 callersClass_ResultMetric
Wraps the value provided to `:meth:`~lightning.pytorch.core.LightningModule.log`
src/lightning/pytorch/trainer/connectors/logger_connector/result.py:183
↓ 7 callersClass_SignalConnector
src/lightning/pytorch/trainer/connectors/signal_connector.py:39
↓ 6 callersClassDeviceStatsMonitor
r"""Automatically monitors and logs device stats during training, validation and testing stage. ``DeviceStatsMonitor`` is a special callback as it
src/lightning/pytorch/callbacks/device_stats_monitor.py:33
↓ 6 callersClassDoublePrecision
Plugin for training with double (``torch.float64``) precision.
src/lightning/fabric/plugins/precision/double.py:27
↓ 6 callersClassKubeflowEnvironment
Environment for distributed training using the `PyTorchJob`_ operator from `Kubeflow`_. This environment, unlike others, does not get auto-detect
src/lightning/fabric/plugins/environments/kubeflow.py:25
↓ 6 callersClassLSFEnvironment
An environment for running on clusters managed by the LSF resource manager. It is expected that any execution using this ClusterEnvironment was e
src/lightning/fabric/plugins/environments/lsf.py:26
↓ 6 callersClassLearningRateFinder
The ``LearningRateFinder`` callback enables the user to do a range test of good initial learning rates, to reduce the amount of guesswork in picki
src/lightning/pytorch/callbacks/lr_finder.py:32
↓ 6 callersClassLocalModel
tests/tests_pytorch/models/test_hparams.py:198
↓ 6 callersClassOnExceptionCheckpoint
Used to save a checkpoint on exception. Args: dirpath: directory to save the checkpoint file. filename: checkpoint filename. This
src/lightning/pytorch/callbacks/on_exception_checkpoint.py:31
↓ 6 callersClassRichModelSummary
r"""Generates a summary of all layers in a :class:`~lightning.pytorch.core.LightningModule` with `rich text formatting <https://github.com/Textual
src/lightning/pytorch/callbacks/rich_model_summary.py:23
↓ 6 callersClassStochasticWeightAveraging
src/lightning/pytorch/callbacks/stochastic_weight_avg.py:39
↓ 6 callersClassSwaTestModel
tests/tests_pytorch/callbacks/test_stochastic_weight_avg.py:54
↓ 6 callersClassTestModel
tests/tests_pytorch/loops/test_training_loop_flow_scalar.py:31
↓ 6 callersClassTestModel
tests/tests_pytorch/callbacks/test_lr_monitor.py:379
↓ 6 callersClassTestModel
tests/tests_pytorch/core/test_lightning_optimizer.py:31
↓ 6 callersClassTestModel
tests/tests_pytorch/trainer/test_dataloaders.py:753
↓ 6 callersClassTorchCheckpointIO
CheckpointIO that utilizes :func:`torch.save` and :func:`torch.load` to save and load checkpoints respectively, common for most use cases. ..
src/lightning/fabric/plugins/io/torch_io.py:28
next →1–100 of 1,239, ranked by callers