auto_lr_find
does not work if there is a BackboneFinetuning callback
#14674
Labels
auto_lr_find
does not work if there is a BackboneFinetuning callback
#14674
🐛 Bug
auto_lr_find
does not properly restore the model for training if there is aBackboneFinetuning
callback.To Reproduce
Specify a BackboneFinetuning callback, set auto_lr_find to True, and then run
tune
andfit
.which will yield the following error
See notebook example: https://colab.research.google.com/drive/1ajrSRge90RM8Rlcwk0HyEosLLpOpyvg-
Expected behavior
It should be the case that after
auto_lr_find
runs, the model is reset and the found learning rate is used.Environment
See bottom cell of colab notebook.
Additional context
I think the culprit is that
on_fit_start
onBackboneFinetuning
now calls theon_fit_start
method ofBaseFinetuning
, which then thinks the model is being restarted from a checkpoint.It looks like the bug got introduced in this PR: 07635d0#diff-ac96be7ba54bac4d7dc79ee012a211498fb97689e37026fe8a1b06a359079224R410
The fix will need to both support the finetuning callbacks when training is resumed as well as as support using auto lr find when there is a backbone finetuning callback on the model.
cc @akihironitta @Borda @rohitgr7
The text was updated successfully, but these errors were encountered: