Skip to content

Commit de7187c

Browse files
alanchiaotensorflower-gardener
authored andcommitted
Instructions for generating API docs.
PiperOrigin-RevId: 305105972
1 parent 1bd22a7 commit de7187c

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

build_docs.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
# ==============================================================================
15-
"""Tool to generate external api_docs for tensorflow_model_optimization.
15+
"""Tool to generate open source api_docs for tensorflow_model_optimization.
16+
17+
To use, you must first install the tensorflow docs package:
18+
19+
pip install git+https://github.com/tensorflow/docs
20+
1621
1722
Note:
1823
If duplicate or spurious docs are generated (e.g. internal names), consider
@@ -32,7 +37,6 @@
3237

3338
import tensorflow_model_optimization as tfmot
3439

35-
3640
flags.DEFINE_string("output_dir", "/tmp/model_optimization_api",
3741
"Where to output the docs")
3842

tensorflow_model_optimization/BUILD

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,13 @@ py_library(
2525
"//tensorflow_model_optimization/python/core/sparsity",
2626
],
2727
)
28+
29+
py_binary(
30+
name = "build_docs",
31+
srcs = ["build_docs.py"],
32+
python_version = "PY3",
33+
deps = [
34+
# tensorflow_docs/api_generator:generate_lib dep1,
35+
"//third_party/tensorflow_model_optimization",
36+
],
37+
)

0 commit comments

Comments
 (0)