Coach-pl is a PyTorch-Lightning based deep learning framework for training and evaluating models. It is designed to be flexible, allowing for quick prototyping and experimentation.
If you have any questions or suggestions, please feel free to contact me through github issues.
These are the dependencies for the package:
conda install lightning rich
pip install deepspeed fvcore omegaconf
Currently, the package is supported as git submodule:
git submodule add https://github.com/DuskNgai/coach-pl.git coach_pl
To use this package, one should create at least:
- a pytorch style dataset.
- a pytorch style model.
- a pytorch-lightning style module.
- a yaml configuration file.
For each dataset, model, and module class, one should make it
- registered in the corresponding registry.
- configurable with the
@configurable
decorator andfrom_config
method. - import it in the
__init__.py
file in the corresponding parent directory.
# In `model/example.py`
from coach_pl.configuration import configurable
from coach_pl.models import MODEL_REGISTRY
@MODEL_REGISTRY.register()
class ExampleModel(nn.Module):
@configurable
def __init__(self, arg):
super().__init__()
@classmethod
def from_config(cls, cfg):
return {"arg": cfg.arg}
# In `model/__init__.py`
from .example import ExampleModel
If you find this package useful, please consider citing it:
@misc{coach-pl,
author = {Dusk Ngai},
title = {Coach-pl: A PyTorch-Lightning Based Deep Learning Framework},
year = {2024},
publisher = {GitHub},
journal = {GitHub repository},
}