-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Description
Description & Motivation
Copied from ar.ipynb tutorial of pytorch-forecasting.
# find optimal learning rate
from lightning.pytorch.tuner import Tuner
res = Tuner(trainer).lr_find(
net, train_dataloaders=train_dataloader, val_dataloaders=val_dataloader, min_lr=1e-5
)
print(f"suggested learning rate: {res.suggestion()}")
fig = res.plot(show=True, suggest=True)
fig.show()
net.hparams.learning_rate = res.suggestion()Here the trainer is fitted inside lr_find.
And because it doesn't have weights_only param, it is failing.
we pass weights_only param in trainer.fit. Is there any way to pass this param here in lr_find?
Another Doubt
I also have one more doubt (not exactly related to ptf but out of curiosity), why the default value of weights_only param is kept as None and not True like in torch.load(see torch.load doc here) ? Is this intentional as it may break some code downstream?
See the default values of weights_only param in trainer.fit here and load_from_checkpoint param here
Thanks a lot for this amazing package! I am really a fan of your work. I would really appreciate you helping us with this!
Pitch
No response
Alternatives
No response
Additional context
No response
cc @lantiga