diff --git a/.github/ISSUE_TEMPLATE/bug_template.md b/.github/ISSUE_TEMPLATE/bug_template.md new file mode 100644 index 0000000000..52638633c0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_template.md @@ -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 + + +* Pytorch version: +* Operating System and version: + +## Your Environment + +* 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 + + +## Current Behavior + + +## Possible Solution + + +## Steps to Reproduce + + +1. +2. +... + +## Failure Logs [if any] + + diff --git a/.github/ISSUE_TEMPLATE/doc_template.md b/.github/ISSUE_TEMPLATE/doc_template.md new file mode 100644 index 0000000000..a4cdc333e8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/doc_template.md @@ -0,0 +1,9 @@ +--- +name: "\U0001F4DA Documentation" +about: Report a documentation related issue + +--- + +## 📚 Documentation + + + +## Is your feature request related to a problem? Please describe. + + +## Describe the solution + + +## Describe alternatives solution + diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md new file mode 100644 index 0000000000..2b9bf81623 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md @@ -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? diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 758b95364b..0220c44796 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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: - ## 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. diff --git a/README.md b/README.md index 665f74b234..b1eb183d3e 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,14 @@ WARNING: if you fork this repo, github actions will run daily on it. To disable this, go to /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) @@ -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)