-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Improve Contribution Doc #2043
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Contribution Doc #2043
Conversation
The documentation is not available anymore as the PR was closed or merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it's WIP, just pointed out a few typos in case they are useful already.
Thanks a lot Pedro! |
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
* 4. Fix a simple issue, marked by the "Good first issue" label, see [here](https://github.com/huggingface/diffusers/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22). | ||
* 5. Contribute to the [documentation](https://github.com/huggingface/diffusers/tree/main/docs/source). | ||
* 6. Contribute a [Community Pipeline](https://github.com/huggingface/diffusers/issues?q=is%3Aopen+is%3Aissue+label%3Acommunity-examples) | ||
* 7. Contribute to the [examples](https://github.com/huggingface/diffusers/tree/main/examples). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can also mention examples that go to the "research projects" in the scope of this point?
The issue description gives normally less guidance on how to example fix the issue and requires | ||
a decent understanding of the library by the user. | ||
If you are interested in tackling a second good issue, feel free to open a PR to fix it and link the PR to the issue. If you see that a PR has already been opened for this issue but did not get merged, have a look to understand why it wasn't merged and try to open an improved PR. | ||
Good second issues are usually more difficult to get merged compared to good first issues, so don't hesitate to ask for help from the core maintainers. If your PR is almost finished the core maintainers can also jump into your PR and commit to it in order to get it merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If your PR is almost finished the core maintainers can also jump into your PR and commit to it in order to get it merged.
In order for us to do this, the PR needs to have "Editable by maintainers" checked. Otherwise, it's not possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah but think that's the default - it's very rare that it's not the case in my experience
CONTRIBUTING.md
Outdated
9. Add high-coverage tests. No quality testing = no merge. | ||
- If you are adding new `@slow` tests, make sure they pass using | ||
`RUN_SLOW=1 python -m pytest tests/test_my_new_model.py`. | ||
- If you are adding a new tokenizer, write tests, and make sure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha no not at all good catch!
CONTRIBUTING.md
Outdated
1. Be a chameleon. Understand existing design patterns and syntax and make sure your code additions flow seamlessly into the existing code base. Pull requests that significantly diverge from existing design patterns or user interfaces will not be merged. | ||
2. Be laser focused. A pull request should solve one problem and one problem only. Make sure to not fall into the trap of "also fixing another problem while we're adding it". It is much more difficult to review pull requests that solve multiple, unrelated problems at once. | ||
3. If helpful, try to add a code snippet that displays an example of how your addition can be used. | ||
4. The title of your pull request should be a summary of its contribution; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consistency on the usage of "." and ";" to end sentences.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the modifications! Left some nits.
I guess the philosophy doc is from https://huggingface.co/docs/diffusers/conceptual/philosophy? I didn't review it, hence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!! it is really long though - should we maybe add a table and content or encourage users to jump to the topic they are interested in, or even break it into multiple pages?
CONTRIBUTING.md
Outdated
|
||
*All are equally valuable to the community.* | ||
In the following, we give an overview of different ways to contribute, ranked by difficulty in ascending order. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"ranked by difficulty in ascending order."
love it 😂😂😂
Co-authored-by: Sayak Paul <[email protected]> Co-authored-by: YiYi Xu <[email protected]>
Co-authored-by: Pedro Cuenca <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! So far went over CONTRIBUTING.md
.
CONTRIBUTING.md
Outdated
In short, a high quality question or answer is *precise*, *concise*, *relevant*, *easy-to-understand*, *accesible*, and *well-formated/well-posed*. For more information, please have a look through the [How to write a good issue](#how-to-write-a-good-issue) section. | ||
|
||
**NOTE**: | ||
*The forum* is much better indexed by search engines, such as Google. Posts are ranked more by popularity than chronologically. Hence, it's easier to look up questions and answers that we posted some time ago. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*The forum* is much better indexed by search engines, such as Google. Posts are ranked more by popularity than chronologically. Hence, it's easier to look up questions and answers that we posted some time ago. | |
*The forum* is much better indexed by search engines, such as Google. Posts are ranked by popularity rather than chronologically. Hence, it's easier to look up questions and answers that we posted some time ago. |
CONTRIBUTING.md
Outdated
CircleCI does not run the slow tests, but GitHub actions does every night! | ||
10. All public methods must have informative docstrings that work nicely with markdown. See `[pipeline_latent_diffusion.py](https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion.py)` for an example. | ||
11. Due to the rapidly growing repository, it is important to make sure that no files that would significantly weigh down the repository are added. This includes images, videos, and other non-text files. We prefer to leverage a hf.co hosted `dataset` like | ||
the ones hosted on [`hf-internal-testing`](https://huggingface.co/hf-internal-testing) in which to place these files and reference or [huggingface/documentation-images](https://huggingface.co/datasets/huggingface/documentation-images). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the ones hosted on [`hf-internal-testing`](https://huggingface.co/hf-internal-testing) in which to place these files and reference or [huggingface/documentation-images](https://huggingface.co/datasets/huggingface/documentation-images). | |
[`hf-internal-testing`](https://huggingface.co/hf-internal-testing) or [huggingface/documentation-images](https://huggingface.co/datasets/huggingface/documentation-images) to place these files. |
@@ -99,146 +356,98 @@ You will need basic `git` proficiency to be able to contribute to | |||
manual. Type `git --help` in a shell and enjoy. If you prefer books, [Pro | |||
Git](https://git-scm.com/book/en/v2) is a very good reference. | |||
|
|||
Follow these steps to start contributing ([supported Python versions](https://github.com/huggingface/diffusers/blob/main/setup.py#L426)): | |||
Follow these steps to start contributing ([supported Python versions](https://github.com/huggingface/diffusers/blob/main/setup.py#L244)): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now L249
, not sure how to make it more robust.
CONTRIBUTING.md
Outdated
|
||
If you have already cloned that repo, you might need to `git pull` to get the most recent changes in the `datasets` | ||
library. | ||
If you have already cloned that repo, you might need to `git pull` to get the most recent changes in the `datasets` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you have already cloned that repo, you might need to `git pull` to get the most recent changes in the `datasets` | |
If you have already cloned the repo, you might need to `git pull` to get the most recent changes in the |
### Syncing forked main with upstream (HuggingFace) main | ||
|
||
To avoid pinging the upstream repository which adds reference notes to each upstream PR and sends unnecessary notifications to the developers involved in these PRs, | ||
when syncing the main branch of a forked repository, please, follow these steps: | ||
1. When possible, avoid syncing with the upstream using a branch and PR on the forked repository. Instead merge directly into the forked main. | ||
1. When possible, avoid syncing with the upstream using a branch and PR on the forked repository. Instead, merge directly into the forked main. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what this means.
Co-authored-by: Pedro Cuenca <[email protected]>
* first refactor * more text * improve * finish * up * up * up * up * finish * Apply suggestions from code review Co-authored-by: Sayak Paul <[email protected]> Co-authored-by: YiYi Xu <[email protected]> * up * Apply suggestions from code review Co-authored-by: Pedro Cuenca <[email protected]> * finished * Apply suggestions from code review Co-authored-by: Pedro Cuenca <[email protected]> * finished --------- Co-authored-by: Sayak Paul <[email protected]> Co-authored-by: YiYi Xu <[email protected]> Co-authored-by: Pedro Cuenca <[email protected]>
* first refactor * more text * improve * finish * up * up * up * up * finish * Apply suggestions from code review Co-authored-by: Sayak Paul <[email protected]> Co-authored-by: YiYi Xu <[email protected]> * up * Apply suggestions from code review Co-authored-by: Pedro Cuenca <[email protected]> * finished * Apply suggestions from code review Co-authored-by: Pedro Cuenca <[email protected]> * finished --------- Co-authored-by: Sayak Paul <[email protected]> Co-authored-by: YiYi Xu <[email protected]> Co-authored-by: Pedro Cuenca <[email protected]>
This PR writes a nice contribution doc and also makes sure that the philosophy and contribution docs are easily accesible from GitHub by adding copy-pasted files to the root of
diffusers
.