make a contribution to Mxnet
Mxnet is developed and used by a group of active community members. Please contribute to it to improve it.
When your patch is merged, don't forget to submit your name to CONTRIBUTORS.MD. Guidelines commits a pull request to resolve a conflict with master what are the results of a combination of multiple commit forced push? Document test case routine core Library Python library R package submit pull request before submitting your contribution, in the latest version of Master, git rebase your code:
Git remote add upstream https://github.com/dmlc/mxnet
git fetch upstream
git rebase upstream/master
If you have multiple small submissions, combine them into a meaningful group (using Git rebase first, using squash). Send the pull request. Modify the problem of automatic check reporting. If you are contributing to a new module, consider adding a test case to the tests.
resolving the conflict with MasterRebase to current Master branch:
# The first two lines only need to be done once. If you have already done so, skip it.
git remote add upstream https://github.com/dmlc/mxnet
git fetch upstream
git rebase upstream/master
Git may print some conflicts to prevent merging. For example, conflicted.py.
Manually modify the file to resolve the conflict. After resolving the conflict, use the following code to mark it as resolved (resolved):
git add conflicted.py.
Use the following command to continue rebase:
Git rebase--continue
And eventually push it to your fork. You may need to force push:
git push--force
combining multiple commits
If you are submitting multiple commits, and the following commits just fixes (fix to) in the previous one, you can combine multiple commits into a meaningful group and then create a push request. Before you begin, configure the default editor for Git (if not previously configured):
git config core.editor the-editor-you-like
Assuming you want to merge the last 3 commits, execute the following command:
Git rebase-i head~3
A text editor appears, setting the first commit to pick, and the latter setting to squash.
After you save the file, another text editor appears, allowing you to modify the combined commit information.
Push the changes to your fork by forcing them to push.
git push--force.
what is the result of forced push?
As we changed the commit path, the previous two tips needed to be forced to push. Forced push to your own fork is no problem, only your own commit has been changed. document documents are created using Sphinx and Recommonmark. You can build a document locally to verify that. test Cases All test cases are in the tests directory in GitHub. We use Python nose as a python test case, using Gtest as a C + + unit test. routine use cases and routines in Git's examples directory. If you have a post about mxnet and use the Mxnet tutorial, please let us know. We will add a link to your blog in the example in GitHub. Core Library for C + + code, we follow Google C + + style guide (Google C + + styles Guide). We use Doxygen to document the interface code. You can regenerate Linter checks by making lint. The Python library always adds docstring to the new function in Numpydoc format. You can regenerate Linter checks by making lint. R Bag Code Style The vast majority of C + + code in the R package relies heavily on rcpp. For C + + code, we follow Google C + + style guide (Google C + + styles Guide). This allows us to keep in line with the rest of the project. It also allows us to use Linter to automatically check the style. Run the following command in the root directory to check the code style:
Make Rcpplint
If necessary, you can cancel the Linter warning by//nolint (*) comment.
automatically generated APIsMany mxnet APIs are dynamically exposed to rcpp. Mx_generated. R is an API and documentation that is automatically generated for these functions. Remake the file by executing the following command:
Make Rcppexport
Use this command only if there is an update to the dynamic function.
API Documentation
The document is generated by ROXYGEN2. You can remake the document by executing the following code in the root directory:
Make Roxygen.
R markdown Vignettes
R markdown Vignettes is located on the GitHub r-package/vignettes directory.
These R markdown files are not compiled. The compiled version is placed in the doc/r-package.
Add a new R markdown vignettes: Add the original R markdown file to R-package/vignettes. Modify the Doc/r-package/makefile to add the markdown file to be built. Clones the Dmlc/web-data warehouse to the Doc folder. For a file in Doc/r-package, execute the following command:
Make The-markdown-to-make.md
This will generate markdown and pictures and place them in Doc/web-data/mxnet/knitr. Modify the doc/r-package/index.md to point to the generated markdown. Add the resulting picture to the Dmlc/web-data warehouse.
If you have cloned this warehouse into the doc directory, use git Add. Create a pull request for markdown and Dmlc/web-data. You can build the document locally using the following command:
Make HTML
This essentially prevents the store from increasing (generating) the size of the image.