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#

  1. Fork the project on GitHub.

  2. 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-in list. However, those deprecated types will be in effect only after 2025 (See details in PEP 585). Thus we will continue using typing instead of built-in syntax. Also we are using Python version 3.8 which does not support built-in syntax. We will switch to built-in syntax once PyTorch support Python version 3.9.

  3. Write docstring for every modules, classes, functions and methods. See How To Document Guide for detailed docstring guide line.

  4. 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.

  5. 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.

  6. 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.