-
Notifications
You must be signed in to change notification settings - Fork 32
✨ Docker settings, BatchEnsemble utilities rework + minor fixes #141
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
Conversation
Co-authored-by: Anton <anton.zamyatin@student.tuwien.ac.at>
🐛 Fix MNIST test dataloader for shifted data Also fast-tracked another PR from @tonyzamyatin that got lost with the documentation due to a scheduling mistake.
- now the input is repeated during training depending on `repeat_training_inputs` argument - with `convert_layers==True` all `nn.Linear` and `nn.Conv2d` layers are replaced by `BatchLinear` and `BatchConv2d`
✨ LeNet BatchEnsemble and Deep Ensemble + minor bugfixes
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #141 +/- ##
==========================================
+ Coverage 99.15% 99.19% +0.03%
==========================================
Files 143 144 +1
Lines 7136 7192 +56
Branches 910 925 +15
==========================================
+ Hits 7076 7134 +58
+ Misses 27 26 -1
+ Partials 33 32 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few comments: we should be able to merge soon!
Thanks for your work!
|
||
|
||
class BatchEnsemble(nn.Module): | ||
"""Wrap a BatchEnsemble model to ensure correct batch replication. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We decided to put all class docstrings below the __init__
for now, hence we should move it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, I just thought it would be cool to be able to view the docstring with your editor's "inline quick documentation" keyboard shortcut :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally (unless mistaken), we should have docstrings split into two parts for all classes, but this would need a lot of time. If we don't do this, I tend to prefer having the arguments available when I instantiate a class so that I know what they mean instead of having them when hovering over the class itself. It would work like this, at least on VSCode; I don't know about PyCharm, which you seem to be using?
Co-authored-by: o-laurent <olivier.laurent@ensta-paris.fr>
raise ValueError("`num_estimators` must be greater than 0.") | ||
|
||
|
||
def batch_ensemble( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to have this function and the class since they have exactly the same arguments?
The scope of this comment is actually larger because we have this kind of structure in many different files, even though we sometimes discourage using the classes by putting underscores.
🥳👏 |
Also:
Wand
bykornia
Fixes #136
Fixes #138