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

Commit 2177d9a

Browse files
authored
Fix the naming in the API name space.
We decided to use tf.\_\_internal\_\_ to make sure the user side ready understand this is for private/internal usage only.
1 parent abac309 commit 2177d9a

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

rfcs/20200810-tf-internal-api.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# tf._internal API namespace
1+
# tf.\_\_internal\_\_ API namespace
22

33
| Status | Accepted |
44
:-------------- |:---------------------------------------------------- |
@@ -10,7 +10,7 @@
1010

1111
## Objective
1212

13-
Adding a new "_internal" API namespace in TF to host APIs for framework building
13+
Adding a new "\_\_internal\_\_" API namespace in TF to host APIs for framework building
1414
/testing, etc. The API namespace will serve as a whitelist for client libraries
1515
to gradually migrate off the usage tf private API symbol.
1616

@@ -38,7 +38,7 @@ framework-builders, but not typical TensorFlow users.
3838

3939
## Design Proposal
4040

41-
Add a new namespace "tensorflow._internal" to host the framework building/
41+
Add a new namespace "tensorflow.\_\_internal\_\_" to host the framework building/
4242
testing related APIs that are currently used by other high level API in TF
4343
(Keras, and estimator, etc.). This name space will be treated as a protected
4444
API, which shouldn't be used by the end users. It will have no API contract
@@ -53,7 +53,7 @@ caused on the client side, TF must be aware who is using this API, so that any
5353
changes to those API will be verified against the client code.
5454

5555
### Acceptance Criteria
56-
The candidate of the "_internal" API should:
56+
The candidate of the "\_\_internal\_\_" API should:
5757

5858
1. Does NOT fit for core TF API, otherwise it should be exposed as core TF API.
5959
1. Are currently used by other high level API to build/test/deploy a framework
@@ -96,12 +96,12 @@ and will discuss with the API owner on a case to case basis.
9696

9797
|Symbol location |API Name |
9898
:-------------- |:---------------------------------------------------- |
99-
|python.framework.func_graph.FuncGraph |tf.internal.FuncGraph |
100-
|python.framework.combinations.*| tf.internal.test.combinations.* |
101-
|python.distribute.strategy_combinations.* |tf.internal.test.combinations.* |
102-
|python.util.object_identity.*|tf.internal.object_identity.* |
103-
|python.util.tf_decorator.TFDecorator|tf.internal.decorator.TFDecorator |
104-
|python.util.tf_decorator.unwrap|tf.internal.inspect.unwrap |
99+
|python.framework.func_graph.FuncGraph |tf.\_\_internal\_\_.FuncGraph |
100+
|python.framework.combinations.*| tf.\_\_internal\_\_.test.combinations.* |
101+
|python.distribute.strategy_combinations.* |tf.\_\_internal\_\_.test.combinations.* |
102+
|python.util.object_identity.*|tf.\_\_internal\_\_.object_identity.* |
103+
|python.util.tf_decorator.TFDecorator|tf.\_\_internal\_\_.decorator.TFDecorator |
104+
|python.util.tf_decorator.unwrap|tf.\_\_internal\_\_.inspect.unwrap |
105105

106106
### Alternative Names
107107
1. <b>"tf.internal"</b>: It gives the user the impression that this is not a
@@ -110,5 +110,5 @@ and will discuss with the API owner on a case to case basis.
110110
1. <b>"tf.infra"</b>: infrastructure is aligned with "building blocks" and low
111111
level functionalities, like file system/network etc. So far, the APIs we want
112112
to add are still high level APIs and utility functions.
113-
1. By Martin <b>"tf.\_internal"</b>: the extra "_" emphasis in the pythonic way
113+
1. By Martin <b>"tf.\_\_internal\_\_"</b>: the extra "_" emphasis in the pythonic way
114114
that this is for private usage.

0 commit comments

Comments
 (0)