Text Lab
Overview
Text Lab is a public template for artificial intelligence and machine learning research projects using Lightning AI's PyTorch Lightning to train a lanaguage Transformer that is implemented in PyTorch.
The recommended way for Text Lab users to create new repos is with the use this template button.
Source Module
textlab.core
contains code for the Lightning Module and Trainer.
textlab.components
contains experiment utilities grouped by purpose for cohesion.
textlab.pipeline
contains code for data acquistion and preprocessing, and building a TorchDataset and LightningDataModule.
textlab.serve
contains code for model serving APIs built with FastAPI.
textlab.cli
contains code for the command line interface built with Typerand Rich.
textlab.config
assists with project, trainer, and sweep configurations.
textlab.app
contains code for a Streamlit app.
Base Requirements and Extras
Text Lab installs minimal requirements out of the box, and provides extras to make creating robust virtual environments easier. To view the requirements, in setup.cfg, see install_requires
for the base requirements and options.extras_require
for the available extras.
The recommended install is as follows:
Using Text Lab
Text Lab also enables use of a CLI named lab
that is built with Typer. This CLI is available in the terminal after install. lab
features can be viewed with:
A fast dev run cab be ran with:
A longer demo run can be inititated with:
Weights and Biases
If you have a Weights and Biases account, you can override the default CSV logger and use wanbd with:
Streamlit
Stay tuned for the Streamlit app!