-
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
[RFC] Remove log_text
and log_image
from LightningLoggerBase
API
#11837
Comments
The Trainer explicitly calls This means it's required to be on the logger API In general, this issue (and any deprecation) should have much more context as to:
|
@ananthsub I noticed this as well, but for most loggers this is a no-op because Other than passing or checking for the attribute what else could we do if a logger doesn't support |
log_graph
, log_text
, and log_image
from LightningLoggerBase
APIlog_text
and log_image
from LightningLoggerBase
API
Updated the issue to not include |
Based on #9545, I agree with the motivations:
|
Yeah, good points, especially about |
Proposed refactor
Remove these methods from the
LightningLoggerBase
API:https://github.com/PyTorchLightning/pytorch-lightning/blob/8d23f6287adf1e1040948802e6649c4ae2b3eda1/pytorch_lightning/loggers/base.py#L193-L205
Motivation
log_text
andlog_image
are both only overridden on 2 loggers:WandbLogger
andNeptuneLogger
.For the rest of the loggers, since these methods are on the Base API it seems to imply that you can call them, but if you do for most loggers you will get a
NotImplementedError
. This is not a good user experience and it would be better to just keep these methods specific toWandbLogger
andNeptuneLogger
so it is clear that they can only be called for those loggers.Similar motivation to #11234
From #11234: "A good rule of thumb is that the only required interfaces for the Logger are what the Trainer directly calls. Everything else can be pushed to various implementations". Since the trainer does not call
log_text
orlog_image
these do not need to be required on the Logger API.Additional Context
These were added in #9545
cc @justusschock @awaelchli @rohitgr7 @tchaton @Borda @edward-io @ananthsub @kamil-kaczmarek @Raalsky @Blaizzy @akihironitta
The text was updated successfully, but these errors were encountered: