-
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
Simplify backbone_image_classifier example #7246
Simplify backbone_image_classifier example #7246
Conversation
… untyped parameters be type Any
Codecov Report
@@ Coverage Diff @@
## master #7246 +/- ##
=======================================
- Coverage 91% 87% -4%
=======================================
Files 199 199
Lines 12799 12799
=======================================
- Hits 11701 11147 -554
- Misses 1098 1652 +554 |
@carmocca this change is according to our discussion in slack. |
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.
LGTM !
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.
this means that in the current backbone_image_classifier example the argument model.backbone will be added twice causing a failure.
Why is this the case?
edit: nvm, realized it's due to
def add_arguments_to_parser(self, parser):
parser.add_class_arguments(Backbone, 'model.backbone')
What does this PR do?
In a slack discussion about LightningCLI it was suggested that untyped parameters should be added to the parser as type Any instead of being silently skipped. With the latest version of jsonargparse this is the behavior, however, this means that in the current backbone_image_classifier example the argument
model.backbone
will be added twice causing a failure. There is a temporal patch in jsonargparse so that this example does not fail, but this will be removed in the next version. The backbone_image_classifier has to change due to this, but also it can be made simpler as proposed here.Before submitting
PR review
Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:
Did you have fun?
Make sure you had fun coding 🙃