If you are here, it means you are interested in helping us out. A hearty welcome and thank you! There are many ways you can contribute to Hummingbird:
- Offer PR's to fix bugs or implement new features;
- Give us feedback and bug reports regarding the software or the documentation;
- Improve our examples, and documentation. This project welcomes contributions and suggestions.
Please join the community on Gitter gitter badge. Also please make sure to take a look at the project roadmap.
If you are new to GitHub here is a detailed help source on getting involved with development on GitHub.
As a first time contributor, you will be invited to sign the Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. You will only need to do this once across all repos using our CLA.
Your pull request needs to reference a filed issue. Please fill in the template that is populated for the pull request. Only pull requests addressing small typos can have no issues associated with them.
All commits in a pull request will be squashed to a single commit with the original creator as author.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.
The simplest setup (assuming you have PyTorch already installed) is:
mkdir hummingbird
cd hummingbird
git clone https://github.com/microsoft/hummingbird.git .
python -m pip install -e .[tests,extra]
If you do not have pytorch installed, please install it first.
We provide a simple Dockerfile that you can customize to your preferred development environment.
docker build git://github.com/microsoft/hummingbird -t hb-jupy
docker run -it hb-dev
For a light-weight, web-based experience, we provide the configuration (.devcontainer) for Codespaces. More information on this setup can be found here.
This project uses pre-commit hooks. Run python -m pip install pre-commit
if you don't already have this in your machine. Afterward, run pre-commit install
to install pre-commit into your git hooks.
And before you commit, you can run it like this pre-commit run --all-files
and should see output such as:
black............................Passed
Flake8...........................Passed
...
Don't commit to branch...........Passed
If you have installed your pre-commit hooks successfully, you should see something like this if you try to commit something non-conformant:
$ git commit -m "testing"
black............................Failed
- hook id: black
- files were modified by this hook
reformatted hummingbird/convert.py
All done!
1 file reformatted.
We generally use all pep8 checks, with the exception of line length 127.
To do a quick check-up before commit, try:
flake8 . --count --max-complexity=10 --max-line-length=127 --statistics
For coverage, we use coverage.py in our Github Actions. Run python -m pip install coverage
if you don't already have this, and any code you commit should generally not significantly impact coverage.
We strive to not let check-ins decrease coverage. To run all unit tests:
coverage run -m pytest tests