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
4a872cae
Unverified
Commit
4a872cae
authored
Jun 25, 2021
by
Stas Bekman
Committed by
GitHub
Jun 25, 2021
Browse files
remove extra white space from log format (#12360)
parent
a3daabfe
Changes
58
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
20 additions
and
20 deletions
+20
-20
docs/source/main_classes/trainer.rst
docs/source/main_classes/trainer.rst
+1
-1
examples/flax/language-modeling/run_clm_flax.py
examples/flax/language-modeling/run_clm_flax.py
+1
-1
examples/flax/language-modeling/run_mlm_flax.py
examples/flax/language-modeling/run_mlm_flax.py
+1
-1
examples/flax/summarization/run_summarization_flax.py
examples/flax/summarization/run_summarization_flax.py
+1
-1
examples/flax/text-classification/run_flax_glue.py
examples/flax/text-classification/run_flax_glue.py
+1
-1
examples/legacy/multiple_choice/run_multiple_choice.py
examples/legacy/multiple_choice/run_multiple_choice.py
+1
-1
examples/legacy/question-answering/run_squad.py
examples/legacy/question-answering/run_squad.py
+1
-1
examples/legacy/question-answering/run_squad_trainer.py
examples/legacy/question-answering/run_squad_trainer.py
+1
-1
examples/legacy/run_language_modeling.py
examples/legacy/run_language_modeling.py
+1
-1
examples/legacy/run_openai_gpt.py
examples/legacy/run_openai_gpt.py
+1
-1
examples/legacy/run_swag.py
examples/legacy/run_swag.py
+1
-1
examples/legacy/run_transfo_xl.py
examples/legacy/run_transfo_xl.py
+1
-1
examples/legacy/seq2seq/finetune_trainer.py
examples/legacy/seq2seq/finetune_trainer.py
+1
-1
examples/legacy/text-classification/run_tf_text_classification.py
.../legacy/text-classification/run_tf_text_classification.py
+1
-1
examples/legacy/token-classification/run_ner.py
examples/legacy/token-classification/run_ner.py
+1
-1
examples/legacy/token-classification/run_tf_ner.py
examples/legacy/token-classification/run_tf_ner.py
+1
-1
examples/pytorch/language-modeling/run_clm.py
examples/pytorch/language-modeling/run_clm.py
+1
-1
examples/pytorch/language-modeling/run_clm_no_trainer.py
examples/pytorch/language-modeling/run_clm_no_trainer.py
+1
-1
examples/pytorch/language-modeling/run_mlm.py
examples/pytorch/language-modeling/run_mlm.py
+1
-1
examples/pytorch/language-modeling/run_mlm_no_trainer.py
examples/pytorch/language-modeling/run_mlm_no_trainer.py
+1
-1
No files found.
docs/source/main_classes/trainer.rst
View file @
4a872cae
...
@@ -147,7 +147,7 @@ Here is an example of how this can be used in an application:
...
@@ -147,7 +147,7 @@ Here is an example of how this can be used in an application:
# Setup logging
# Setup logging
logging.basicConfig(
logging.basicConfig(
format="%(asctime)s - %(levelname)s - %(name)s -
%(message)s",
format="%(asctime)s - %(levelname)s - %(name)s - %(message)s",
datefmt="%m/%d/%Y %H:%M:%S",
datefmt="%m/%d/%Y %H:%M:%S",
handlers=[logging.StreamHandler(sys.stdout)],
handlers=[logging.StreamHandler(sys.stdout)],
)
)
...
...
examples/flax/language-modeling/run_clm_flax.py
View file @
4a872cae
...
@@ -267,7 +267,7 @@ def main():
...
@@ -267,7 +267,7 @@ def main():
# Make one log on every process with the configuration for debugging.
# Make one log on every process with the configuration for debugging.
logging
.
basicConfig
(
logging
.
basicConfig
(
format
=
"%(asctime)s - %(levelname)s - %(name)s -
%(message)s"
,
format
=
"%(asctime)s - %(levelname)s - %(name)s - %(message)s"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
level
=
logging
.
INFO
,
level
=
logging
.
INFO
,
)
)
...
...
examples/flax/language-modeling/run_mlm_flax.py
View file @
4a872cae
...
@@ -308,7 +308,7 @@ if __name__ == "__main__":
...
@@ -308,7 +308,7 @@ if __name__ == "__main__":
# Setup logging
# Setup logging
logging
.
basicConfig
(
logging
.
basicConfig
(
format
=
"%(asctime)s - %(levelname)s - %(name)s -
%(message)s"
,
format
=
"%(asctime)s - %(levelname)s - %(name)s - %(message)s"
,
level
=
"NOTSET"
,
level
=
"NOTSET"
,
datefmt
=
"[%X]"
,
datefmt
=
"[%X]"
,
)
)
...
...
examples/flax/summarization/run_summarization_flax.py
View file @
4a872cae
...
@@ -313,7 +313,7 @@ def main():
...
@@ -313,7 +313,7 @@ def main():
# Make one log on every process with the configuration for debugging.
# Make one log on every process with the configuration for debugging.
logging
.
basicConfig
(
logging
.
basicConfig
(
format
=
"%(asctime)s - %(levelname)s - %(name)s -
%(message)s"
,
format
=
"%(asctime)s - %(levelname)s - %(name)s - %(message)s"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
level
=
logging
.
INFO
,
level
=
logging
.
INFO
,
)
)
...
...
examples/flax/text-classification/run_flax_glue.py
View file @
4a872cae
...
@@ -249,7 +249,7 @@ def main():
...
@@ -249,7 +249,7 @@ def main():
# Make one log on every process with the configuration for debugging.
# Make one log on every process with the configuration for debugging.
logging
.
basicConfig
(
logging
.
basicConfig
(
format
=
"%(asctime)s - %(levelname)s - %(name)s -
%(message)s"
,
format
=
"%(asctime)s - %(levelname)s - %(name)s - %(message)s"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
level
=
logging
.
INFO
,
level
=
logging
.
INFO
,
)
)
...
...
examples/legacy/multiple_choice/run_multiple_choice.py
View file @
4a872cae
...
@@ -107,7 +107,7 @@ def main():
...
@@ -107,7 +107,7 @@ def main():
# Setup logging
# Setup logging
logging
.
basicConfig
(
logging
.
basicConfig
(
format
=
"%(asctime)s - %(levelname)s - %(name)s -
%(message)s"
,
format
=
"%(asctime)s - %(levelname)s - %(name)s - %(message)s"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
level
=
logging
.
INFO
if
training_args
.
local_rank
in
[
-
1
,
0
]
else
logging
.
WARN
,
level
=
logging
.
INFO
if
training_args
.
local_rank
in
[
-
1
,
0
]
else
logging
.
WARN
,
)
)
...
...
examples/legacy/question-answering/run_squad.py
View file @
4a872cae
...
@@ -702,7 +702,7 @@ def main():
...
@@ -702,7 +702,7 @@ def main():
# Setup logging
# Setup logging
logging
.
basicConfig
(
logging
.
basicConfig
(
format
=
"%(asctime)s - %(levelname)s - %(name)s -
%(message)s"
,
format
=
"%(asctime)s - %(levelname)s - %(name)s - %(message)s"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
level
=
logging
.
INFO
if
args
.
local_rank
in
[
-
1
,
0
]
else
logging
.
WARN
,
level
=
logging
.
INFO
if
args
.
local_rank
in
[
-
1
,
0
]
else
logging
.
WARN
,
)
)
...
...
examples/legacy/question-answering/run_squad_trainer.py
View file @
4a872cae
...
@@ -89,7 +89,7 @@ def main():
...
@@ -89,7 +89,7 @@ def main():
# Setup logging
# Setup logging
logging
.
basicConfig
(
logging
.
basicConfig
(
format
=
"%(asctime)s - %(levelname)s - %(name)s -
%(message)s"
,
format
=
"%(asctime)s - %(levelname)s - %(name)s - %(message)s"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
level
=
logging
.
INFO
if
training_args
.
local_rank
in
[
-
1
,
0
]
else
logging
.
WARN
,
level
=
logging
.
INFO
if
training_args
.
local_rank
in
[
-
1
,
0
]
else
logging
.
WARN
,
)
)
...
...
examples/legacy/run_language_modeling.py
View file @
4a872cae
...
@@ -211,7 +211,7 @@ def main():
...
@@ -211,7 +211,7 @@ def main():
# Setup logging
# Setup logging
logging
.
basicConfig
(
logging
.
basicConfig
(
format
=
"%(asctime)s - %(levelname)s - %(name)s -
%(message)s"
,
format
=
"%(asctime)s - %(levelname)s - %(name)s - %(message)s"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
level
=
logging
.
INFO
if
training_args
.
local_rank
in
[
-
1
,
0
]
else
logging
.
WARN
,
level
=
logging
.
INFO
if
training_args
.
local_rank
in
[
-
1
,
0
]
else
logging
.
WARN
,
)
)
...
...
examples/legacy/run_openai_gpt.py
View file @
4a872cae
...
@@ -50,7 +50,7 @@ from transformers import (
...
@@ -50,7 +50,7 @@ from transformers import (
logging
.
basicConfig
(
logging
.
basicConfig
(
format
=
"%(asctime)s - %(levelname)s - %(name)s -
%(message)s"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
level
=
logging
.
INFO
format
=
"%(asctime)s - %(levelname)s - %(name)s - %(message)s"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
level
=
logging
.
INFO
)
)
logger
=
logging
.
getLogger
(
__name__
)
logger
=
logging
.
getLogger
(
__name__
)
...
...
examples/legacy/run_swag.py
View file @
4a872cae
...
@@ -617,7 +617,7 @@ def main():
...
@@ -617,7 +617,7 @@ def main():
# Setup logging
# Setup logging
logging
.
basicConfig
(
logging
.
basicConfig
(
format
=
"%(asctime)s - %(levelname)s - %(name)s -
%(message)s"
,
format
=
"%(asctime)s - %(levelname)s - %(name)s - %(message)s"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
level
=
logging
.
INFO
if
args
.
local_rank
in
[
-
1
,
0
]
else
logging
.
WARN
,
level
=
logging
.
INFO
if
args
.
local_rank
in
[
-
1
,
0
]
else
logging
.
WARN
,
)
)
...
...
examples/legacy/run_transfo_xl.py
View file @
4a872cae
...
@@ -33,7 +33,7 @@ from transformers import TransfoXLCorpus, TransfoXLLMHeadModel
...
@@ -33,7 +33,7 @@ from transformers import TransfoXLCorpus, TransfoXLLMHeadModel
logging
.
basicConfig
(
logging
.
basicConfig
(
format
=
"%(asctime)s - %(levelname)s - %(name)s -
%(message)s"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
level
=
logging
.
INFO
format
=
"%(asctime)s - %(levelname)s - %(name)s - %(message)s"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
level
=
logging
.
INFO
)
)
logger
=
logging
.
getLogger
(
__name__
)
logger
=
logging
.
getLogger
(
__name__
)
...
...
examples/legacy/seq2seq/finetune_trainer.py
View file @
4a872cae
...
@@ -163,7 +163,7 @@ def main():
...
@@ -163,7 +163,7 @@ def main():
# Setup logging
# Setup logging
logging
.
basicConfig
(
logging
.
basicConfig
(
format
=
"%(asctime)s - %(levelname)s - %(name)s -
%(message)s"
,
format
=
"%(asctime)s - %(levelname)s - %(name)s - %(message)s"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
level
=
logging
.
INFO
if
training_args
.
local_rank
in
[
-
1
,
0
]
else
logging
.
WARN
,
level
=
logging
.
INFO
if
training_args
.
local_rank
in
[
-
1
,
0
]
else
logging
.
WARN
,
)
)
...
...
examples/legacy/text-classification/run_tf_text_classification.py
View file @
4a872cae
...
@@ -220,7 +220,7 @@ def main():
...
@@ -220,7 +220,7 @@ def main():
# Setup logging
# Setup logging
logging
.
basicConfig
(
logging
.
basicConfig
(
format
=
"%(asctime)s - %(levelname)s - %(name)s -
%(message)s"
,
format
=
"%(asctime)s - %(levelname)s - %(name)s - %(message)s"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
level
=
logging
.
INFO
,
level
=
logging
.
INFO
,
)
)
...
...
examples/legacy/token-classification/run_ner.py
View file @
4a872cae
...
@@ -131,7 +131,7 @@ def main():
...
@@ -131,7 +131,7 @@ def main():
# Setup logging
# Setup logging
logging
.
basicConfig
(
logging
.
basicConfig
(
format
=
"%(asctime)s - %(levelname)s - %(name)s -
%(message)s"
,
format
=
"%(asctime)s - %(levelname)s - %(name)s - %(message)s"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
level
=
logging
.
INFO
if
training_args
.
local_rank
in
[
-
1
,
0
]
else
logging
.
WARN
,
level
=
logging
.
INFO
if
training_args
.
local_rank
in
[
-
1
,
0
]
else
logging
.
WARN
,
)
)
...
...
examples/legacy/token-classification/run_tf_ner.py
View file @
4a872cae
...
@@ -127,7 +127,7 @@ def main():
...
@@ -127,7 +127,7 @@ def main():
# Setup logging
# Setup logging
logging
.
basicConfig
(
logging
.
basicConfig
(
format
=
"%(asctime)s - %(levelname)s - %(name)s -
%(message)s"
,
format
=
"%(asctime)s - %(levelname)s - %(name)s - %(message)s"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
level
=
logging
.
INFO
,
level
=
logging
.
INFO
,
)
)
...
...
examples/pytorch/language-modeling/run_clm.py
View file @
4a872cae
...
@@ -199,7 +199,7 @@ def main():
...
@@ -199,7 +199,7 @@ def main():
# Setup logging
# Setup logging
logging
.
basicConfig
(
logging
.
basicConfig
(
format
=
"%(asctime)s - %(levelname)s - %(name)s -
%(message)s"
,
format
=
"%(asctime)s - %(levelname)s - %(name)s - %(message)s"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
handlers
=
[
logging
.
StreamHandler
(
sys
.
stdout
)],
handlers
=
[
logging
.
StreamHandler
(
sys
.
stdout
)],
)
)
...
...
examples/pytorch/language-modeling/run_clm_no_trainer.py
View file @
4a872cae
...
@@ -200,7 +200,7 @@ def main():
...
@@ -200,7 +200,7 @@ def main():
accelerator
=
Accelerator
()
accelerator
=
Accelerator
()
# Make one log on every process with the configuration for debugging.
# Make one log on every process with the configuration for debugging.
logging
.
basicConfig
(
logging
.
basicConfig
(
format
=
"%(asctime)s - %(levelname)s - %(name)s -
%(message)s"
,
format
=
"%(asctime)s - %(levelname)s - %(name)s - %(message)s"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
level
=
logging
.
INFO
,
level
=
logging
.
INFO
,
)
)
...
...
examples/pytorch/language-modeling/run_mlm.py
View file @
4a872cae
...
@@ -208,7 +208,7 @@ def main():
...
@@ -208,7 +208,7 @@ def main():
# Setup logging
# Setup logging
logging
.
basicConfig
(
logging
.
basicConfig
(
format
=
"%(asctime)s - %(levelname)s - %(name)s -
%(message)s"
,
format
=
"%(asctime)s - %(levelname)s - %(name)s - %(message)s"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
handlers
=
[
logging
.
StreamHandler
(
sys
.
stdout
)],
handlers
=
[
logging
.
StreamHandler
(
sys
.
stdout
)],
)
)
...
...
examples/pytorch/language-modeling/run_mlm_no_trainer.py
View file @
4a872cae
...
@@ -212,7 +212,7 @@ def main():
...
@@ -212,7 +212,7 @@ def main():
accelerator
=
Accelerator
()
accelerator
=
Accelerator
()
# Make one log on every process with the configuration for debugging.
# Make one log on every process with the configuration for debugging.
logging
.
basicConfig
(
logging
.
basicConfig
(
format
=
"%(asctime)s - %(levelname)s - %(name)s -
%(message)s"
,
format
=
"%(asctime)s - %(levelname)s - %(name)s - %(message)s"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
datefmt
=
"%m/%d/%Y %H:%M:%S"
,
level
=
logging
.
INFO
,
level
=
logging
.
INFO
,
)
)
...
...
Prev
1
2
3
Next
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