Contributing to Language Model Playground#
We welcome all sorts of contributions to language model playground. Please read the Before You Commit section first. See Need Helps section for some known issues we currently need the most help. For other issues such as bugs or features request see our GitHub issues.
Note
You need to install dev tools first by running
pipenv install --dev
Before You Commit#
Fork the project on GitHub.
Do type annotation for every functions, classes and methods. See
typing
and PEP 484 for more information.Run the following script to check type annotaions:
mypy lmp test --ignore-missing-imports
Note
We aware that some types in
typing
is deprecated in favor of built-in syntax. For example,typing.List
is deprecated in favor of built-inlist
. However, those deprecated types will be in effect only after 2025 (See details in PEP 585). Thus we will continue usingtyping
instead of built-in syntax. Also we are using Python version3.8
which does not support built-in syntax. We will switch to built-in syntax once PyTorch support Python version3.9
.Write docstring for every modules, classes, functions and methods. See How To Document Guide for detailed docstring guide line.
Run the following script to lint your code to conform PEP 8.
pipenv run ly pipenv run li pipenv run lf
Fix any error/warning messages showed on CLI. If you find some rule is not possible to be fix, please open issue.
Run tests and get test coverage report. Make sure your codes do not break existing code. See How To Test Guide for detailed testing guide line.
Write tests for your codes and make them maintainable. See How To Test Guide for detailed testing guide line.
Need Helps#
The following list of items are the helps we needed.
Translate documents into traditional Chinese.
Require installation script. Currently python is undergone throught some major change on their package management system. But we think its better to stick to
setup.py
solution and change to better solution after the change of package management system.