Skip to content

Commit

Permalink
Initial contributor guidelines. Work-in-progress.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 277321901
  • Loading branch information
alanchiao authored and tensorflower-gardener committed Oct 29, 2019
1 parent 681c284 commit 19f83c9
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 4 deletions.
25 changes: 21 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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
Expand All @@ -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.
58 changes: 58 additions & 0 deletions CONTRIBUTING_TECHNIQUE.md
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
@@ -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).

0 comments on commit 19f83c9

Please sign in to comment.