diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 939e5341e..1d6357fb4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,9 +1,13 @@ # How to Contribute -We'd love to accept your patches and contributions to this project. There are -just a few small guidelines you need to follow. +We'd love to accept your patches and contributions to this project. -## Contributor License Agreement +Notably, we're working to make this project contributor-friendly. Please follow the +progress and comment [here](https://github.com/tensorflow/model-optimization/issues/131). + +## One-time Setup + +### Contributor License Agreement Contributions to this project must be accompanied by a Contributor License Agreement. You (or your employer) retain the copyright to your contribution; @@ -15,6 +19,16 @@ You generally only need to submit a CLA once, so if you've already submitted one (even if it was for a different project), you probably don't need to do it again. +## TensorFlow Model Optimization Specific + +### Contributing Whole Techniques + +See these [guidelines](CONTRIBUTING_TECHNIQUE.md). + +### Other Contributions + +Please wait until we finish this section. + ## Code reviews All submissions, including submissions by project members, require review. We @@ -25,4 +39,7 @@ information on using pull requests. ## Community Guidelines This project follows [Google's Open Source Community -Guidelines](https://opensource.google.com/conduct/). +Guidelines](https://opensource.google.com/conduct/). Please also +look at the [TensorFlow contributor +guide](https://www.tensorflow.org/community/contribute), in particular for the +community values and style guides. diff --git a/CONTRIBUTING_TECHNIQUE.md b/CONTRIBUTING_TECHNIQUE.md new file mode 100644 index 000000000..6c9042815 --- /dev/null +++ b/CONTRIBUTING_TECHNIQUE.md @@ -0,0 +1,58 @@ +# Guidelines for Contributing a New Technique + +The following are guidelines for contributing a complete technique into the +toolkit, for example, connection pruning. + +We will be evolving these guidelines to make the process more effective, and +as we receive more contributions. For example, we are working on creating a +repository of training scripts for +different models and tasks aimed at simplifying technique validation +([issue](https://github.com/tensorflow/model-optimization/issues/133)), +making the project contributor-friendly +([issue](https://github.com/tensorflow/model-optimization/issues/131)), and +having reproducible results. + + +## Contribution Components + +1. Please start by providing an [RFC](https://github.com/tensorflow/community/blob/master/governance/TF-RFCs.md) under [model-optimization/community/rfcs](https://github.com/tensorflow/model-optimization/blob/master/community/rfcs). + Consider the following guidelines: + * API and implementation should strive for similarity with existing + techniques to provide the best user experience. + * consider the end-to-end experience for the user of your technique. + * be prepared for a potential design discussion. + +2. Provide experimental results that demonstrate benefits to end-users across + models and tasks. This is probably the main criteria for us to consider, so + the stronger the validation the better. Some relevant aspects are: + * for Keras APIs, we recommend the following test tasks (and + hope to be adding more): + * [BERT task](https://github.com/tensorflow/models/tree/master/official/nlp/bert) + * [object detection](https://github.com/tensorflow/models/tree/master/research/object_detection) + * results in combination with other techniques (e.g. post-training integer + quantization). + * results include not only accuracy but also deployment metrics (e.g. model, + storage space, latency, memory, to mention a few). + * reproducible results are best: e.g. provide hyperparameters with minimal + scripts to reproduce results. + * when possible, include trained models that showcase those benefits. + +3. Documentation and tutorials: + * overview page that requires minimal end-user domain knowledge. [Sample](https://www.tensorflow.org/model_optimization/guide/pruning) + * TODO(tfmot): template + * colab tutorial that covers the most common use cases and user + journeys. [Sample](https://www.tensorflow.org/model_optimization/guide/pruning/pruning_with_keras) + * advanced documentation that may cover: + * advanced use cases not in tutorial. [Sample](https://www.tensorflow.org/model_optimization/guide/pruning/train_sparse_models) + * internals not relevant to end-user (e.g. app and model developers) but relevant to + others in ecosystem (e.g. hardware developers and other contributors). + +4. Packaging and release: + * releases are managed by the TensorFlow Model Optimization team. Work with + them to produce releases. + * auto-generated API docs. + +5. Collaborative blog post (optional) + * samples: [pruning + API](https://medium.com/tensorflow/tensorflow-model-optimization-toolkit-pruning-api-42cac9157a6a) + and [post-training integer quantization](https://medium.com/tensorflow/tensorflow-model-optimization-toolkit-post-training-integer-quantization-b4964a1ea9ba) diff --git a/google3/third_party/tensorflow_model_optimization/opensource/community/rfcs/README.md b/google3/third_party/tensorflow_model_optimization/opensource/community/rfcs/README.md new file mode 100644 index 000000000..b069eda98 --- /dev/null +++ b/google3/third_party/tensorflow_model_optimization/opensource/community/rfcs/README.md @@ -0,0 +1,7 @@ +# TensorFlow Model Optimization RFCs + +This directory stores approved RFCs for new techniques. + +## Process + +Please carefully read our [new technique contribution guidelines](https://github.com/tensorflow/model-optimization/blob/master/CONTRIBUTING_TECHNIQUE.md).