mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-09 11:32:07 +08:00
Clean docs (#725)
* updated gitignore * updated gitignore * updated links in ninja file * updated docs * finished callbacks * finished callbacks * finished callbacks * fixed left menu * added callbacks to menu * added direct links to docs * added direct links to docs * added direct links to docs * added direct links to docs * added direct links to docs * added direct links to docs * updated gitignore * updated links in ninja file * updated docs * finished callbacks * finished callbacks * finished callbacks * fixed left menu * added callbacks to menu * added direct links to docs * added direct links to docs * added direct links to docs * added direct links to docs * added direct links to docs * added direct links to docs * finished rebase * making private members * making private members * making private members * working on trainer docs * working on trainer docs * working on trainer docs * working on trainer docs * working on trainer docs * working on trainer docs * set auto dp if no backend * working on trainer docs * working on trainer docs * working on trainer docs * working on trainer docs * working on trainer docs * working on trainer docs * working on trainer docs * working on trainer docs * fixed lightning import * cleared spaces * cleared spaces * cleared spaces * cleared spaces * cleared spaces * cleared spaces * cleared spaces * cleared spaces * cleared spaces * cleared spaces * finished lightning module * finished lightning module * finished lightning module * finished lightning module * added callbacks * added loggers * added loggers * added loggers * added loggers * added loggers * added loggers * added loggers * added loggers * set auto dp if no backend * added loggers * added loggers * added loggers * added loggers * added loggers * added loggers * flake 8 * flake 8 * fix docs path * updated gitignore * updated gitignore * updated links in ninja file * updated docs * finished callbacks * finished callbacks * finished callbacks * fixed left menu * added callbacks to menu * added direct links to docs * added direct links to docs * added direct links to docs * added direct links to docs * added direct links to docs * added direct links to docs * updated gitignore * updated docs * finished callbacks * finished callbacks * finished callbacks * fixed left menu * added callbacks to menu * added direct links to docs * added direct links to docs * added direct links to docs * added direct links to docs * added direct links to docs * added direct links to docs * finished rebase * making private members * making private members * making private members * working on trainer docs * working on trainer docs * working on trainer docs * working on trainer docs * working on trainer docs * working on trainer docs * set auto dp if no backend * working on trainer docs * working on trainer docs * working on trainer docs * working on trainer docs * working on trainer docs * working on trainer docs * working on trainer docs * fixed lightning import * cleared spaces * cleared spaces * cleared spaces * cleared spaces * cleared spaces * finished lightning module * finished lightning module * finished lightning module * finished lightning module * added callbacks * added loggers * added loggers * added loggers * added loggers * added loggers * added loggers * added loggers * added loggers * added loggers * added loggers * added loggers * flake 8 * flake 8 * fix docs path * flake 8 * Update theme_variables.jinja
This commit is contained in:
@@ -6,6 +6,7 @@ app/models/
|
||||
pip-wheel-metadata/
|
||||
lightning_logs/
|
||||
|
||||
|
||||
# Test-tube
|
||||
test_tube_logs/
|
||||
test_tube_data/
|
||||
@@ -14,6 +15,7 @@ test_tube_exp/
|
||||
# Documentations
|
||||
docs/source/pl_examples*.rst
|
||||
docs/source/pytorch_lightning*.rst
|
||||
tests/tests/
|
||||
/docs/source/*.md
|
||||
|
||||
# Byte-compiled / optimized / DLL files
|
||||
@@ -22,6 +24,7 @@ __pycache__/
|
||||
*$py.class
|
||||
timit_data/
|
||||
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
.. role:: hidden
|
||||
:class: hidden-section
|
||||
|
||||
Callbacks
|
||||
===========
|
||||
.. automodule:: pytorch_lightning.callbacks
|
||||
:exclude-members:
|
||||
_del_model,
|
||||
_save_model,
|
||||
on_epoch_end,
|
||||
on_train_end,
|
||||
on_epoch_begin,
|
||||
check_monitor_top_k,
|
||||
on_train_begin,
|
||||
@@ -0,0 +1,21 @@
|
||||
Multi-gpu (same node) training
|
||||
==============================
|
||||
|
||||
Multi-node training
|
||||
====================
|
||||
|
||||
16-bit precision
|
||||
=================
|
||||
|
||||
gradient clipping
|
||||
=================
|
||||
|
||||
modifying training via hooks
|
||||
=============================
|
||||
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 3
|
||||
|
||||
pl_examples
|
||||
@@ -44,22 +44,20 @@ PyTorch-Lightning Documentation
|
||||
|
||||
common-cases
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:name: community
|
||||
:caption: Community
|
||||
|
||||
|
||||
CODE_OF_CONDUCT.md
|
||||
CONTRIBUTING.md
|
||||
BECOMING_A_CORE_CONTRIBUTOR.md
|
||||
governance.md
|
||||
|
||||
|
||||
Indices and tables
|
||||
------------------
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`modindex`
|
||||
* :ref:`search`
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
.. role:: hidden
|
||||
:class: hidden-section
|
||||
|
||||
LightningModule
|
||||
===========
|
||||
.. automodule:: pytorch_lightning.core
|
||||
:exclude-members:
|
||||
_abc_impl,
|
||||
summarize,
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
.. role:: hidden
|
||||
:class: hidden-section
|
||||
|
||||
Logging
|
||||
===========
|
||||
.. automodule:: pytorch_lightning.logging
|
||||
:exclude-members:
|
||||
_abc_impl,
|
||||
_save_model,
|
||||
on_epoch_end,
|
||||
on_train_end,
|
||||
on_epoch_begin,
|
||||
@@ -0,0 +1,7 @@
|
||||
pl_examples
|
||||
===========
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 4
|
||||
|
||||
pl_examples
|
||||
@@ -0,0 +1,21 @@
|
||||
.. role:: hidden
|
||||
:class: hidden-section
|
||||
|
||||
Trainer
|
||||
===========
|
||||
.. automodule:: pytorch_lightning.trainer
|
||||
:members: fit, test
|
||||
:exclude-members:
|
||||
run_pretrain_routine,
|
||||
_abc_impl,
|
||||
_Trainer__set_root_gpu,
|
||||
_Trainer__init_optimizers,
|
||||
_Trainer__parse_gpu_ids,
|
||||
_Trainer__configure_schedulers,
|
||||
data_parallel,
|
||||
num_gpus,
|
||||
slurm_job_id,
|
||||
tng_tqdm_dic,
|
||||
training_tqdm_dict,
|
||||
init_optimizers,
|
||||
configure_schedulers
|
||||
@@ -0,0 +1,20 @@
|
||||
Refactoring PyTorch into Lightning
|
||||
==================================
|
||||
`Tutorial <https://towardsdatascience.com/how-to-refactor-your-pytorch-code-to-get-these-42-benefits-of-pytorch-lighting-6fdd0dc97538>`_
|
||||
|
||||
Start a research project
|
||||
=========================
|
||||
`Research seed <https://github.com/PytorchLightning/pytorch-lightning-conference-seed>`_
|
||||
|
||||
Basic Lightning use
|
||||
====================
|
||||
`Tutorial <https://towardsdatascience.com/supercharge-your-ai-research-with-pytorch-lightning-337948a99eec>`_
|
||||
|
||||
9 key Lightning tricks
|
||||
========================
|
||||
`Tutorial <9 key speed features in Pytorch-Lightning>`_
|
||||
|
||||
Multi-node training on SLURM
|
||||
=============================
|
||||
`Tutorial <https://towardsdatascience.com/trivial-multi-node-training-with-pytorch-lightning-ff75dfb809bd>`_
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
"""
|
||||
Callbacks
|
||||
=========
|
||||
|
||||
====================================
|
||||
Callbacks supported by Lightning
|
||||
"""
|
||||
|
||||
import logging
|
||||
import os
|
||||
import shutil
|
||||
import logging
|
||||
import warnings
|
||||
|
||||
import numpy as np
|
||||
|
||||
from pytorch_lightning.overrides.data_parallel import LightningDistributedDataParallel
|
||||
@@ -165,7 +163,9 @@ class EarlyStopping(Callback):
|
||||
|
||||
|
||||
class ModelCheckpoint(Callback):
|
||||
r"""Save the model after every epoch.
|
||||
r"""
|
||||
|
||||
Save the model after every epoch.
|
||||
|
||||
Args:
|
||||
filepath (str): path to save the model file.
|
||||
|
||||
@@ -5,15 +5,16 @@ import warnings
|
||||
from abc import ABC, abstractmethod
|
||||
from argparse import Namespace
|
||||
|
||||
|
||||
import pandas as pd
|
||||
import torch
|
||||
import torch.distributed as dist
|
||||
|
||||
#
|
||||
from pytorch_lightning.core.decorators import data_loader
|
||||
from pytorch_lightning.core.grads import GradInformation
|
||||
from pytorch_lightning.core.hooks import ModelHooks
|
||||
from pytorch_lightning.core.memory import ModelSummary
|
||||
from pytorch_lightning.core.saving import ModelIO
|
||||
from pytorch_lightning.core.memory import ModelSummary
|
||||
from pytorch_lightning.overrides.data_parallel import LightningDistributedDataParallel
|
||||
|
||||
|
||||
@@ -679,7 +680,6 @@ class LightningModule(ABC, GradInformation, ModelIO, ModelHooks):
|
||||
@abstractmethod
|
||||
def configure_optimizers(self):
|
||||
r"""
|
||||
|
||||
This is where you choose what optimizers and learning-rate schedulers to use in your optimization.
|
||||
Normally you'd need one. But in the case of GANs or something more esoteric you might have multiple.
|
||||
|
||||
@@ -1015,7 +1015,6 @@ class LightningModule(ABC, GradInformation, ModelIO, ModelHooks):
|
||||
|
||||
map_location (dict): A dictionary mapping saved weight GPU devices to new
|
||||
GPU devices (example: {'cuda:1':'cuda:0'})
|
||||
|
||||
Return:
|
||||
LightningModule with loaded weights
|
||||
|
||||
@@ -1136,7 +1135,6 @@ class LightningModule(ABC, GradInformation, ModelIO, ModelHooks):
|
||||
|
||||
def freeze(self):
|
||||
r"""
|
||||
|
||||
Freeze all params for inference
|
||||
|
||||
Example
|
||||
@@ -1168,7 +1166,6 @@ class LightningModule(ABC, GradInformation, ModelIO, ModelHooks):
|
||||
|
||||
def on_load_checkpoint(self, checkpoint):
|
||||
r"""
|
||||
|
||||
Called by lightning to restore your model.
|
||||
If you saved something with **on_save_checkpoint** this is your chance to restore this.
|
||||
|
||||
|
||||
@@ -71,7 +71,6 @@ Call the logger anywhere from your LightningModule by doing:
|
||||
Supported Loggers
|
||||
-----------------
|
||||
"""
|
||||
|
||||
from os import environ
|
||||
|
||||
from .base import LightningLoggerBase, rank_zero_only
|
||||
|
||||
@@ -26,5 +26,4 @@ This is the basic use of the trainer:
|
||||
"""
|
||||
|
||||
from .trainer import Trainer
|
||||
|
||||
__all__ = ['Trainer']
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
|
||||
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
import warnings
|
||||
import logging
|
||||
|
||||
|
||||
import torch
|
||||
import torch.distributed as dist
|
||||
@@ -20,6 +19,7 @@ from pytorch_lightning.trainer.distrib_parts import (
|
||||
parse_gpu_ids,
|
||||
determine_root_gpu_device
|
||||
)
|
||||
|
||||
from pytorch_lightning.trainer.evaluation_loop import TrainerEvaluationLoopMixin
|
||||
from pytorch_lightning.trainer.logging import TrainerLoggingMixin
|
||||
from pytorch_lightning.trainer.model_hooks import TrainerModelHooksMixin
|
||||
@@ -850,7 +850,6 @@ class Trainer(TrainerIOMixin,
|
||||
# run test from a loaded model
|
||||
model = LightningModule.load_from_checkpoint('path/to/checkpoint.ckpt')
|
||||
trainer = Trainer()
|
||||
|
||||
trainer.test(model)
|
||||
"""
|
||||
self.testing = True
|
||||
|
||||
@@ -98,7 +98,6 @@ from abc import ABC
|
||||
from subprocess import call
|
||||
from argparse import Namespace
|
||||
|
||||
import pandas as pd
|
||||
import torch
|
||||
import torch.distributed as dist
|
||||
|
||||
|
||||
Reference in New Issue
Block a user