Skip to content

LR finder returns None #10557

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Borda opened this issue Nov 16, 2021 · 7 comments
Closed

LR finder returns None #10557

Borda opened this issue Nov 16, 2021 · 7 comments
Labels
bug Something isn't working tuner won't fix This will not be worked on

Comments

@Borda
Copy link
Member

Borda commented Nov 16, 2021

🐛 Bug: LR finder returns None

Could be come model or LR finder range which yield in returning LR as None which crashes the consecutive

To Reproduce

https://www.kaggle.com/jirkaborovec/titanic-crash-with-lightning-flash

from pytorch_lightning.loggers import CSVLogger
from pytorch_lightning.callbacks import StochasticWeightAveraging
from pytorch_lightning import seed_everything

seed_everything(7)
swa = StochasticWeightAveraging(swa_epoch_start=0.6)
logger = CSVLogger(save_dir='logs/')
trainer = flash.Trainer(
    max_epochs=150,
    gpus=torch.cuda.device_count(),
    logger=logger,
    accumulate_grad_batches=12,
    gradient_clip_val=0.01,
    auto_lr_find=True,
)

# ==============================

trainer.tune(model, datamodule=datamodule, lr_find_kwargs=dict(min_lr=1e-4, max_lr=0.1, num_training=65),)
print(f"Learning Rate: {model.learning_rate}")

# ==============================

trainer.fit(model, datamodule=datamodule)

Expected behavior

I see several options:

  • raise an error on the LR finder tune so it does not interfere with consecutive fit
  • raise just warning and continue with the model's initial LR value
  • find why the LR is failing

Additional context

include in Tune redesign #9103

cc @akihironitta @Borda @rohitgr7

@Borda Borda added the bug Something isn't working label Nov 16, 2021
@stale
Copy link

stale bot commented Dec 17, 2021

This issue has been automatically marked as stale because it hasn't had any recent activity. This issue will be closed in 7 days if no further activity occurs. Thank you for your contributions, Pytorch Lightning Team!

@stale stale bot added the won't fix This will not be worked on label Dec 17, 2021
@rohitgr7 rohitgr7 removed the won't fix This will not be worked on label Dec 20, 2021
@rohitgr7
Copy link
Contributor

not stale

@stale
Copy link

stale bot commented Jan 21, 2022

This issue has been automatically marked as stale because it hasn't had any recent activity. This issue will be closed in 7 days if no further activity occurs. Thank you for your contributions, Pytorch Lightning Team!

@stale stale bot added the won't fix This will not be worked on label Jan 21, 2022
@tchaton
Copy link
Contributor

tchaton commented Jan 21, 2022

not stale.

@stale stale bot removed the won't fix This will not be worked on label Jan 21, 2022
@stale
Copy link

stale bot commented Mar 15, 2022

This issue has been automatically marked as stale because it hasn't had any recent activity. This issue will be closed in 7 days if no further activity occurs. Thank you for your contributions, Pytorch Lightning Team!

@stale stale bot added the won't fix This will not be worked on label Mar 15, 2022
@akihironitta akihironitta removed the won't fix This will not be worked on label Mar 16, 2022
@stale stale bot added the won't fix This will not be worked on label Apr 16, 2022
@Lightning-AI Lightning-AI deleted a comment from stale bot Apr 16, 2022
@stale stale bot removed the won't fix This will not be worked on label Apr 16, 2022
@asicoderOfficial
Copy link

It still persists :(

@stale
Copy link

stale bot commented Jun 6, 2022

This issue has been automatically marked as stale because it hasn't had any recent activity. This issue will be closed in 7 days if no further activity occurs. Thank you for your contributions, Pytorch Lightning Team!

@stale stale bot added the won't fix This will not be worked on label Jun 6, 2022
@stale stale bot closed this as completed Jun 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tuner won't fix This will not be worked on
Projects
None yet
Development

No branches or pull requests

5 participants