optimum-benchmark
is an open source project, so all contributions and suggestions are welcome.
You can contribute in many different ways: giving ideas, answering questions, reporting bugs, proposing enhancements, improving the documentation, fixing bugs,...
Many thanks in advance to every contributor.
You have the list of open Issues at: https://github.com/huggingface/optimum-benchmark/issues
If you would like to work on any of the open Issues:
-
Make sure it is not already assigned to someone else. You have the assignee (if any) on the top of the right column of the Issue page. If it is not assigned, you can assign it to yourself by clicking on the "Assign yourself" button, or by leaving a comment on the Issue page.
-
Create a Pull Request.
-
Fork the repository by clicking on the 'Fork' button on the repository's page. This creates a copy of the code under your GitHub user account.
-
Clone your fork to your local disk, and add the base repository as a remote:
git clone https://github.com/<Your Github Username>/optimum-benchmark.git cd optimum-benchmark git remote add upstream https://github.com/huggingface/optimum-benchmark.git
-
Create a new branch to hold your development changes:
git checkout -b name-of-your-branch
do not work on the
main
branch. -
Set up a development environment by running the following command in a virtual environment:
pip install -e .[quality,testing]
-
Develop the features or fix the bug you want to work on.
-
Depending on the feature you're working on and your development environment, you can run tests locally in an isolated docker container using the makefile. For example, to test the CLI with CPU device and PyTorch backend, you can run the following commands:
make install_cli_cpu_pytorch make test_cli_cpu_pytorch
For a better development experience, we recommend using isolated docker containers to run tests:
make build_cpu_image make run_cpu_container make install_cli_cpu_pytorch make test_cli_cpu_pytorch
You can find more information about the available make commands in the Makefile.
-
Make sure your code is properly formatted and linted by running:
make style
-
Once you're happy with your changes, add the changed files using
git add
and make a commit withgit commit
to record your changes locally:git add modified_file.py git commit
It is a good idea to sync your copy of the code with the original repository regularly. This way you can quickly account for changes:
git fetch upstream git rebase upstream/main
Push the changes to your account using:
git push -u origin name-of-your-branch
-
Once you are satisfied, go the webpage of your fork on GitHub. Click on "Pull request" to send your to the project maintainers for review.