Lightning-AI / Lightning-AI/pytorch-lightning
How do I continue to train the model but for different tasks?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 31.4k
- Forks
- 3.8k
- Avg merge
- 6d 7h
- Merged PRs (30d)
- 6
Description
### Bug description
I have obtained a model named last.ckpt by using lightning training. I want to continue training this model. The structure of the model remains unchanged, but the training task has changed, so the hyperparameters have also changed. But when I tried to use resume_from_checkpoint in Trainer, it reported an error and asked me that the hyperparameters for both training tasks needed to be the same.
I want to know how I can apply the trained model to training for other tasks.
### What version are you seeing the problem on?
v1.6
### How to reproduce the bug
_No response_
### Error messages and logs
_No response_
### Environment
Current environment
```
#- Lightning Component (e.g. Trainer, LightningModule, LightningApp, LightningWork, LightningFlow):
#- PyTorch Lightning Version (e.g., 1.5.0):
#- Lightning App Version (e.g., 0.5.2):
#- PyTorch Version (e.g., 2.0):
#- Python version (e.g., 3.9):
#- OS (e.g., Linux):
#- CUDA/cuDNN version:
#- GPU models and configuration:
#- How you installed Lightning(`conda`, `pip`, source):
#- Running environment of LightningApp (e.g. local, cloud):
```
### More info
_No response_
cc @justusschock @awaelchli
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the v1.6 Trainer documentation for resume_from_checkpoint and the checkpoint-loading API, using last.ckpt as the example. Determine whether the intended workflow is resuming training or loading model weights for a new task, and verify how changed hyperparameters are handled. Done means confirming or documenting the supported procedure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100