Integrate `lightning_utilities`
carmocca opened this issue ยท 10 comments
๐ Feature
We have released https://github.com/Lightning-AI/utilities/ which contains multiple utilities that are shared across the codebase.
Motivation
Avoid protected imports
Avoid duplicated code
Pitch
Go through the Flash codebase and see which duplications or protected imports we have
Examples:
There should be DeprecationWarning
s for utilities imported from PL that should start using lightning_utilities
Hi, @carmocca - Thank you! I am up for it, and it's only going to help us stay stable with respect to these utilities.
Is it possible that we can create a list of the sections of code that we can change, and take some help from our awesome community?
The two I pointed out in my previous message are the only ones I could find. These are the ones we currently have in the utilities: https://github.com/Lightning-AI/utilities/tree/main/src/lightning_utilities/core
Should be a very easy PR, up for grabs!
The two I pointed out in my previous message are the only ones I could find. These are the ones we currently have in the utilities: https://github.com/Lightning-AI/utilities/tree/main/src/lightning_utilities/core
Should be a very easy PR, up for grabs!
Thanks! @uakarsh - Maybe you'll like to pick these up? Please let us know ๐
For examples of the PR in lightning: Lightning-AI/pytorch-lightning#14475, and Lightning-AI/pytorch-lightning#14537
Hi @carmocca @krshrimali, this definitely looks interesting. Can you give me some time, to explore about lightning_utility, and the existing codebase? I would surely get back to you.
Hi @carmocca @krshrimali, this definitely looks interesting. Can you give me some time, to explore about lightning_utility, and the existing codebase? I would surely get back to you.
Oh definitely, please take your time and let us know if you need any help! Thank you for your help! โค๏ธ
HI, @krshrimali @carmocca, I would now start working on this task. So, far I have been going through the lightning_utilities
repo, and what I could understand is that the repo's main idea is to centralize the steps involved before starting the code, i.e module availability, the checking the data structures required for different methods, and converting them to some other data structure. Although there were many other steps involved, these were something, I was able to understand.
So, my current plan is to g through the entire codebase of lightning flash
, and replace all the methods that come under lightning_utilities
with them.
Anything, which I missed or should be included while modifying the codebase?
Nothing missed. That's perfect :)
Cool, would be starting today