Skip to content

Commit 88c0d4d

Browse files
Restructure Fabric docs (#17111)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 13e2ddc commit 88c0d4d

File tree

6 files changed

+207
-210
lines changed

6 files changed

+207
-210
lines changed

docs/source-fabric/fundamentals/convert.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,13 @@ Next steps
119119
:button_link: accelerators.html
120120
:col_css: col-md-4
121121
:height: 150
122-
:tag: intermediate
122+
:tag: basic
123123

124124
.. displayitem::
125125
:header: Build your own Trainer
126126
:description: Learn how to build a trainer tailored for you
127127
:col_css: col-md-4
128-
:button_link: ../index.html#build-your-own-trainer
128+
:button_link: ../levels/intermediate
129129
:height: 150
130130
:tag: intermediate
131131

docs/source-fabric/fundamentals/launch.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ Next steps
226226
:col_css: col-md-4
227227
:button_link: ../fundamentals/precision.html
228228
:height: 160
229-
:tag: intermediate
229+
:tag: basic
230230

231231
.. displayitem::
232232
:header: Distributed Communication

docs/source-fabric/index.rst

Lines changed: 20 additions & 207 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.. include:: links.rst
22

3-
################
4-
Lightning Fabric
5-
################
3+
####################
4+
Welcome to ⚡ Fabric
5+
####################
66

77
Fabric is the fast and lightweight way to scale PyTorch models without boilerplate code.
88

@@ -102,173 +102,6 @@ Fabric ships directly with Lightning. Install it with
102102
103103
For alternative ways to install, read the :doc:`installation guide <fundamentals/installation>`.
104104

105-
----
106-
107-
108-
************
109-
Fundamentals
110-
************
111-
112-
.. raw:: html
113-
114-
<div class="display-card-container">
115-
<div class="row">
116-
117-
.. displayitem::
118-
:header: Getting Started
119-
:description: Learn how to add Fabric to your PyTorch code
120-
:button_link: fundamentals/convert.html
121-
:col_css: col-md-4
122-
:height: 150
123-
:tag: basic
124-
125-
.. displayitem::
126-
:header: Accelerators
127-
:description: Take advantage of your hardware with a switch of a flag
128-
:button_link: fundamentals/accelerators.html
129-
:col_css: col-md-4
130-
:height: 150
131-
:tag: intermediate
132-
133-
.. displayitem::
134-
:header: Code Structure
135-
:description: Best practices for setting up your training script with Fabric
136-
:button_link: fundamentals/code_structure.html
137-
:col_css: col-md-4
138-
:height: 150
139-
:tag: basic
140-
141-
.. displayitem::
142-
:header: Launch Distributed Training
143-
:description: Launch a Python script on multiple devices and machines
144-
:button_link: fundamentals/launch.html
145-
:col_css: col-md-4
146-
:height: 150
147-
:tag: intermediate
148-
149-
.. displayitem::
150-
:header: Fabric in Notebooks
151-
:description: Launch on multiple devices from within a Jupyter notebook
152-
:button_link: fundamentals/notebooks.html
153-
:col_css: col-md-4
154-
:height: 150
155-
:tag: basic
156-
157-
.. displayitem::
158-
:header: Mixed Precision Training
159-
:description: Save memory and speed up training using mixed precision
160-
:button_link: fundamentals/precision.html
161-
:col_css: col-md-4
162-
:height: 150
163-
:tag: intermediate
164-
165-
.. raw:: html
166-
167-
</div>
168-
</div>
169-
170-
171-
----
172-
173-
174-
**********************
175-
Build Your Own Trainer
176-
**********************
177-
178-
.. raw:: html
179-
180-
<div class="display-card-container">
181-
<div class="row">
182-
183-
.. displayitem::
184-
:header: The LightningModule
185-
:description: Organize your code in a LightningModule and use it with Fabric
186-
:button_link: guide/lightning_module.html
187-
:col_css: col-md-4
188-
:height: 150
189-
:tag: basic
190-
191-
.. displayitem::
192-
:header: Callbacks
193-
:description: Make use of the Callback system in Fabric
194-
:button_link: guide/callbacks.html
195-
:col_css: col-md-4
196-
:height: 150
197-
:tag: basic
198-
199-
.. displayitem::
200-
:header: Logging
201-
:description: Learn how Fabric helps you remove boilerplate code for tracking metrics with a logger
202-
:button_link: guide/logging.html
203-
:col_css: col-md-4
204-
:height: 150
205-
:tag: basic
206-
207-
.. displayitem::
208-
:header: Checkpoints
209-
:description: Efficient saving and loading of model weights, training state, hyperparameters and more.
210-
:button_link: guide/checkpoint.html
211-
:col_css: col-md-4
212-
:height: 150
213-
:tag: basic
214-
215-
.. displayitem::
216-
:header: Trainer Template
217-
:description: Take our Fabric Trainer template and customize it for your needs
218-
:button_link: https://github.com/Lightning-AI/lightning/tree/master/examples/fabric/build_your_own_trainer
219-
:col_css: col-md-4
220-
:height: 150
221-
:tag: intermediate
222-
223-
.. raw:: html
224-
225-
</div>
226-
</div>
227-
228-
229-
----
230-
231-
232-
***************
233-
Advanced Topics
234-
***************
235-
236-
.. raw:: html
237-
238-
<div class="display-card-container">
239-
<div class="row">
240-
241-
.. displayitem::
242-
:header: Efficient Gradient Accumulation
243-
:description: Learn how to perform efficient gradient accumulation in distributed settings
244-
:button_link: advanced/gradient_accumulation.html
245-
:col_css: col-md-4
246-
:height: 160
247-
:tag: advanced
248-
249-
.. displayitem::
250-
:header: Distributed Communication
251-
:description: Learn all about communication primitives for distributed operation. Gather, reduce, broadcast, etc.
252-
:button_link: advanced/distributed_communication.html
253-
:col_css: col-md-4
254-
:height: 160
255-
:tag: advanced
256-
257-
.. displayitem::
258-
:header: Multiple Models and Optimizers
259-
:description: See how flexible Fabric is to work with multiple models and optimizers!
260-
:button_link: advanced/multiple_setup.html
261-
:col_css: col-md-4
262-
:height: 160
263-
:tag: advanced
264-
265-
.. raw:: html
266-
267-
</div>
268-
</div>
269-
270-
271-
----
272105

273106

274107
.. raw:: html
@@ -278,60 +111,40 @@ Advanced Topics
278111
.. toctree::
279112
:maxdepth: 1
280113
:name: start
281-
:caption: Get Started
282-
283-
Fabric in 5 minutes <fundamentals/convert>
284-
Installation <fundamentals/installation>
285-
286-
.. toctree::
287-
:maxdepth: 1
288-
:name: fundamentals
289-
:caption: Fundamentals
114+
:caption: Home
290115

291-
Accelerators <fundamentals/accelerators>
292-
Code Structure <fundamentals/code_structure>
293-
Launch Distributed Training <fundamentals/launch>
294-
Fabric in Notebooks <fundamentals/notebooks>
295-
Mixed Precision Training <fundamentals/precision>
116+
self
117+
Install <fundamentals/installation>
296118

297-
.. toctree::
298-
:maxdepth: 1
299-
:name: byot
300-
:caption: Build Your Own Trainer
301-
302-
The LightningModule <guide/lightning_module>
303-
Callbacks <guide/callbacks>
304-
Logging <guide/logging>
305-
Checkpoints <guide/checkpoint>
306-
Trainer Template <https://github.com/Lightning-AI/lightning/tree/master/examples/fabric/build_your_own_trainer>
307119

308120
.. toctree::
309-
:maxdepth: 1
310-
:name: advanced
311-
:caption: Advanced Topics
121+
:maxdepth: 1
122+
:caption: Get started in steps
312123

313-
Efficient Gradient Accumulation <advanced/gradient_accumulation>
314-
Distributed Communication <advanced/distributed_communication>
315-
Multiple Models and Optimizers <advanced/multiple_setup>
316-
317-
.. toctree::
318-
:maxdepth: 1
319-
:name: examples
320-
:caption: Examples
124+
Basic <levels/basic>
125+
Intermediate <levels/intermediate>
126+
Advanced <levels/advanced>
321127

322-
Examples <examples/index>
323128

324129
.. toctree::
325130
:maxdepth: 1
326131
:name: api
327-
:caption: API Reference
132+
:caption: Core API Reference
328133

329134
Fabric Arguments <api/fabric_args>
330135
Fabric Methods <api/fabric_methods>
331136
Utilities <api/utilities>
332137
Full API Reference <api_reference>
333138

334139

140+
.. toctree::
141+
:maxdepth: 1
142+
:name: more
143+
:caption: More
144+
145+
Examples <examples/index>
146+
147+
335148
.. raw:: html
336149

337150
</div>
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
.. toctree::
2+
:maxdepth: 1
3+
:hidden:
4+
5+
<../advanced/gradient_accumulation>
6+
<../advanced/distributed_communication>
7+
<../advanced/multiple_setup>
8+
9+
10+
###############
11+
Advanced skills
12+
###############
13+
14+
.. raw:: html
15+
16+
<div class="display-card-container">
17+
<div class="row">
18+
19+
.. displayitem::
20+
:header: Efficient Gradient Accumulation
21+
:description: Learn how to perform efficient gradient accumulation in distributed settings
22+
:button_link: ../advanced/gradient_accumulation.html
23+
:col_css: col-md-4
24+
:height: 160
25+
:tag: advanced
26+
27+
.. displayitem::
28+
:header: Distributed Communication
29+
:description: Learn all about communication primitives for distributed operation. Gather, reduce, broadcast, etc.
30+
:button_link: ../advanced/distributed_communication.html
31+
:col_css: col-md-4
32+
:height: 160
33+
:tag: advanced
34+
35+
.. displayitem::
36+
:header: Multiple Models and Optimizers
37+
:description: See how flexible Fabric is to work with multiple models and optimizers!
38+
:button_link: ../advanced/multiple_setup.html
39+
:col_css: col-md-4
40+
:height: 160
41+
:tag: advanced
42+
43+
.. raw:: html
44+
45+
</div>
46+
</div>

0 commit comments

Comments
 (0)