Skip to content

Commit 5c9b464

Browse files
Enhance README with additional examples
Added more examples for model training and PyTorch Lightning integration in the README.
1 parent 2a81579 commit 5c9b464

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

README.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,13 @@ for i in range(10):
5353
logger.finalize()
5454
```
5555

56-
### Model training example
56+
### More examples:
57+
58+
<details>
59+
<summary>Model training</summary>
60+
61+
Add LitLogger to any training framework, PyTorch, Jax, TensorFlow, Numpy, SKLearn, etc...
62+
5763
```python
5864
import litlogger
5965

@@ -84,14 +90,13 @@ litlogger.log_file("/path/to/config.txt")
8490
# Finalize the experiment
8591
litlogger.finalize()
8692
```
87-
8893
</details>
8994

90-
### PyTorch Lightning example
95+
<details>
96+
<summary>PyTorch Lightning</summary>
97+
9198
PyTorch Lightning now comes with LitLogger natively built in. It's also built by the PyTorch Lightning team for guaranteed fast performance at multi-node GPU scale.
9299

93-
<details>
94-
<summary>Python code</summary>
95100
```python
96101
from lightning import Trainer
97102
from lightning.pytorch.demos.boring_classes import BoringDataModule, BoringModel
@@ -115,11 +120,11 @@ trainer = Trainer(max_epochs=10, logger=LightningLogger(), log_every_n_steps=10)
115120
trainer.fit(LoggingBoringModel(), BoringDataModule())
116121
```
117122

118-
### Example 3: long-running experiment simulator
119-
This is a fun example that simulates a long model training run.
123+
</details>
120124

121125
<details>
122-
<summary>Python code</summary>
126+
<summary>Example: Long-running experiment simulator</summary>
127+
This is a fun example that simulates a long model training run.
123128

124129
```python
125130
import random

0 commit comments

Comments
 (0)