Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

Commit 4246467

Browse files
Merge pull request #258 from tensorflow/martinwicke-patch-1
Add note about compat.v1 exports
2 parents 1ffeffb + 23ced50 commit 4246467

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

governance/api-reviews.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ produced by currently correct python code without a three weeks notice. This
3737
comes up most frequently when adding new ops, but also applies to non-obvious
3838
things such as the graph emitted by gradients or pfor.
3939

40+
### TensorFlow 1.x and 2.x
41+
42+
When adding new API end points, we use the `@tf_export` decorator. For *new* endpoints,
43+
expose them to the v2 API only: `@tf_export("some_name", v1=[])`. This prevents
44+
unnecessarily diverging the `compat.v1` namespace in future releases from what is
45+
published in TensorFlow 1.15.
4046

4147
### Docstrings
4248

0 commit comments

Comments
 (0)