Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Latest commit

 

History

History
66 lines (47 loc) · 4.19 KB

CONTRIBUTING.md

File metadata and controls

66 lines (47 loc) · 4.19 KB

Contributing to trlX

Looking to improve trlX? Thanks for considering!

There are many ways to contribute, from writing tutorials in Colab notebooks to improving the project's documentation, submitting bug reports and feature requests, or even implementing new features themselves. See the outstanding issues for ideas on where to begin.

Here are some guidelines to help you get started 🚀.

Submitting a bug report or a feature request¶

To submit a bug report or a feature request, please open an issue by clicking on the New Issue button and selecting the respective issue template. Make sure to fill out all the required information and provide as much detail as possible. For bug reports, this means including a minimal code example that reproduces the bug, and for feature requests, it means providing a clear and detailed description of the feature you would like to see implemented.

Submitting code

Note: Make sure to first search through the issue tracker and PR list to avoid duplicating work. If you want to work on a non-trivial feature, we highly recommended that you first open an issue in the issue tracker to get feedback from core developers.

Follow these steps to start contributing code:

  1. Create your own fork of the repository and clone it to your local machine.

    git clone https://github.com/<YOUR-USERNAME>/trlx.git
    cd trlx
    git remote add upstream https://github.com/CarperAI/trlx.git
  2. Create a new branch for your changes and give it a concise name that reflects your contribution.

    git checkout -b <BRANCH-NAME>
  3. Install the development dependencies in a Python environment.

    pip install -e ".[dev]"
    pre-commit install
  4. Implement your changes. Make small, independent, and well documented commits along the way (check out these tips).

  5. Add unit tests whenever appropriate and ensure that the tests pass. To run the entire test suite, use the following command from within the project root directory.

    pytest

    For changes with minimal project scope (e.g. a simple bug fix), you might want to run the unit tests for just a specific test file instead:

    pytest -vv -k "<TEST-FILE-NAME>"
  6. Commit your final changes. Our pre-commit hooks will automatically run before each commit and will prevent you from committing code that does not pass our style and linter checks. They'll also automatically format your code! To run these manually, use the following command:

    pre-commit run --all-files
  7. Push the changes to your fork.

Finally ... 🥁 ... Create a pull request to the trlX repository! Make sure to include a description of your changes and link to any relevant issues.

Tip: If you're looking to introduce an experimental feature, we suggest testing the behavior of your proposed feature on some of the existing examples, such as random walks. This will help you get a better sense of how the feature would work in practice and will also help you identify any potential flaws in the implementation.

Asking questions

Have a question? Rather than opening an issue, you can readily chat with the core team on our Discord server.

Code of conduct

This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code.

License

By contributing, you agree that your contributions will be licensed under its MIT License.

Thank you for your contribution 🐠!