Skip to content

Commit

Permalink
Merge pull request pytorch#972 from pytorch/readme
Browse files Browse the repository at this point in the history
clarifying what pytorch/examples is and how to contribute
  • Loading branch information
msaroufim authored Mar 10, 2022
2 parents 3fe399d + e3e09e1 commit c1a7307
Show file tree
Hide file tree
Showing 6 changed files with 142 additions and 12 deletions.
42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: "\U0001F41B Bug report"
about: Create a report to help us improve

---

Your issue may already be reported!
Please search on the [issue tracker](https://github.com/pytorch/serve/examples) before creating one.

## Context
<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
* Pytorch version:
* Operating System and version:

## Your Environment
<!--- Include as many relevant details about the environment you experienced the bug in -->
* Installed using source? [yes/no]:
* Are you planning to deploy it using docker container? [yes/no]:
* Is it a CPU or GPU environment?:
* Which example are you using:
* Link to code or data to repro [if any]:

## Expected Behavior
<!--- If you're describing a bug, tell us what should happen -->

## Current Behavior
<!--- If describing a bug, tell us what happens instead of the expected behavior -->

## Possible Solution
<!--- Not obligatory, but suggest a fix/reason for the bug -->

## Steps to Reproduce
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->
1.
2.
...

## Failure Logs [if any]
<!--- Provide any relevant log snippets or files here. -->

9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/doc_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: "\U0001F4DA Documentation"
about: Report a documentation related issue

---

## 📚 Documentation

<!-- A clear and concise description of what content in any of the README.md files is an issues
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: "\U0001F680 Feature request"
about: Suggest a new example or an improvement to the repo

---

<!--
Thank you for suggesting an idea to improve pytorch/examples
Please fill in as much of the template below as you're able.
-->

## Is your feature request related to a problem? Please describe.
<!-- Please describe the problem you are trying to solve. -->

## Describe the solution
<!-- Please describe the desired behavior. -->

## Describe alternatives solution
<!-- Please describe alternative solutions or features you have considered. -->
41 changes: 41 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: "\U0001F41B Pull Request"
about: Fix a bug or create new example

---

## Description

Please include a summary of the newly proposed example or issue being fixed. Please also include relevant motivation, context.

If this is a new example, how is your example different enough from the remaining examples in the repo.

If this is a bug fix please link the issue you are fixing. Fixes #(issue)

## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New Example (new example contribution)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

## Feature/Issue validation/testing

Please describe the tests [UT/IT] that you ran to verify your changes and relevant result summary. If this is a bug fix please run `run_python_examples.sh` before and after your change locally to make sure it works and add the logs here.

- [ ] Logs before change
- [ ] Logs after change

- Logs

If this is a new example please add a corresponding test in `run_python_examples.sh`

- [ ] Test Added

## Checklist:

- [ ] Have you added tests that prove your fix is effective or that this example works?
- [ ] Has code been commented, particularly in hard-to-understand areas?
- [ ] Have you made corresponding changes to the documentation?
28 changes: 17 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,33 @@ possible.
## Pull Requests
We actively welcome your pull requests.

If you're new we encourage you to take a look at issues tagged with [good first issue](https://github.com/pytorch/examples/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)

### For new examples
0. Create a github issue proposing a new example and make sure it's substantially different from an existing one
1. Fork the repo and create your branch from `main`.
2. If you've added code that should be tested, add tests to `run_python_examples.sh`
3. Create a `README.md`
4. Ensure your test passes locally
5. If you haven't already, complete the Contributor License Agreement ("CLA").
6. Address any feedback in code review promptly

## For bug fixes
1. Fork the repo and create your branch from `main`.
2. If you've added code that should be tested, add tests.
3. If you've changed APIs, update the documentation.
4. Ensure the test suite passes.
5. Make sure your code lints.
6. If you haven't already, complete the Contributor License Agreement ("CLA").
2. Make your fix
3. Make sure that `run_python_examples.sh` passes locally
5. If you haven't already, complete the Contributor License Agreement ("CLA").
6. Address any feedback in code review promptly


## Contributor License Agreement ("CLA")
In order to accept your pull request, we need you to submit a CLA. You only need
to do this once to work on any of Facebook's open source projects.

Complete your CLA here: <https://code.facebook.com/cla>

## Issues
We use GitHub issues to track public bugs. Please ensure your description is
clear and has sufficient instructions to be able to reproduce the issue.

Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe
disclosure of security bugs. In those cases, please go through the process
outlined on that page and do not file a public issue.

## License
By contributing to examples, you agree that your contributions will be licensed
under the LICENSE file in the root directory of this source tree.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@

WARNING: if you fork this repo, github actions will run daily on it. To disable this, go to <myuser>/examples/settings/actions and Disable Actions for this repository.

A repository showcasing examples of using [PyTorch](https://github.com/pytorch/pytorch):
`pytorch/examples` is a repository showcasing examples of using [PyTorch](https://github.com/pytorch/pytorch). The goal is to have curated, short, few/no dependencies *high quality* examples that are substantially different from each other that can be emulated in your existing work.

For tutorials: https://github.com/pytorch/tutorials
For changes to pytorch.org: https://github.com/pytorch/pytorch.github.io
For a general model hub: https://pytorch.org/hub/ or https://huggingface.co/models
For recipes on how to run PyTorch in production: https://github.com/facebookresearch/recipes
For general Q&A and support: https://discuss.pytorch.org/
## Available models
- [Image classification (MNIST) using Convnets](./mnist/README.md)
- [Word-level Language Modeling using RNN and Transformer](./word_language_model/README.md)
- [Training Imagenet Classifiers with Popular Networks](./imagenet/README.md)
Expand All @@ -17,8 +23,14 @@ A repository showcasing examples of using [PyTorch](https://github.com/pytorch/p
- [Natural Language Inference (SNLI) with GloVe vectors, LSTMs, and torchtext](snli)
- [Time sequence prediction - use an LSTM to learn Sine waves](./time_sequence_prediction/README.md)
- [Implement the Neural Style Transfer algorithm on images](./fast_neural_style/README.md)
- [Reinforcement Learning with Actor Critic and REINFORCE algorithms on Open AI gym](./reinforcement_learning/README.md)
- [PyTorch Module Transformations using fx](./fx/README.md)
- Distributed PyTorch examples with [Distributed Data Parallel](./distributed/ddp/README.md) and [RPC](./distributed/rpc/README.md)
- [Several examples illustrating the C++ Frontend](cpp)


Additionally, a list of good examples hosted in their own repositories:

- [Neural Machine Translation using sequence-to-sequence RNN with attention (OpenNMT)](https://github.com/OpenNMT/OpenNMT-py)

If you'd like to contribute your own example or fix a bug please make sure to take a look at [CONTRIBUTING.md](CONTRIBUTING.md)

0 comments on commit c1a7307

Please sign in to comment.