Skip to content

Commit c0e1f19

Browse files
committed
remove example from readme
1 parent adbcae7 commit c0e1f19

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

README.md

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -323,26 +323,6 @@ trainer = Trainer(callbacks=[checkpointing])
323323

324324
</details>
325325

326-
<details>
327-
<summary>Export to torchscript (JIT) (production use) - DEPRECATED</summary>
328-
329-
> **⚠️ Deprecated**: `to_torchscript()` is deprecated in PyTorch Lightning v2.5 and will be removed in v2.7.
330-
> TorchScript is deprecated in PyTorch. Use `torch.export.export()` instead.
331-
> See [PyTorch Export Documentation](https://pytorch.org/docs/stable/export.html) for more information.
332-
333-
```python
334-
# torchscript (deprecated)
335-
autoencoder = LitAutoEncoder()
336-
torch.jit.save(autoencoder.to_torchscript(), "model.pt")
337-
338-
# Recommended alternative using torch.export
339-
import torch
340-
autoencoder = LitAutoEncoder()
341-
exported_program = torch.export.export(autoencoder, (torch.randn(1, 64),))
342-
torch.export.save(exported_program, "model.pt2")
343-
```
344-
345-
</details>
346326

347327
<details>
348328
<summary>Export to ONNX (production use)</summary>

0 commit comments

Comments
 (0)