-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
provide an option to ignore not exists attribute when apply_*_links #129
Comments
…ameter #129. - Swapped order of argument links in help to source --> target.
This has been implemented in commit 60420ce. There is no option to disable this behavior. Always for subclasses if the source or target does not have the parameter, the linking is skipped without error. If logging is enabled at debug level, a message is shown when this happens. |
@mauvilsa Hi, I'm facing new error when update to 4.5.0. Have not looked at why, it would be much appreciated if you could take a look at it. Here is my sample from pytorch_lightning.utilities.cli import LightningCLI
class LitCLI(LightningCLI):
def add_arguments_to_parser(self, parser):
parser.link_arguments(
"data.init_args.batch_size",
"model.init_args.batch_size",
apply_on="instantiate",
)
cli = LitCLI() If I run
and
when apply_on="instantiate" and "parse" respectively. |
If you debug that script, break inside you
I was not the one who extended |
Thank you very much for investigating! I will check the documentation and determine if feedback is needed. |
I'm using one pytorchlightning cli for multiple data and models, which are not always have the same attribute. I suggest to provide an option to ignore not exists attribute when
apply_*_links
.In other words, I hope to be able to have an option to no raise error in
apply_instantiation_links
ifsource_object
doesn't have theattr
The text was updated successfully, but these errors were encountered: