Closed WayerLiu closed 2 years ago
Hey there,
The training is done very fast, so I actually didn't bother to implement the checkpoint resuming feature. Does the training take too much time for you?
Oh I see. I am trying to use the model on attacked MELD and IEMOCAP val and test set, so resuming from checkpoint would help.
What do you mean by "attacked"?
I used methods in textual adversarial attack to create adversarial samples from MELD and IEMOCAP datastes, so that I test how ERC models perform when facing attacks. Since many attack methods are used, I would like to resume models from checkpoint instead of training a same model every time.
Can you pull the main
branch? it should work now.
Thank you a lot for your work! It works perfect for me.
Oh, I noticed that it is still necessary to manually change the OUTPUT_DIR in train-erc-text.py into the path of model checkpoint for the checkpoint function now, maybe a little modify here can make this function easier to use.
You don't have to change the OUTPUT_DIR
. This directory is for your newly trained model. For example, if you specify model_checkpoint: results/MELD_IEMOCAP/roberta-base/SEEDS/2022-04-05-16-20-06-speaker_mode-None-num_past_utterances-0-num_future_utterances-0-batch_size-16-seed-42/checkpoint-8267
in train-erc-text.yaml
, it'll load the checkpoint from it and then start training, but the newly trained model will be saved in OUTPUT_DIR
.
You don't have to change the
OUTPUT_DIR
. This directory is for your newly trained model. For example, if you specifymodel_checkpoint: results/MELD_IEMOCAP/roberta-base/SEEDS/2022-04-05-16-20-06-speaker_mode-None-num_past_utterances-0-num_future_utterances-0-batch_size-16-seed-42/checkpoint-8267
intrain-erc-text.yaml
, it'll load the checkpoint from it and then start training, but the newly trained model will be saved inOUTPUT_DIR
.
Oh I see! Thank your for your explanation :)
Hi there, I was trying to resume my model from the local checkpoint, but I couldn't find any proper place to assign the path of my checkpoint in train-erc-text.yaml. Can you help me out here?