This is a quick guide to submit a pull request, please also refer to the detailed guidelines.
Before submit, please rebase your code on the most recent version of master, you can do it by
git remote add upstream git@github.com:apache/incubator-mxnet.git git fetch upstream git rebase upstream/master
Make sure code style check pass by typing the following command, and all the existing test-cases pass. Use the [clang-format]({% link pages/community/clang_format_guide.md %}) to reformat your code.
# Reproduce the lint procedure in the CI. ci/build.py -R --docker-registry mxnetci --platform ubuntu_cpu --docker-build-retries 3 --shm-size 500m /work/runtime_functions.sh sanity
Add test-cases to cover the new features or bugfix the patch introduces.
Document the code you wrote, see more at [Write Document and Tutorials]({% link pages/community/document.md %}).
Send the pull request and fix the problems reported by automatic checks.
Request code reviews from other contributors and improves your patch according to feedbacks.
The patch can be merged after the reviewers approve the pull request.
We use docker containers to create stable CI environments that can be deployed to multiple machines. Because we want a relatively stable CI environment and make use of pre-cached image, all of the CI images are built and maintained by committers.
Upgrade of CI base images are done automatically from the MXNet master branch CI builds, tracked in restricted-docker-cache-refresh. Sometimes this can be broken and needs fixes to accommodate the new env. When this happens, send a PR to fix the build script in the repo.
Even though we have hooks to run unit tests automatically for each pull request, It's always recommended to run unit tests locally beforehand to reduce reviewers' burden and speedup review process.
C++ tests are maintained in /tests/cpp and requires gtest to build and run. Once you complete building the MXNet binary, tests are automatically built and generated in /build/tests/mxnet_unit_tests.
The dependencies for testing pipelines can be found in /ci/docker/install/requirements. To install these dependencies:
pip install --user -r ci/docker/install/requirements