|
1 | 1 | # Contributing To Emerging-Optimizers |
2 | 2 |
|
| 3 | +## Dependency |
| 4 | + |
| 5 | +Use [abseil-py](https://github.com/abseil/abseil-py/tree/main)'s **logging**, **testing** and **flags** instead of Python's own **logging**, **unittest** and **argparse**. |
| 6 | + |
| 7 | +## Coding Style |
| 8 | + |
| 9 | +We generally follow [Google's style guides](https://google.github.io/styleguide/) , with some exceptions: |
| 10 | + |
| 11 | +* Line length extended to 120 for Python and 100 for C++ code. |
| 12 | +* Common use in PyTorch, which are prohibited by Google style, are allowed, including but not limited to: |
| 13 | + * Import function, class, not just module |
| 14 | + * Some special variable name, `x`, `dX`, etc. |
| 15 | +* Allow common capitalized naming in Triton code. |
| 16 | + |
| 17 | +Although common, **mixed case is not allowed** in any code. |
| 18 | + |
| 19 | +Run pre-commit at local before submitting merge request. You can also read [.pre-commit-config.yaml]( .pre-commit-config.yaml) to understand what are being forced. The **flake8** and **mypy** settings are inherited from PyTorch. |
| 20 | + |
| 21 | +## Test |
| 22 | + |
| 23 | +All tests should be placed under [tests](tests). We aim for 100% test coverage for this tiny project. |
| 24 | + |
| 25 | +We use [abseil-py](https://github.com/abseil/abseil-py/tree/main) **testing** because it is easier to launch multi process than alternatives. |
| 26 | + |
3 | 27 | ## Signing Your Work |
4 | 28 |
|
5 | 29 | * We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license. |
|
20 | 44 | ``` |
21 | 45 | Developer Certificate of Origin |
22 | 46 | Version 1.1 |
23 | | -
|
| 47 | + |
24 | 48 | Copyright (C) 2004, 2006 The Linux Foundation and its contributors. |
25 | | -
|
| 49 | + |
26 | 50 | Everyone is permitted to copy and distribute verbatim copies of this |
27 | 51 | license document, but changing it is not allowed. |
28 | 52 |
|
|
0 commit comments