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
chenpangpang
transformers
Commits
8d25df2c
"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "e5101c2e27145f1a3261bae5d55c469203ca3439"
Unverified
Commit
8d25df2c
authored
Jan 11, 2021
by
Sylvain Gugger
Committed by
GitHub
Jan 11, 2021
Browse files
Make doc styler detect lists on rst (#9488)
parent
5a442a8d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
docs/source/benchmarks.rst
docs/source/benchmarks.rst
+4
-0
utils/style_doc.py
utils/style_doc.py
+2
-2
No files found.
docs/source/benchmarks.rst
View file @
8d25df2c
...
@@ -99,6 +99,7 @@ An instantiated benchmark object can then simply be run by calling ``benchmark.r
...
@@ -99,6 +99,7 @@ An instantiated benchmark object can then simply be run by calling ``benchmark.r
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
==================== ENVIRONMENT INFORMATION ====================
==================== ENVIRONMENT INFORMATION ====================
- transformers_version: 2.11.0
- transformers_version: 2.11.0
- framework: PyTorch
- framework: PyTorch
- use_torchscript: False
- use_torchscript: False
...
@@ -145,6 +146,7 @@ An instantiated benchmark object can then simply be run by calling ``benchmark.r
...
@@ -145,6 +146,7 @@ An instantiated benchmark object can then simply be run by calling ``benchmark.r
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
==================== ENVIRONMENT INFORMATION ====================
==================== ENVIRONMENT INFORMATION ====================
- transformers_version: 2.11.0
- transformers_version: 2.11.0
- framework: Tensorflow
- framework: Tensorflow
- use_xla: False
- use_xla: False
...
@@ -228,6 +230,7 @@ configurations must be inserted with the benchmark args as follows.
...
@@ -228,6 +230,7 @@ configurations must be inserted with the benchmark args as follows.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
==================== ENVIRONMENT INFORMATION ====================
==================== ENVIRONMENT INFORMATION ====================
- transformers_version: 2.11.0
- transformers_version: 2.11.0
- framework: PyTorch
- framework: PyTorch
- use_torchscript: False
- use_torchscript: False
...
@@ -297,6 +300,7 @@ configurations must be inserted with the benchmark args as follows.
...
@@ -297,6 +300,7 @@ configurations must be inserted with the benchmark args as follows.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
==================== ENVIRONMENT INFORMATION ====================
==================== ENVIRONMENT INFORMATION ====================
- transformers_version: 2.11.0
- transformers_version: 2.11.0
- framework: Tensorflow
- framework: Tensorflow
- use_xla: False
- use_xla: False
...
...
utils/style_doc.py
View file @
8d25df2c
...
@@ -381,9 +381,9 @@ def style_rst_file(doc_file, max_len=119, check_only=False):
...
@@ -381,9 +381,9 @@ def style_rst_file(doc_file, max_len=119, check_only=False):
doc
=
f
.
read
()
doc
=
f
.
read
()
# Add missing new lines before lists
# Add missing new lines before lists
doc
=
_add_new_lines_before_list
(
doc
)
clean_
doc
=
_add_new_lines_before_list
(
doc
)
# Style
# Style
clean_doc
=
rst_styler
.
style
(
doc
,
max_len
=
max_len
)
clean_doc
=
rst_styler
.
style
(
clean_
doc
,
max_len
=
max_len
)
diff
=
clean_doc
!=
doc
diff
=
clean_doc
!=
doc
if
not
check_only
and
diff
:
if
not
check_only
and
diff
:
...
...
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