-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
prune Tune arguments from Trainer init - LearnRate & BatchSize as callback #9103
Comments
I see 3 options:
the last one is the most extreme, but i wanted to mention for completeness. between the first two, i prefer the second one. there's a similar conversation here: #9006 |
Additional option: |
I like this one and it may be the cleanest way as we don't add any other logic pattern/layer |
@SkafteNicki @Borda - as a callback, this can be pretty invasive in setting data inside of the trainer. Is that a precedent we should be setting? In what callback hooks would these run? https://github.com/PyTorchLightning/pytorch-lightning/blob/69f66fd6bb361a7932a82291e4ef001f4f381f99/pytorch_lightning/tuner/batch_size_scaling.py#L115-L125 |
I assume that all would run in the before fit hook... |
IMO, I trust each entrypoint to the trainer to be independent as it makes sure features are fully encapsultated and reduce risks from bugs.
I think this is fine for tune which is pretty particular, but It don't think we should do this for other functions. Best, |
I am also fine with moving the arguments to the tune method. |
I model practical use-case is combination with FineTune which would unfreeze backbone on 10th epoch
this gives more freedom to combine these methods during the training cycle |
🚀 Feature
Move the
auto_scale_batch_size
andauto_lr_find
to the.tune
methodMotivation
it is quite confusing setting some auto finds which needs to be called anyway with
.tune()
which uses another set of arguments.Pitch
As a naive user, I would expect that the tuning is executed at the begging of
.fit()
Alternatives
Also in such cases, the user is not much under control in which order they are called, for example, my use case is:
ad this moment I would need to create two Traner instances :(
I am also experiencing some OOM memory failer when I run Batch size and LR, have not the concrete case for debugging yet
Additional context
The only justification would be usage with Lightning CLI
The text was updated successfully, but these errors were encountered: