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
2fb3c898
Commit
2fb3c898
authored
Feb 16, 2021
by
Mark Daoust
Committed by
A. Unique TensorFlower
Feb 16, 2021
Browse files
Internal change
PiperOrigin-RevId: 357746597
parent
84a561ca
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
13 deletions
+10
-13
official/utils/docs/build_docs.py
official/utils/docs/build_docs.py
+10
-13
No files found.
official/utils/docs/build_docs.py
View file @
2fb3c898
...
@@ -20,7 +20,7 @@ Example:
...
@@ -20,7 +20,7 @@ Example:
$> pip install -U git+https://github.com/tensorflow/docs
$> pip install -U git+https://github.com/tensorflow/docs
$> python build_docs \
$> python build_docs \
--output_dir=/tmp/api_docs \
--output_dir=/tmp/api_docs \
--project_short_name=tf
_
nlp
.modeling
\
--project_short_name=tfnlp \
--project_full_name="TensorFlow Official Models - NLP Modeling Library"
--project_full_name="TensorFlow Official Models - NLP Modeling Library"
"""
"""
...
@@ -35,7 +35,7 @@ from tensorflow_docs.api_generator import doc_controls
...
@@ -35,7 +35,7 @@ from tensorflow_docs.api_generator import doc_controls
from
tensorflow_docs.api_generator
import
generate_lib
from
tensorflow_docs.api_generator
import
generate_lib
from
tensorflow_docs.api_generator
import
public_api
from
tensorflow_docs.api_generator
import
public_api
from
official.nlp
import
modeling
as
tf
_
nlp
_modeling
from
official.nlp
import
modeling
as
tfnlp
FLAGS
=
flags
.
FLAGS
FLAGS
=
flags
.
FLAGS
...
@@ -48,18 +48,15 @@ flags.DEFINE_string(
...
@@ -48,18 +48,15 @@ flags.DEFINE_string(
flags
.
DEFINE_bool
(
'search_hints'
,
True
,
flags
.
DEFINE_bool
(
'search_hints'
,
True
,
'Include metadata search hints in the generated files'
)
'Include metadata search hints in the generated files'
)
flags
.
DEFINE_string
(
'site_path'
,
'
tf_nlp_modeling
/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
,
flags
.
DEFINE_bool
(
'gen_report'
,
False
,
'Generate an API report containing the health of the '
'Generate an API report containing the health of the '
'docstrings of the public API.'
)
'docstrings of the public API.'
)
flags
.
DEFINE_string
(
'project_short_name'
,
'tf_nlp.modeling'
,
PROJECT_SHORT_NAME
=
'tfnlp'
'The project short name referring to the python module to document.'
)
PROJECT_FULL_NAME
=
'TensorFlow Official Models - NLP Modeling Library'
flags
.
DEFINE_string
(
'project_full_name'
,
'TensorFlow Official Models - NLP Modeling Library'
,
'The main title for the project.'
)
def
_hide_module_model_and_layer_methods
():
def
_hide_module_model_and_layer_methods
():
...
@@ -105,8 +102,8 @@ def gen_api_docs(code_url_prefix, site_path, output_dir, gen_report,
...
@@ -105,8 +102,8 @@ def gen_api_docs(code_url_prefix, site_path, output_dir, gen_report,
doc_generator
=
generate_lib
.
DocGenerator
(
doc_generator
=
generate_lib
.
DocGenerator
(
root_title
=
project_full_name
,
root_title
=
project_full_name
,
py_modules
=
[(
project_short_name
,
tf
_
nlp
_modeling
)],
py_modules
=
[(
project_short_name
,
tfnlp
)],
base_dir
=
os
.
path
.
dirname
(
tf
_
nlp
_modeling
.
__file__
),
base_dir
=
os
.
path
.
dirname
(
tfnlp
.
__file__
),
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
,
...
@@ -127,8 +124,8 @@ def main(argv):
...
@@ -127,8 +124,8 @@ def main(argv):
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
,
gen_report
=
FLAGS
.
gen_report
,
project_short_name
=
FLAGS
.
project_short_name
,
project_short_name
=
PROJECT_SHORT_NAME
,
project_full_name
=
FLAGS
.
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