Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
ea90f0c1
Commit
ea90f0c1
authored
Aug 24, 2021
by
Mark Daoust
Committed by
A. Unique TensorFlower
Aug 24, 2021
Browse files
Remove --gen_report flag.
This will be the default behavior. PiperOrigin-RevId: 392643474
parent
7d385aef
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
15 deletions
+4
-15
official/utils/docs/build_nlp_api_docs.py
official/utils/docs/build_nlp_api_docs.py
+2
-7
official/utils/docs/build_vision_api_docs.py
official/utils/docs/build_vision_api_docs.py
+2
-8
No files found.
official/utils/docs/build_nlp_api_docs.py
View file @
ea90f0c1
...
@@ -46,16 +46,13 @@ flags.DEFINE_bool('search_hints', True,
...
@@ -46,16 +46,13 @@ flags.DEFINE_bool('search_hints', True,
flags
.
DEFINE_string
(
'site_path'
,
'/api_docs/python'
,
flags
.
DEFINE_string
(
'site_path'
,
'/api_docs/python'
,
'Path prefix in the _toc.yaml'
)
'Path prefix in the _toc.yaml'
)
flags
.
DEFINE_bool
(
'gen_report'
,
False
,
'Generate an API report containing the health of the '
'docstrings of the public API.'
)
PROJECT_SHORT_NAME
=
'tfnlp'
PROJECT_SHORT_NAME
=
'tfnlp'
PROJECT_FULL_NAME
=
'TensorFlow Official Models - NLP Modeling Library'
PROJECT_FULL_NAME
=
'TensorFlow Official Models - NLP Modeling Library'
def
gen_api_docs
(
code_url_prefix
,
site_path
,
output_dir
,
gen_report
,
def
gen_api_docs
(
code_url_prefix
,
site_path
,
output_dir
,
project_short_name
,
project_short_name
,
project_full_name
,
search_hints
):
project_full_name
,
search_hints
):
"""Generates api docs for the tensorflow docs package."""
"""Generates api docs for the tensorflow docs package."""
build_api_docs_lib
.
hide_module_model_and_layer_methods
()
build_api_docs_lib
.
hide_module_model_and_layer_methods
()
del
tfnlp
.
layers
.
MultiHeadAttention
del
tfnlp
.
layers
.
MultiHeadAttention
...
@@ -68,7 +65,6 @@ def gen_api_docs(code_url_prefix, site_path, output_dir, gen_report,
...
@@ -68,7 +65,6 @@ def gen_api_docs(code_url_prefix, site_path, output_dir, gen_report,
code_url_prefix
=
code_url_prefix
,
code_url_prefix
=
code_url_prefix
,
search_hints
=
search_hints
,
search_hints
=
search_hints
,
site_path
=
site_path
,
site_path
=
site_path
,
gen_report
=
gen_report
,
callbacks
=
[
public_api
.
explicit_package_contents_filter
],
callbacks
=
[
public_api
.
explicit_package_contents_filter
],
)
)
...
@@ -84,7 +80,6 @@ def main(argv):
...
@@ -84,7 +80,6 @@ def main(argv):
code_url_prefix
=
FLAGS
.
code_url_prefix
,
code_url_prefix
=
FLAGS
.
code_url_prefix
,
site_path
=
FLAGS
.
site_path
,
site_path
=
FLAGS
.
site_path
,
output_dir
=
FLAGS
.
output_dir
,
output_dir
=
FLAGS
.
output_dir
,
gen_report
=
FLAGS
.
gen_report
,
project_short_name
=
PROJECT_SHORT_NAME
,
project_short_name
=
PROJECT_SHORT_NAME
,
project_full_name
=
PROJECT_FULL_NAME
,
project_full_name
=
PROJECT_FULL_NAME
,
search_hints
=
FLAGS
.
search_hints
)
search_hints
=
FLAGS
.
search_hints
)
...
...
official/utils/docs/build_vision_api_docs.py
View file @
ea90f0c1
...
@@ -46,16 +46,12 @@ flags.DEFINE_bool('search_hints', True,
...
@@ -46,16 +46,12 @@ flags.DEFINE_bool('search_hints', True,
flags
.
DEFINE_string
(
'site_path'
,
'tfvision/api_docs/python'
,
flags
.
DEFINE_string
(
'site_path'
,
'tfvision/api_docs/python'
,
'Path prefix in the _toc.yaml'
)
'Path prefix in the _toc.yaml'
)
flags
.
DEFINE_bool
(
'gen_report'
,
False
,
'Generate an API report containing the health of the '
'docstrings of the public API.'
)
PROJECT_SHORT_NAME
=
'tfvision'
PROJECT_SHORT_NAME
=
'tfvision'
PROJECT_FULL_NAME
=
'TensorFlow Official Models - Vision Modeling Library'
PROJECT_FULL_NAME
=
'TensorFlow Official Models - Vision Modeling Library'
def
gen_api_docs
(
code_url_prefix
,
site_path
,
output_dir
,
gen_report
,
def
gen_api_docs
(
code_url_prefix
,
site_path
,
output_dir
,
project_short_name
,
project_short_name
,
project_full_name
,
search_hints
):
project_full_name
,
search_hints
):
"""Generates api docs for the tensorflow docs package."""
"""Generates api docs for the tensorflow docs package."""
build_api_docs_lib
.
hide_module_model_and_layer_methods
()
build_api_docs_lib
.
hide_module_model_and_layer_methods
()
...
@@ -66,7 +62,6 @@ def gen_api_docs(code_url_prefix, site_path, output_dir, gen_report,
...
@@ -66,7 +62,6 @@ def gen_api_docs(code_url_prefix, site_path, output_dir, gen_report,
code_url_prefix
=
code_url_prefix
,
code_url_prefix
=
code_url_prefix
,
search_hints
=
search_hints
,
search_hints
=
search_hints
,
site_path
=
site_path
,
site_path
=
site_path
,
gen_report
=
gen_report
,
callbacks
=
[
public_api
.
explicit_package_contents_filter
],
callbacks
=
[
public_api
.
explicit_package_contents_filter
],
)
)
...
@@ -82,7 +77,6 @@ def main(argv):
...
@@ -82,7 +77,6 @@ def main(argv):
code_url_prefix
=
FLAGS
.
code_url_prefix
,
code_url_prefix
=
FLAGS
.
code_url_prefix
,
site_path
=
FLAGS
.
site_path
,
site_path
=
FLAGS
.
site_path
,
output_dir
=
FLAGS
.
output_dir
,
output_dir
=
FLAGS
.
output_dir
,
gen_report
=
FLAGS
.
gen_report
,
project_short_name
=
PROJECT_SHORT_NAME
,
project_short_name
=
PROJECT_SHORT_NAME
,
project_full_name
=
PROJECT_FULL_NAME
,
project_full_name
=
PROJECT_FULL_NAME
,
search_hints
=
FLAGS
.
search_hints
)
search_hints
=
FLAGS
.
search_hints
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment