New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement: Please add options for incremental training. (Code2Text) #23
Comments
Do you mean gradient_accumulation_steps? The code has implemented. You can add option --gradient_accumulation_steps n for incremental training |
Alright, thanks much ! |
Change "pretrained_model=microsoft/codebert-base" to "pretrained_model=saved_checkpoint_path" |
Alright. |
One more question, just to be sure. Do i need to use --gradient_accumulation_steps somewhere now ? or just --pretrained_model should be fine Call 1 for first two epochs: Call 2 for training for next two epoch python run.py --do_train --do_eval --model_type roberta --model_name_or_path "saved_checkpoint_path" --train_filename "../dataset/java/valid.jsonl" --dev_filename "../dataset/java/valid.jsonl" --output_dir "model/java" --max_source_length 256 --max_target_length 128 --beam_size 10 --train_batch_size 8 --eval_batch_size 8 --learning_rate 5e-5 --num_train_epochs 2 |
just --pretrained_model is fine |
Thanks |
python run.py --do_train --do_eval --model_type roberta --model_name_or_path "saved_checkpoint_path" --train_filename "../dataset/java/valid.jsonl" --dev_filename "../dataset/java/valid.jsonl" --output_dir "model/java" --max_source_length 256 --max_target_length 128 --beam_size 10 --train_batch_size 8 --eval_batch_size 8 --learning_rate 5e-5 --num_train_epochs 2 |
Sorry, the option should be --load_model_path.
|
Alright, |
Hi, Again I started the training from the trained model for next 2 epochs Training has started again, but in console it says "Epoch 0" again instead of "Epoch 1" Log for first iteration (Epoch 1) Log for second iteration (Epoch 2) 12/03/2020 08:58:29 - INFO - main - ***** Running training ***** |
Since loss has decreased in subsequent epochs, shall I assume that it is actually Epoch 1 and not epoch 0 |
Note that i am training on valid.jsonl just to quickly test the flow |
|
Alrights |
Replace run.py with run.txt. You just need to re-run the following command and the program will restore the last checkpoint for incremental training.
|
Many Thanks for prompt response ! |
Hi
Please add option for incremental training, so that its possible to train on colab or similar platforms.
The text was updated successfully, but these errors were encountered: