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
1d6a8474
"vscode:/vscode.git/clone" did not exist on "c79b07268054324c8b460e15df2b9c2402694552"
Unverified
Commit
1d6a8474
authored
Oct 11, 2023
by
Zach Mueller
Committed by
GitHub
Oct 11, 2023
Browse files
Fix checkpoint path in `no_trainer` scripts (#26733)
checkpoint path
parent
6ecb2ab6
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
12 additions
and
12 deletions
+12
-12
examples/pytorch/image-classification/run_image_classification_no_trainer.py
...age-classification/run_image_classification_no_trainer.py
+1
-1
examples/pytorch/image-pretraining/run_mim_no_trainer.py
examples/pytorch/image-pretraining/run_mim_no_trainer.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_no_trainer.py
examples/pytorch/language-modeling/run_mlm_no_trainer.py
+1
-1
examples/pytorch/multiple-choice/run_swag_no_trainer.py
examples/pytorch/multiple-choice/run_swag_no_trainer.py
+1
-1
examples/pytorch/question-answering/run_qa_beam_search_no_trainer.py
...torch/question-answering/run_qa_beam_search_no_trainer.py
+1
-1
examples/pytorch/question-answering/run_qa_no_trainer.py
examples/pytorch/question-answering/run_qa_no_trainer.py
+1
-1
examples/pytorch/semantic-segmentation/run_semantic_segmentation_no_trainer.py
...ntic-segmentation/run_semantic_segmentation_no_trainer.py
+1
-1
examples/pytorch/summarization/run_summarization_no_trainer.py
...les/pytorch/summarization/run_summarization_no_trainer.py
+1
-1
examples/pytorch/text-classification/run_glue_no_trainer.py
examples/pytorch/text-classification/run_glue_no_trainer.py
+1
-1
examples/pytorch/token-classification/run_ner_no_trainer.py
examples/pytorch/token-classification/run_ner_no_trainer.py
+1
-1
examples/pytorch/translation/run_translation_no_trainer.py
examples/pytorch/translation/run_translation_no_trainer.py
+1
-1
No files found.
examples/pytorch/image-classification/run_image_classification_no_trainer.py
View file @
1d6a8474
...
...
@@ -465,7 +465,7 @@ def main():
path
=
os
.
path
.
basename
(
checkpoint_path
)
accelerator
.
print
(
f
"Resumed from checkpoint:
{
checkpoint_path
}
"
)
accelerator
.
load_state
(
path
)
accelerator
.
load_state
(
checkpoint_
path
)
# Extract `epoch_{i}` or `step_{i}`
training_difference
=
os
.
path
.
splitext
(
path
)[
0
]
...
...
examples/pytorch/image-pretraining/run_mim_no_trainer.py
View file @
1d6a8474
...
...
@@ -689,7 +689,7 @@ def main():
path
=
os
.
path
.
basename
(
checkpoint_path
)
accelerator
.
print
(
f
"Resumed from checkpoint:
{
checkpoint_path
}
"
)
accelerator
.
load_state
(
path
)
accelerator
.
load_state
(
checkpoint_
path
)
# Extract `epoch_{i}` or `step_{i}`
training_difference
=
os
.
path
.
splitext
(
path
)[
0
]
...
...
examples/pytorch/language-modeling/run_clm_no_trainer.py
View file @
1d6a8474
...
...
@@ -588,7 +588,7 @@ def main():
path
=
os
.
path
.
basename
(
checkpoint_path
)
accelerator
.
print
(
f
"Resumed from checkpoint:
{
checkpoint_path
}
"
)
accelerator
.
load_state
(
path
)
accelerator
.
load_state
(
checkpoint_
path
)
# Extract `epoch_{i}` or `step_{i}`
training_difference
=
os
.
path
.
splitext
(
path
)[
0
]
...
...
examples/pytorch/language-modeling/run_mlm_no_trainer.py
View file @
1d6a8474
...
...
@@ -625,7 +625,7 @@ def main():
path
=
os
.
path
.
basename
(
checkpoint_path
)
accelerator
.
print
(
f
"Resumed from checkpoint:
{
checkpoint_path
}
"
)
accelerator
.
load_state
(
path
)
accelerator
.
load_state
(
checkpoint_
path
)
# Extract `epoch_{i}` or `step_{i}`
training_difference
=
os
.
path
.
splitext
(
path
)[
0
]
...
...
examples/pytorch/multiple-choice/run_swag_no_trainer.py
View file @
1d6a8474
...
...
@@ -571,7 +571,7 @@ def main():
path
=
os
.
path
.
basename
(
checkpoint_path
)
accelerator
.
print
(
f
"Resumed from checkpoint:
{
checkpoint_path
}
"
)
accelerator
.
load_state
(
path
)
accelerator
.
load_state
(
checkpoint_
path
)
# Extract `epoch_{i}` or `step_{i}`
training_difference
=
os
.
path
.
splitext
(
path
)[
0
]
...
...
examples/pytorch/question-answering/run_qa_beam_search_no_trainer.py
View file @
1d6a8474
...
...
@@ -808,7 +808,7 @@ def main():
path
=
os
.
path
.
basename
(
checkpoint_path
)
accelerator
.
print
(
f
"Resumed from checkpoint:
{
checkpoint_path
}
"
)
accelerator
.
load_state
(
path
)
accelerator
.
load_state
(
checkpoint_
path
)
# Extract `epoch_{i}` or `step_{i}`
training_difference
=
os
.
path
.
splitext
(
path
)[
0
]
...
...
examples/pytorch/question-answering/run_qa_no_trainer.py
View file @
1d6a8474
...
...
@@ -839,7 +839,7 @@ def main():
path
=
os
.
path
.
basename
(
checkpoint_path
)
accelerator
.
print
(
f
"Resumed from checkpoint:
{
checkpoint_path
}
"
)
accelerator
.
load_state
(
path
)
accelerator
.
load_state
(
checkpoint_
path
)
# Extract `epoch_{i}` or `step_{i}`
training_difference
=
os
.
path
.
splitext
(
path
)[
0
]
...
...
examples/pytorch/semantic-segmentation/run_semantic_segmentation_no_trainer.py
View file @
1d6a8474
...
...
@@ -569,7 +569,7 @@ def main():
path
=
os
.
path
.
basename
(
checkpoint_path
)
accelerator
.
print
(
f
"Resumed from checkpoint:
{
checkpoint_path
}
"
)
accelerator
.
load_state
(
path
)
accelerator
.
load_state
(
checkpoint_
path
)
# Extract `epoch_{i}` or `step_{i}`
training_difference
=
os
.
path
.
splitext
(
path
)[
0
]
...
...
examples/pytorch/summarization/run_summarization_no_trainer.py
View file @
1d6a8474
...
...
@@ -640,7 +640,7 @@ def main():
path
=
os
.
path
.
basename
(
checkpoint_path
)
accelerator
.
print
(
f
"Resumed from checkpoint:
{
checkpoint_path
}
"
)
accelerator
.
load_state
(
path
)
accelerator
.
load_state
(
checkpoint_
path
)
# Extract `epoch_{i}` or `step_{i}`
training_difference
=
os
.
path
.
splitext
(
path
)[
0
]
...
...
examples/pytorch/text-classification/run_glue_no_trainer.py
View file @
1d6a8474
...
...
@@ -518,7 +518,7 @@ def main():
path
=
os
.
path
.
basename
(
checkpoint_path
)
accelerator
.
print
(
f
"Resumed from checkpoint:
{
checkpoint_path
}
"
)
accelerator
.
load_state
(
path
)
accelerator
.
load_state
(
checkpoint_
path
)
# Extract `epoch_{i}` or `step_{i}`
training_difference
=
os
.
path
.
splitext
(
path
)[
0
]
...
...
examples/pytorch/token-classification/run_ner_no_trainer.py
View file @
1d6a8474
...
...
@@ -678,7 +678,7 @@ def main():
path
=
os
.
path
.
basename
(
checkpoint_path
)
accelerator
.
print
(
f
"Resumed from checkpoint:
{
checkpoint_path
}
"
)
accelerator
.
load_state
(
path
)
accelerator
.
load_state
(
checkpoint_
path
)
# Extract `epoch_{i}` or `step_{i}`
training_difference
=
os
.
path
.
splitext
(
path
)[
0
]
...
...
examples/pytorch/translation/run_translation_no_trainer.py
View file @
1d6a8474
...
...
@@ -621,7 +621,7 @@ def main():
path
=
os
.
path
.
basename
(
checkpoint_path
)
accelerator
.
print
(
f
"Resumed from checkpoint:
{
checkpoint_path
}
"
)
accelerator
.
load_state
(
path
)
accelerator
.
load_state
(
checkpoint_
path
)
# Extract `epoch_{i}` or `step_{i}`
training_difference
=
os
.
path
.
splitext
(
path
)[
0
]
...
...
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