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
25e6e941
Unverified
Commit
25e6e941
authored
Nov 01, 2023
by
Dong-geon Lee
Committed by
GitHub
Oct 31, 2023
Browse files
Unify warning styles for better readability (#27184)
parent
50378cbf
Changes
22
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
examples/pytorch/token-classification/run_ner.py
examples/pytorch/token-classification/run_ner.py
+1
-1
examples/pytorch/translation/run_translation.py
examples/pytorch/translation/run_translation.py
+1
-1
No files found.
examples/pytorch/token-classification/run_ner.py
View file @
25e6e941
...
@@ -267,7 +267,7 @@ def main():
...
@@ -267,7 +267,7 @@ def main():
# Log on each process the small summary:
# Log on each process the small summary:
logger
.
warning
(
logger
.
warning
(
f
"Process rank:
{
training_args
.
local_rank
}
, device:
{
training_args
.
device
}
, n_gpu:
{
training_args
.
n_gpu
}
"
f
"Process rank:
{
training_args
.
local_rank
}
, device:
{
training_args
.
device
}
, n_gpu:
{
training_args
.
n_gpu
}
,
"
+
f
"distributed training:
{
training_args
.
parallel_mode
.
value
==
'distributed'
}
, 16-bits training:
{
training_args
.
fp16
}
"
+
f
"distributed training:
{
training_args
.
parallel_mode
.
value
==
'distributed'
}
, 16-bits training:
{
training_args
.
fp16
}
"
)
)
logger
.
info
(
f
"Training/evaluation parameters
{
training_args
}
"
)
logger
.
info
(
f
"Training/evaluation parameters
{
training_args
}
"
)
...
...
examples/pytorch/translation/run_translation.py
View file @
25e6e941
...
@@ -311,7 +311,7 @@ def main():
...
@@ -311,7 +311,7 @@ def main():
# Log on each process the small summary:
# Log on each process the small summary:
logger
.
warning
(
logger
.
warning
(
f
"Process rank:
{
training_args
.
local_rank
}
, device:
{
training_args
.
device
}
, n_gpu:
{
training_args
.
n_gpu
}
"
f
"Process rank:
{
training_args
.
local_rank
}
, device:
{
training_args
.
device
}
, n_gpu:
{
training_args
.
n_gpu
}
,
"
+
f
"distributed training:
{
training_args
.
parallel_mode
.
value
==
'distributed'
}
, 16-bits training:
{
training_args
.
fp16
}
"
+
f
"distributed training:
{
training_args
.
parallel_mode
.
value
==
'distributed'
}
, 16-bits training:
{
training_args
.
fp16
}
"
)
)
logger
.
info
(
f
"Training/evaluation parameters
{
training_args
}
"
)
logger
.
info
(
f
"Training/evaluation parameters
{
training_args
}
"
)
...
...
Prev
1
2
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