Add support for Adam(W) and weight decay #1372
Conversation
59d2a85 to
3c4c99e
Compare
3c4c99e to
14d470c
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1372 +/- ##
==========================================
+ Coverage 86.87% 86.91% +0.03%
==========================================
Files 24 24
Lines 3064 3202 +138
==========================================
+ Hits 2662 2783 +121
- Misses 402 419 +17
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Yes, I've meant to do this. I sometimes wonder if there isn't a better kwargs type way of getting at pytorch-lightning, I don't love this pattern where we just wrap all things into the config. But I guess it does meet the style of trying to set reasonable defaults for users? |
bw4sz
left a comment
There was a problem hiding this comment.
I'm approving this and we can discuss the larger pattern at Thursday meeting.
|
Anything that's a trainer arg specifically can probably be a config group e.g. (Ie none of these options would be in the config, you'd pass a dict that gets added onto whatever is passed to the trainer, sort of like a **kwargs) |
Description
Adds support for different optimizers in the config. Shouldn't break anything backwards as this was never exposed in older versions of DeepForest.
Fixes a small bug/footgun in the scheduler config where if you specified something not in the list, it would silently default to ReduceLROnPlateau.
Adam/w is widely used for training transformer-based models, and also supports a weight_decay parameter.
Related Issue(s)
In support of newer models being added to DeepForest.
AI-Assisted Development
AI tools used (if applicable):
Claude