You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# message-template (optional): Text message to be injected by the action in the Pull Request description. It supports the following placeholders to be replaced:
51
+
# {docs-pr-index-url}: URL to the root of the documentation for the Pull Request preview.
52
+
# platform (optional): Read the Docs Community (community) or Read the Docs for Business (business). (default: community)
53
+
# single-version (optional): Set this to 'true' if your project is single version, so we can link to the correct URL. (default: 'false')
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+56-9Lines changed: 56 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,11 @@
2
2
3
3
Looking to improve `trlX`? Thanks for considering!
4
4
5
-
There are many ways to contribute, from writing tutorials in [Colab notebooks](https://colab.research.google.com) to improving the project's [documentation](https://trlx.readthedocs.io), submitting bug reports and feature requests, or even implementing new features themselves. See the outstanding [issues](https://github.com/CarperAI/trlx/issues) for ideas on where to begin.
5
+
There are many ways to contribute, from writing tutorials in [Colab notebooks](https://colab.research.google.com) to improving the project's [documentation](https://trlx.readthedocs.io), to submitting bug reports and feature requests, or even implementing new features themselves. See the outstanding [issues](https://github.com/CarperAI/trlx/issues) for ideas on where to begin.
1. Create your own [fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo#forking-a-repository) of the repository and clone it to your local machine.
2. Create a new branch for your changes and give it a concise name that reflects your contribution.
40
+
41
+
1. Create a new branch for your changes and give it a concise name that reflects your contribution.
42
+
26
43
```bash
27
44
git checkout -b <BRANCH-NAME>
28
45
```
29
-
2. Install the development dependencies in a Python environment.
46
+
47
+
1. Install the development dependencies in a Python environment.
48
+
30
49
```bash
31
50
pip install -e ".[dev]"
32
51
pre-commit install
33
52
```
34
-
4. Implement your changes. Make small, independent, and well documented commits along the way (check out [these](https://cbea.ms/git-commit/) tips).
35
-
5. Add unit tests whenever appropriate and ensure that the tests pass. To run the entire test suite, use the following command from within the project root directory.
53
+
54
+
install pre-commit
55
+
56
+
```bash
57
+
pip install pre-commit
58
+
pre-commit install
59
+
```
60
+
61
+
bonus: force run pre-commit on all the files
62
+
63
+
```bash
64
+
pre-commit run --all-files
65
+
```
66
+
67
+
1. Implement your changes. Make small, independent, and well documented commits along the way (check out [these](https://cbea.ms/git-commit/) tips).
68
+
69
+
1. Add unit tests whenever appropriate and ensure that the tests pass. To run the entire test suite, use the following command from within the project root directory.
70
+
36
71
```bash
37
72
pytest
38
73
```
74
+
39
75
For changes with minimal project scope (e.g. a simple bug fix), you might want to run the unit tests for just a specific test file instead:
76
+
40
77
```bash
41
78
pytest -vv -k "<TEST-FILE-NAME>"
42
79
```
43
-
5. Commit your final changes. Our `pre-commit` hooks will automatically run before each commit and will prevent you from committing code that does not pass our style and linter checks. They'll also automatically format your code! To run these manually, use the following command:
80
+
81
+
1. Commit your final changes. Our `pre-commit` hooks will automatically run before each commit and will prevent you from committing code that does not pass our style and linter checks. They'll also automatically format your code! To run these manually, use the following command:
82
+
44
83
```bash
45
84
pre-commit run --all-files
46
85
```
47
86
48
-
6. Push the changes to your fork.
87
+
1. Push the changes to your fork.
49
88
50
89
Finally ... 🥁 ... Create a [pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request) to the `trlX` repository! Make sure to include a description of your changes and link to any relevant issues.
51
90
52
-
> __Tip__: If you're looking to introduce an experimental feature, we suggest testing the behavior of your proposed feature on some of the existing [examples](https://github.com/CarperAI/trlx/tree/master/examples), such as [random walks](https://github.com/CarperAI/trlx/blob/master/examples/randomwalks). This will help you get a better sense of how the feature would work in practice and will also help you identify any potential flaws in the implementation.
91
+
> **Tip**: If you're looking to introduce an experimental feature, we suggest testing the behavior of your proposed feature on some of the existing [examples](https://github.com/CarperAI/trlx/tree/master/examples), such as [random walks](https://github.com/CarperAI/trlx/blob/master/examples/randomwalks). This will help you get a better sense of how the feature would work in practice and will also help you identify any potential flaws in the implementation.
92
+
93
+
## Tips & Tricks
94
+
95
+
Set transformers verbosity level
96
+
97
+
```bash
98
+
TRANSFORMERS_VERBOSITY=error
99
+
```
53
100
54
101
## Asking questions
55
102
@@ -63,4 +110,4 @@ This project adheres to the [Contributor Covenant Code of Conduct](https://githu
63
110
64
111
By contributing, you agree that your contributions will be licensed under its MIT License.
0 commit comments