-
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
Clean-up after logger connector redesign 1/2 #7909
Clean-up after logger connector redesign 1/2 #7909
Conversation
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.
Amazing work @carmocca !
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 an n00bQ, as all these were publically exposed API, shall we do a deprecation cycle?
It's too late to ask that since all this code is currently unused in master. And even if we wanted to, I'm calling this a redesign instead of a refactor because it has changed almost entirely. If we wanted to fully deprecate everything it would have taken ages. Note that all the important user-facing attributes have been kept, namely the access to In any case, if you have concerns about specific pieces of the changes, we can discuss it and see if we can keep BC for them. |
I do not think we would need deprecate all (parallel to past accelerators), just think if some of these classes could be used by user independently and ten deprecate them... no need for purely internal use...
that was my goal, if there are some places that could be used by the user specifically outside PL loop |
Result.attach_batch_size(batch_size, self) | ||
|
||
@staticmethod | ||
def extract_batch_size(batch): |
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 have a few downstream projects which take a dependency on this utility function.
In the short-term, we're replicating the logic within those projects. Is this the right long-term approach? Or are there plans to maintain and expose these utility functions? The new ResultCollection
has a similar function (https://github.com/PyTorchLightning/pytorch-lightning/pull/7882/files#diff-bf4a466b765dd5c4128aca411d2999df7d8b6283723ea721be94713dac190112R444), but this is not static and requires a Result
instance.
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.
I'd say it's better for you to replicate the function since it wasn't originally meant to be used for users.
But it's completely fair that we keep BC for it since it wasn't previously protected.
Do you want to open a PR so it becomes static again? Could also include some unit tests for it.
What does this PR do?
Smile and wave, boys 👋
Before submitting
PR review