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
18 changed files
with
19 additions
and
19 deletions
+19
-19
examples/research_projects/distillation/run_squad_w_distillation.py
...esearch_projects/distillation/run_squad_w_distillation.py
+1
-1
examples/research_projects/distillation/scripts/binarized_data.py
.../research_projects/distillation/scripts/binarized_data.py
+1
-1
examples/research_projects/distillation/scripts/token_counts.py
...es/research_projects/distillation/scripts/token_counts.py
+1
-1
examples/research_projects/mlm_wwm/run_mlm_wwm.py
examples/research_projects/mlm_wwm/run_mlm_wwm.py
+1
-1
examples/research_projects/mm-imdb/run_mmimdb.py
examples/research_projects/mm-imdb/run_mmimdb.py
+1
-1
examples/research_projects/movement-pruning/masked_run_glue.py
...les/research_projects/movement-pruning/masked_run_glue.py
+1
-1
examples/research_projects/movement-pruning/masked_run_squad.py
...es/research_projects/movement-pruning/masked_run_squad.py
+1
-1
examples/research_projects/performer/run_mlm_performer.py
examples/research_projects/performer/run_mlm_performer.py
+1
-1
examples/research_projects/wav2vec2/run_asr.py
examples/research_projects/wav2vec2/run_asr.py
+1
-1
examples/research_projects/wav2vec2/run_common_voice.py
examples/research_projects/wav2vec2/run_common_voice.py
+1
-1
examples/research_projects/wav2vec2/run_pretrain.py
examples/research_projects/wav2vec2/run_pretrain.py
+1
-1
examples/research_projects/zero-shot-distillation/distill_classifier.py
...rch_projects/zero-shot-distillation/distill_classifier.py
+1
-1
examples/tensorflow/multiple-choice/run_tf_multiple_choice.py
...ples/tensorflow/multiple-choice/run_tf_multiple_choice.py
+1
-1
examples/tensorflow/question-answering/run_qa.py
examples/tensorflow/question-answering/run_qa.py
+1
-1
examples/tensorflow/text-classification/run_glue.py
examples/tensorflow/text-classification/run_glue.py
+1
-1
examples/tensorflow/text-classification/run_text_classification.py
...tensorflow/text-classification/run_text_classification.py
+1
-1
templates/adding_a_new_example_script/{{cookiecutter.directory_name}}/run_{{cookiecutter.example_shortcut}}.py
...directory_name}}/run_{{cookiecutter.example_shortcut}}.py
+2
-2
tests/sagemaker/scripts/pytorch/run_glue_model_parallelism.py
...s/sagemaker/scripts/pytorch/run_glue_model_parallelism.py
+1
-1
No files found.
examples/research_projects/distillation/run_squad_w_distillation.py
View file @
4a872cae
...
@@ -734,7 +734,7 @@ def main():
...
@@ -734,7 +734,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/research_projects/distillation/scripts/binarized_data.py
View file @
4a872cae
...
@@ -27,7 +27,7 @@ from transformers import BertTokenizer, GPT2Tokenizer, RobertaTokenizer
...
@@ -27,7 +27,7 @@ from transformers import BertTokenizer, GPT2Tokenizer, RobertaTokenizer
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/research_projects/distillation/scripts/token_counts.py
View file @
4a872cae
...
@@ -22,7 +22,7 @@ from collections import Counter
...
@@ -22,7 +22,7 @@ from collections import Counter
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/research_projects/mlm_wwm/run_mlm_wwm.py
View file @
4a872cae
...
@@ -201,7 +201,7 @@ def main():
...
@@ -201,7 +201,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/research_projects/mm-imdb/run_mmimdb.py
View file @
4a872cae
...
@@ -466,7 +466,7 @@ def main():
...
@@ -466,7 +466,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/research_projects/movement-pruning/masked_run_glue.py
View file @
4a872cae
...
@@ -824,7 +824,7 @@ def main():
...
@@ -824,7 +824,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/research_projects/movement-pruning/masked_run_squad.py
View file @
4a872cae
...
@@ -985,7 +985,7 @@ def main():
...
@@ -985,7 +985,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/research_projects/performer/run_mlm_performer.py
View file @
4a872cae
...
@@ -467,7 +467,7 @@ if __name__ == "__main__":
...
@@ -467,7 +467,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/research_projects/wav2vec2/run_asr.py
View file @
4a872cae
...
@@ -65,7 +65,7 @@ class ModelArguments:
...
@@ -65,7 +65,7 @@ class ModelArguments:
def
configure_logger
(
model_args
:
ModelArguments
,
training_args
:
TrainingArguments
):
def
configure_logger
(
model_args
:
ModelArguments
,
training_args
:
TrainingArguments
):
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/research_projects/wav2vec2/run_common_voice.py
View file @
4a872cae
...
@@ -285,7 +285,7 @@ def main():
...
@@ -285,7 +285,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/research_projects/wav2vec2/run_pretrain.py
View file @
4a872cae
...
@@ -70,7 +70,7 @@ class ModelArguments:
...
@@ -70,7 +70,7 @@ class ModelArguments:
def
configure_logger
(
model_args
:
ModelArguments
,
training_args
:
TrainingArguments
):
def
configure_logger
(
model_args
:
ModelArguments
,
training_args
:
TrainingArguments
):
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/research_projects/zero-shot-distillation/distill_classifier.py
View file @
4a872cae
...
@@ -245,7 +245,7 @@ def main():
...
@@ -245,7 +245,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/tensorflow/multiple-choice/run_tf_multiple_choice.py
View file @
4a872cae
...
@@ -111,7 +111,7 @@ def main():
...
@@ -111,7 +111,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/tensorflow/question-answering/run_qa.py
View file @
4a872cae
...
@@ -293,7 +293,7 @@ def main():
...
@@ -293,7 +293,7 @@ def main():
# region Logging
# region 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/tensorflow/text-classification/run_glue.py
View file @
4a872cae
...
@@ -255,7 +255,7 @@ def main():
...
@@ -255,7 +255,7 @@ def main():
# region Logging
# region 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/tensorflow/text-classification/run_text_classification.py
View file @
4a872cae
...
@@ -247,7 +247,7 @@ def main():
...
@@ -247,7 +247,7 @@ def main():
# region Logging
# region 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
)],
)
)
...
...
templates/adding_a_new_example_script/{{cookiecutter.directory_name}}/run_{{cookiecutter.example_shortcut}}.py
View file @
4a872cae
...
@@ -222,7 +222,7 @@ def main():
...
@@ -222,7 +222,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
)],
)
)
...
@@ -658,7 +658,7 @@ def main():
...
@@ -658,7 +658,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
,
)
)
...
...
tests/sagemaker/scripts/pytorch/run_glue_model_parallelism.py
View file @
4a872cae
...
@@ -206,7 +206,7 @@ def main():
...
@@ -206,7 +206,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
)],
)
)
...
...
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