question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

LR finder broken

See original GitHub issue

#614 🐛 Bug

To Reproduce

Steps to reproduce the behavior:

model = TestModel()
trainer = pl.Trainer(gpus=1, default_save_path=exp_path, max_epochs=100)   

def configure_optimizers(self):
        optim = torch.optim.Adam(self.parameters(), lr=self.lr)
        sched = torch.optim.lr_scheduler.ReduceLROnPlateau(optim, 'min')
        return [optim], [sched]
# Run learning rate finder
lr_finder = trainer.lr_find(model)
# Results can be found in
lr_finder.results
# Plot with
fig = lr_finder.plot(suggest=True)
fig.show()

The following returns consistently:

 optimizer got an empty parameter list

The regular .fit method works as expected.

PL version: ‘0.7.6’

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
feribgcommented, Jun 16, 2020

@Molaire Don’t use prepare_data and instead call fit and lr_find with a dataloader parameter that you’ve processed and initialized outside of the model (I actually like to put a static method in the model for it just to keep it tidy).

0reactions
feribgcommented, Sep 19, 2020

Yep, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

LR finder broken 2: not sure why (and other tiny bugs) #2814
Bug LR finder doesn't seem to work. The model doesn't train when trainer.lr_find(model) is running (the loss metric oscillates around its ...
Read more >
Broken pipe error after calling lr finder - fast.ai Course Forums
Broken pipe error after calling lr finder ... Unfortunately, I am getting an error BrokenPipeError: [Errno 32] Broken pipe after calling.
Read more >
Developers - LR finder broken - - Bountysource
#614 Bug. To Reproduce. Steps to reproduce the behavior: model = TestModel() trainer = pl.Trainer(gpus=1, default_save_path=exp_path, max_epochs=100) def ...
Read more >
Have I implemented implemenation of learning rate finder ...
1 Answer 1 · You are using Adam, which scales the learning rate adaptively for each parameter in the network. · A well...
Read more >
Basic troubleshooting steps to fix issues in Lightroom Classic
If none of the troubleshooting steps above solve your problem, ... To do so, press Option and choose Go > Library in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found