Skip to content

Commit

Permalink
Update Fabric docs navigation (#16957)
Browse files Browse the repository at this point in the history
  • Loading branch information
awaelchli authored Mar 6, 2023
1 parent 5870714 commit 54147e0
Show file tree
Hide file tree
Showing 20 changed files with 107 additions and 138 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ docs/source-pytorch/notebooks
docs/source-pytorch/_static/images/course_UvA-DL
docs/source-pytorch/_static/images/lightning_examples

docs/source-fabric/api
docs/source-fabric/*/generated

# C extensions
*.so
Expand Down
2 changes: 0 additions & 2 deletions docs/source-fabric/advanced/distributed_communication.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
:orphan:

###########################################
Communication between distributed processes
###########################################
Expand Down
2 changes: 0 additions & 2 deletions docs/source-fabric/advanced/gradient_accumulation.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
:orphan:

###############################
Efficient Gradient Accumulation
###############################
Expand Down
2 changes: 0 additions & 2 deletions docs/source-fabric/api/fabric_args.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
:orphan:

################
Fabric Arguments
################
Expand Down
2 changes: 0 additions & 2 deletions docs/source-fabric/api/fabric_methods.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
:orphan:

##############
Fabric Methods
##############
Expand Down
2 changes: 0 additions & 2 deletions docs/source-fabric/api/utilities.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
:orphan:

################
Fabric Utilities
################
Expand Down
18 changes: 8 additions & 10 deletions docs/source-fabric/api_reference.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
:orphan:

.. include:: links.rst

#############
Expand All @@ -13,7 +11,7 @@ Fabric
.. currentmodule:: lightning.fabric.fabric

.. autosummary::
:toctree: api
:toctree: api/generated
:nosignatures:
:template: classtemplate.rst

Expand All @@ -26,7 +24,7 @@ Accelerators
.. currentmodule:: lightning.fabric.accelerators

.. autosummary::
:toctree: api
:toctree: api/generated
:nosignatures:
:template: classtemplate.rst

Expand All @@ -43,7 +41,7 @@ Loggers
.. currentmodule:: lightning.fabric.loggers

.. autosummary::
:toctree: api
:toctree: api/generated
:nosignatures:
:template: classtemplate.rst

Expand All @@ -59,7 +57,7 @@ Precision
.. currentmodule:: lightning.fabric.plugins.precision

.. autosummary::
:toctree: api
:toctree: api/generated
:nosignatures:
:template: classtemplate.rst

Expand All @@ -77,7 +75,7 @@ Environments
.. currentmodule:: lightning.fabric.plugins.environments

.. autosummary::
:toctree: api
:toctree: api/generated
:nosignatures:
:template: classtemplate_noindex.rst

Expand All @@ -97,7 +95,7 @@ IO
.. currentmodule:: lightning.fabric.plugins.io

.. autosummary::
:toctree: api
:toctree: api/generated
:nosignatures:
:template: classtemplate.rst

Expand All @@ -112,7 +110,7 @@ Collectives
.. currentmodule:: lightning.fabric.plugins.collectives

.. autosummary::
:toctree: api
:toctree: api/generated
:nosignatures:
:template: classtemplate.rst

Expand All @@ -129,7 +127,7 @@ Strategies
.. currentmodule:: lightning.fabric.strategies

.. autosummary::
:toctree: api
:toctree: api/generated
:nosignatures:
:template: classtemplate.rst

Expand Down
59 changes: 59 additions & 0 deletions docs/source-fabric/examples/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
########
Examples
########

.. raw:: html

<div class="display-card-container">
<div class="row">

.. displayitem::
:header: Image Classification
:description: Train an image classifier on the MNIST dataset
:button_link: https://github.com/Lightning-AI/lightning/blob/master/examples/fabric/image_classifier
:col_css: col-md-4
:height: 150
:tag: basic

.. displayitem::
:header: GAN
:description: Train a GAN that generates realistic human faces
:button_link: https://github.com/Lightning-AI/lightning/blob/master/examples/fabric/dcgan
:col_css: col-md-4
:height: 150
:tag: intermediate

.. displayitem::
:header: Meta-Learning
:description: Distributed training with the MAML algorithm on the Omniglot and MiniImagenet datasets
:button_link: https://github.com/Lightning-AI/lightning/blob/master/examples/fabric/meta_learning
:col_css: col-md-4
:height: 150
:tag: intermediate

.. displayitem::
:header: Large Language Models
:description: Pre-train a GPT-2 language model on OpenWebText data
:button_link: https://github.com/Lightning-AI/nanoGPT/blob/master/train_fabric.py
:col_css: col-md-4
:height: 150
:tag: advanced

.. displayitem::
:header: Reinforcement Learning
:description: Implementation of the Proximal Policy Optimization (PPO) algorithm with multi-GPU support
:button_link: https://github.com/Lightning-AI/lightning/blob/master/examples/fabric/reinforcement_learning
:col_css: col-md-4
:height: 150

.. displayitem::
:header: Active Learning
:description: Coming soon
:col_css: col-md-4
:height: 150


.. raw:: html

</div>
</div>
2 changes: 0 additions & 2 deletions docs/source-fabric/fundamentals/accelerators.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
:orphan:

################################
Accelerate your code with Fabric
################################
Expand Down
2 changes: 0 additions & 2 deletions docs/source-fabric/fundamentals/code_structure.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
:orphan:

######################################
How to structure your code with Fabric
######################################
Expand Down
2 changes: 0 additions & 2 deletions docs/source-fabric/fundamentals/convert.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
:orphan:

##############################
Convert PyTorch code to Fabric
##############################
Expand Down
2 changes: 0 additions & 2 deletions docs/source-fabric/fundamentals/launch.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
:orphan:

###########################
Launch distributed training
###########################
Expand Down
2 changes: 0 additions & 2 deletions docs/source-fabric/fundamentals/notebooks.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
:orphan:

.. _Fabric in Notebooks:

###################
Expand Down
2 changes: 0 additions & 2 deletions docs/source-fabric/fundamentals/precision.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
:orphan:

################################
Save memory with mixed precision
################################
Expand Down
2 changes: 0 additions & 2 deletions docs/source-fabric/guide/callbacks.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
:orphan:

#########
Callbacks
#########
Expand Down
2 changes: 0 additions & 2 deletions docs/source-fabric/guide/checkpoint.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
:orphan:

##############################
Saving and Loading Checkpoints
##############################
Expand Down
2 changes: 0 additions & 2 deletions docs/source-fabric/guide/lightning_module.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
:orphan:

##################
Organize Your Code
##################
Expand Down
2 changes: 0 additions & 2 deletions docs/source-fabric/guide/logging.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
:orphan:

###############################
Track and Visualize Experiments
###############################
Expand Down
2 changes: 0 additions & 2 deletions docs/source-fabric/guide/trainer_template.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
:orphan:

################
Template Trainer
################
Expand Down
134 changes: 39 additions & 95 deletions docs/source-fabric/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -240,116 +240,60 @@ Advanced Topics
----


.. _Fabric Examples:

********
Examples
********

.. raw:: html

<div class="display-card-container">
<div class="row">
<div style="display:none">

.. displayitem::
:header: Image Classification
:description: Train an image classifier on the MNIST dataset
:button_link: https://github.com/Lightning-AI/lightning/blob/master/examples/fabric/image_classifier
:col_css: col-md-4
:height: 150
:tag: basic

.. displayitem::
:header: GAN
:description: Train a GAN that generates realistic human faces
:button_link: https://github.com/Lightning-AI/lightning/blob/master/examples/fabric/dcgan
:col_css: col-md-4
:height: 150
:tag: intermediate
.. toctree::
:maxdepth: 1
:name: start
:caption: Fundamentals

.. displayitem::
:header: Meta-Learning
:description: Distributed training with the MAML algorithm on the Omniglot and MiniImagenet datasets
:button_link: https://github.com/Lightning-AI/lightning/blob/master/examples/fabric/meta_learning
:col_css: col-md-4
:height: 150
:tag: intermediate
Getting Started <fundamentals/convert>
Accelerators <fundamentals/accelerators>
Code Structure <fundamentals/code_structure>
Launch Distributed Training <fundamentals/launch>
Fabric in Notebooks <fundamentals/notebooks>
Mixed Precision Training <fundamentals/precision>

.. displayitem::
:header: Large Language Models
:description: Pre-train a GPT-2 language model on OpenWebText data
:button_link: https://github.com/Lightning-AI/nanoGPT/blob/master/train_fabric.py
:col_css: col-md-4
:height: 150
:tag: advanced
.. toctree::
:maxdepth: 1
:name: byot
:caption: Build Your Own Trainer

.. displayitem::
:header: Reinforcement Learning
:description: Implementation of the Proximal Policy Optimization (PPO) algorithm with multi-GPU support
:button_link: https://github.com/Lightning-AI/lightning/blob/master/examples/fabric/reinforcement_learning
:col_css: col-md-4
:height: 150
The LightningModule <guide/lightning_module>
Callbacks <guide/callbacks>
Logging <guide/logging>
Checkpoints <guide/checkpoint>
Trainer Template <guide/trainer_template>

.. displayitem::
:header: Active Learning
:description: Coming soon
:col_css: col-md-4
:height: 150
.. toctree::
:maxdepth: 1
:name: advanced
:caption: Advanced Topics

Efficient Gradient Accumulation <advanced/gradient_accumulation>
Distributed Communication <advanced/distributed_communication>

.. toctree::
:maxdepth: 1
:name: examples
:caption: Examples

.. raw:: html
Examples <examples/index>

</div>
</div>
.. toctree::
:maxdepth: 1
:name: api
:caption: API Reference

Fabric Arguments <api/fabric_args>
Fabric Methods <api/fabric_methods>
Utilities <api/utilities>
Full API Reference <api_reference>


----


***
API
***

.. raw:: html

<div class="display-card-container">
<div class="row">

.. displayitem::
:header: Fabric Arguments
:description: All configuration options for the Fabric object
:button_link: api/fabric_args.html
:col_css: col-md-4
:height: 150
:tag: basic

.. displayitem::
:header: Fabric Methods
:description: Explore all methods that Fabric offers
:button_link: api/fabric_methods.html
:col_css: col-md-4
:height: 150
:tag: basic

.. displayitem::
:header: Utilities
:description: Explore utility functions that make your life easier
:button_link: api/utilities.html
:col_css: col-md-4
:height: 150
:tag: basic

.. displayitem::
:header: Full API Reference
:description: Reference of all public classes, methods and functions. Useful for developers.
:button_link: api_reference.html
:col_css: col-md-4
:height: 150
:tag: intermediate

.. raw:: html

</div>
</div>

0 comments on commit 54147e0

Please sign in to comment.