ParlAI icon indicating copy to clipboard operation
ParlAI copied to clipboard

Now multiple checkpoints will be saved after using -stopk option in train_model.py

Open hamjam opened this issue 1 year ago • 5 comments

Patch description

In this PR, the train_model.py script has the option to keep and store multiple checkpoints based on validation metrics. Some checkpoints that have best validation metrics during training will be kept in the directory specified by --model-file. Resolves #4970

Testing steps

To test this PR, you can run something like parlai train_model --task babi:task10k:1 --model seq2seq --model-file seq2seq/babi_task10k --batchsize 32 --validation-every-n-secs 30 -stopk 5 -vstep 50 Note that -vstep option must be exist to save and store 5 top checkpoints in this example. For me, the list of files in the -model-file directory after 1350 steps of training is like this: 2023-03-10_16h39_48

hamjam avatar Mar 10 '23 13:03 hamjam

Hi @hamjam!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

facebook-github-bot avatar Mar 10 '23 13:03 facebook-github-bot

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

facebook-github-bot avatar Mar 10 '23 14:03 facebook-github-bot

This PR has not had activity in 30 days. Closing due to staleness.

github-actions[bot] avatar May 19 '23 00:05 github-actions[bot]

@jxmsML any interest in taking over this PR?

klshuster avatar Jun 05 '23 19:06 klshuster

Hi Kurt, Sorry for the late reply. I was very busy lately and I forgot to check my GitHub notifications recently. I can design tests as you mentioned in 2 weeks if there is no one interested.

On Mon, Jun 5, 2023 at 10:32 PM Kurt Shuster @.***> wrote:

@jxmsML https://github.com/jxmsML any interest in taking over this PR?

— Reply to this email directly, view it on GitHub https://github.com/facebookresearch/ParlAI/pull/4978#issuecomment-1577313816, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADAJPOGUBJVRJVULJZYGWM3XJYULXANCNFSM6AAAAAAVWOHFD4 . You are receiving this because you were mentioned.Message ID: @.***>

hamjam avatar Jun 05 '23 20:06 hamjam