How to Contribute#

We’d love to accept your patches and contributions to this project.

Before you begin#

Sign our Contributor License Agreement#

Contributions to this project must be accompanied by a Contributor License Agreement (CLA). You (or your employer) retain the copyright to your contribution; this simply gives us permission to use and redistribute your contributions as part of the project.

If you or your current employer have already signed the Google CLA (even if it was for a different project), you probably don’t need to do it again.

Visit https://cla.developers.google.com/ to see your current agreements or to sign a new one.

Review our Community Guidelines#

This project follows Google’s Open Source Community Guidelines.

Contribution process#

Code Reviews#

All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult GitHub Help for more information on using pull requests.

Contribute to documentation#

The MaxText documentation website is built using Sphinx and MyST. Documents are written in MyST Markdown syntax.

Building the documentation locally (optional)#

If you are writing documentation for MaxText, you may want to preview the documentation site locally to ensure things work as expected before a deployment to Read The Docs.

First, make sure you install the necessary dependencies. You can do this by navigating to your local clone of the MaxText repo and running:

pip install -r dependencies/requirements/requirements_docs.txt

Once the dependencies are installed, you can navigate to the docs/ folder and run:

sphinx-build -b html . _build/html

This will generate the documentation in the docs/_build/html directory. These files can be opened in a web browser directly, or you can use a simple HTTP server to serve the files. For example, you can run:

python -m http.server -d _build/html

Then, open your web browser and navigate to http://localhost:8000 to view the documentation.

Adding new documentation files#

If you are adding a new document, make sure it is included in the toctree directive corresponding to the section where the new document should live. For example, if adding a new tutorial, make sure it is listed in the docs/tutorials.md.

Documentation deployment#

The MaxText documentation is deployed to https://maxtext.readthedocs.io on any successful merge to the main branch.