Improve typing coverage (4/n)
See original GitHub issue🚀 Typing coverage
Let’s improve typing coverage of PyTorch Lightning together!
I’m creating a new issue in order to increase visibility. There are three older issues (#7037, #5023, #4698) which became stale over time.
Plan
Currently, there are 55 files which are excluded from mypy checks so that our CI does not fail. These files vastly differ in difficulty in order to make the typing complete. For this reason, we are introducing difficulty estimate for each file so that community members can choose to work on the files appropriate to their skill level.
Please, comment on this issue in order to reserve a particular file to work on. Once you do so, I will edit this top comment to avoid collisions. Once you think your work is finished, please open a PR referencing this issue which:
- removes the corresponding line from
pyproject.toml
- and passes
mypy
checks with the corresponding line removed. You can test it locally by runningmypy
from root directory
If you are struggling with pushing it over the finish line, open the PR anyway and someone from our team will help you to get it there. 🚀
Please note, that it can happen that you may need to edit more than just one file. This is fine, but please keep in mind, that the goal of your PR will be to make the check passing for the chosen file. Also, please note that the difficulty is just an educated guess.
For those of you who are not familiar with the process of contributing a PR, we have prepared a simple guide that will walk you through the necessary steps. You can do it! 🚀 💪
List of files and guesstimated difficulty
Completed
Difficulty 1 of 3
-
pytorch_lightning/core/decorators.py
#14044 -
pytorch_lightning/profilers/advanced.py
@nninept #13792 ~- [ ]pytorch_lightning/profilers/base.py
@LeeChanHyuk #13879~ -
pytorch_lightning/loggers/base.py
@JustinGoheen #13494 -
pytorch_lightning/__setup__.py
@CyprienRicque #13472 ~- [ ]pytorch_lightning/distributed/dist.py
@puhuk #13492~ -
pytorch_lightning/strategies/single_device.py
@CyprienRicque #13532 -
pytorch_lightning/trainer/optimizers.py
@gautierdag #13470 -
pytorch_lightning/utilities/distributed.py
@krishnakalyan3 #13678 -
pytorch_lightning/callbacks/finetuning.py
@ar90n #13516 -
pytorch_lightning/loggers/mlflow.py
@JustinGoheen#13690#13691 -
pytorch_lightning/tuner/tuning.py
@donlapark#13616#13631 -
pytorch_lightning/strategies/single_tpu.py
@CyprienRicque #13534 -
pytorch_lightning/strategies/ddp2.py
@CyprienRicque #13535 -
pytorch_lightning/strategies/parallel.py
@CyprienRicque #13556 -
pytorch_lightning/loggers/csv_logs.py
@JustinGoheen #13538 -
pytorch_lightning/tuner/lr_finder.py
@donlapark #13513 #13652 -
pytorch_lightning/strategies/dp.py
@CyprienRicque #13564 -
pytorch_lightning/profilers/simple.py
@krishnakalyan3 #14103 -
pytorch_lightning/strategies/sharded_spawn.py
@krishnakalyan3 #14102 -
pytorch_lightning/demos/mnist_datamodule.py
@alro923 #13929 -
pytorch_lightning/demos/boring_classes.py
@krishnakalyan3 #14201 -
pytorch_lightning/tuner/batch_size_scaling.py
@ar90n #13518
Difficulty 2 of 3
-
pytorch_lightning/loops/epoch/training_epoch_loop.py
@himkt #13555 -
pytorch_lightning/core/mixins/device_dtype_mixin.py
@krishnakalyan3 #13704 -
pytorch_lightning/loggers/comet.py
@JustinGoheen #13689 -
pytorch_lightning/loggers/tensorboard.py
@JustinGoheen #13688 -
pytorch_lightning/strategies/horovod.py
@CyprienRicque #13570 -
pytorch_lightning/callbacks/model_checkpoint.py
@BongYang #13617 -
pytorch_lightning/strategies/fully_sharded.py
@BongYang #13941 -
pytorch_lightning/loggers/neptune.py
@JustinGoheen #13692 -
pytorch_lightning/utilities/meta.py
@nninept #13763 #13868 -
pytorch_lightning/strategies/tpu_spawn.py
@BongYang #13813 -
pytorch_lightning/loggers/logger.py
@JustinGoheen #13541 -
pytorch_lightning/loggers/wandb.py
@gautierdag #13483 -
pytorch_lightning/callbacks/stochastic_weight_avg.py
@donlapark #13685 #13860 -
pytorch_lightning/strategies/strategy.py
@CyprienRicque #13519 -
pytorch_lightning/strategies/deepspeed.py
@donlapark #13832 -
pytorch_lightning/strategies/ddp_spawn.py
@donlapark #13865 -
pytorch_lightning/strategies/ipu.py
@HalestormAI #13786 -
pytorch_lightning/trainer/connectors/callback_connector.py
@krishnakalyan3 #13750 -
pytorch_lightning/strategies/ddp.py
@lijm1358 #13885 -
pytorch_lightning/core/saving.py
@JustinGoheen #13932 -
pytorch_lightning/callbacks/quantization.py
@krishnakalyan3 #13782 -
pytorch_lightning/strategies/sharded.py
@lijm1358 #14184 -
pytorch_lightning/core/datamodule.py
@JustinGoheen #13693
Difficulty 3 of 3
~- [ ] pytorch_lightning/trainer/callback_hook.py
@JustinGoheen #13807 ~
-
pytorch_lightning/core/module.py
@JustinGoheen #13603 -
pytorch_lightning/trainer/connectors/data_connector.py
@JustinGoheen #13806 -
pytorch_lightning/utilities/auto_restart.py
@donlapark #13904 -
pytorch_lightning/trainer/supporters.py
@donlapark #14633 -
pytorch_lightning/profilers/pytorch.py
@krishnakalyan3 #14405 -
pytorch_lightning/utilities/data.py
@nandwalritik #13901 -
pytorch_lightning/trainer/trainer.py
~@JustinGoheen #13810~ @BongYang #14204 -
pytorch_lightning/callbacks/progress/rich_progress.py
@donlapark #14963
cc @borda @justusschock @awaelchli @rohitgr7 @Borda @tchaton @aniketmaurya @kingjuno @alat-rights @carmocca @akihironitta @stancld as you were all involved in previous issues
Issue Analytics
- State:
- Created a year ago
- Reactions:33
- Comments:105 (97 by maintainers)
🎉 We did it! 🎉 We just closed last PR resolving typing in PyTorch portion of Lightning 🎉 Thanks to everyone, who contributed, namely @carmocca @nninept @JustinGoheen @CyprienRicque @gautierdag @krishnakalyan3 @ar90n @donlapark @alro923 @himkt @BongYang @HalestormAI @lijm1358 @nandwalritik 🎉
Small milestone reached: We completed all files under the loggers module. Thanks for the help everyone. 🚀