question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New run_language_modeling.py continuing trainng

See original GitHub issue

I tried using new script for Language Modeling to train model from scratch.

I was training model with old script. When I tried continuing using new one, there is no option for --should_continue.

Does --overwrite_output_dir makes it train from scratch if i use same directory for --model_name_or_path and --output_dir?

So, I am continuing training with old script.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
julien-ccommented, Apr 24, 2020

Yes you would use --overwrite_output_dir (it was implicitly added before)

You would do:

--model_name_or_path ./model_name/checkpoint-9000
--output_dir ./model_name
--overwrite_output_dir

If this is a frequent request we could add it back but I feel like it was more confusing than anything.

0reactions
marscodcommented, Sep 13, 2020

I am using TrainingArguments but couldn’t continue training from last checkpoint. It is starting from step 0. Any suggestion?

training_args = TrainingArguments(
    output_dir=last_checkpoint,
    overwrite_output_dir=True,
...
)
 trainer = Trainer( model=model, #roberta config model
           args=training_args,
...
)

e.g., last_checkpoint="/saved_model/checkpoint-20000/" @julien-c

Read more comments on GitHub >

github_iconTop Results From Across the Web

Examples — transformers 2.5.0 documentation - Hugging Face
Language model training¶. Based on the script run_language_modeling.py . Fine-tuning (or training from scratch) the library models for language modeling ...
Read more >
transformers/run_language_modeling.py at main - GitHub
Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX. - transformers/run_language_modeling.py at main · huggingface/transformers.
Read more >
Pretraining and Fine-Tuning Strategies for Sentiment Analysis ...
Abstract. In this paper, we present various pre-training strategies that aid in im- proving the accuracy of the sentiment classification ...
Read more >
Continue fine-tuning from saved checkpoints for ...
During the process of training, there are checkpoints generated under the ... recent call last): File "run_language_modeling.py", line 277, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found