Coder Social home page Coder Social logo

How to resume downstream training about s3prl HOT 8 CLOSED

s3prl avatar s3prl commented on June 26, 2024
How to resume downstream training

from s3prl.

Comments (8)

andi611 avatar andi611 commented on June 26, 2024

Hi, the --ckpt is for loading the pre-trained model and not downstream ckpt.
However, I've added the function you need in this update: 91be1dc

Now you can use the following command to resume downstream training:
python run_downstream.py --resume=./result/result_transformer_cpc_phone/exp_632/states-70000.ckpt

from s3prl.

liu-x-p avatar liu-x-p commented on June 26, 2024

@andi611 Thank you for reply! I will update the code and try that.

from s3prl.

joram5 avatar joram5 commented on June 26, 2024

Hi Andy,

I refreshed my code to get the --resume option. I am getting the following fail.

I am running:

python run_downstream.py --resume=./result/result_transformer_cpc_phone/exp_632/states-8000.ckpt

I get the following fail:

[run_downstream] - getting upstream model: transformer
[Transformer] - Pre-trained weights loaded!
[Transformer] - Number of parameters: 85087488
Traceback (most recent call last):
File "run_downstream.py", line 248, in
main()
File "run_downstream.py", line 231, in main
train_loader, dev_loader, test_loader = get_all_dataloaders(args, config['dataloader'])
KeyError: 'dataloader'

What can be the problem?

Regards
Joram

from s3prl.

andi611 avatar andi611 commented on June 26, 2024

Hi Andy,

I refreshed my code to get the --resume option. I am getting the following fail.

I am running:

python run_downstream.py --resume=./result/result_transformer_cpc_phone/exp_632/states-8000.ckpt

I get the following fail:

[run_downstream] - getting upstream model: transformer
[Transformer] - Pre-trained weights loaded!
[Transformer] - Number of parameters: 85087488
Traceback (most recent call last):
File "run_downstream.py", line 248, in
main()
File "run_downstream.py", line 231, in main
train_loader, dev_loader, test_loader = get_all_dataloaders(args, config['dataloader'])
KeyError: 'dataloader'

What can be the problem?

Hi,

I found that this error is caused by a bug in our code.
For your current situation,
please change this line to the following:

config = yaml.load(open('/result/result_transformer_cpc_phone/exp_632/downstream.yaml', 'r'), Loader=yaml.FullLoader)

I've updated a permanent fix to this bug in this commit, you can refresh your code once again after you get your current ckpt resumed with the previous temporary fix.
The permanent fix will allow future ckpts to run without error with --resume.

I hope this helps,
Andy

from s3prl.

joram5 avatar joram5 commented on June 26, 2024

from s3prl.

joram5 avatar joram5 commented on June 26, 2024

from s3prl.

andi611 avatar andi611 commented on June 26, 2024

Hi,

Since I never used the --resume function, so my experience on this subject is limited.
However, my co-worker tells me that the "drop" (a vertical line?) you see may be caused by a mismatch in the time step for the Tensorboard log. Hence this is an error in the display of the training log, and it does not really affect the model's performance.
We've updated this line, I think it will resolve this mismatched timestep issue.

For your second question, although I am having trouble seeing the image you've provided, but I believe the convergence rate is reasonable. I've run this task many times (without the use of --resume), the results are pretty stable.

Phone classification over 100 hrs of training data should take a while for the model to converge (on training set). However, the performance on the test set is already very high even after the first 10000 steps of training.

from s3prl.

joram5 avatar joram5 commented on June 26, 2024

from s3prl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.