Should I do 'accelerator.prepare()' again after 'accelerator.unwrap_model()' ?
For multi-gpu training:
model = accelerator.prepare(model)
I want to save ckpt during training. Then I do this:
model = accelerator.unwrap_model(model)
pipeline = Pipeline(model=model)
pipeline.save_pretrained(...)
And I want to continue training. Should I do model = accelerator.prepare(model) again after saving?
cc @patil-suraj @pcuenca
@DtYXs checkpointing is now added to all scripts, for example, #1668.
And to answer your question, you should not assign unwrapped model to model; instead, we could directly pass accelerator.unwrap_model(model) to pipeline or use a different variable name.
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.