Registering logger/trainer inside nested PL models #13144
Unanswered
CompRhys
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 1 comment
-
Hi @CompRhys! #13638 might be relevant to your use case. It enables
Please mind that the change is currently available only in master but will be available in the next minor release v1.7. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
You are trying to 'self.log()' but the 'self.trainer' reference is not registered on the model yet. This is most likely because the model hasn't been passed to the 'Trainer'
I have a PL module that I am now incorporating inside another PL module as part of a more complicated setup. Inside the sub module there are still various things that I would like to log but as it's not being trained directly instead via a trainer on the overall module the self.trainer is not set. Is it okay to just pass self.trainer of the overall model as an additional kwarg to the sub model or could this have unforeseen consequences?
Beta Was this translation helpful? Give feedback.
All reactions