You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.
Update packages and/or InnerEye code, so as not to have lightning deprecation warnings.
Motivation
When running the InnerEye code (commit b42043f), the following deprecation warnings are issued:
pytorch_lightning/callbacks/model_checkpoint.py:244: LightningDeprecationWarning: `ModelCheckpoint(every_n_val_epochs)` is deprecated in v1.4 and will be removed in v1.6. Please use `every_n_epochs` instead.
pytorch_lightning/core/lightning.py:399: LightningDeprecationWarning: `self.log(sync_dist_op='mean')` is deprecated and will be removed in v.1.6. Use `self.log(reduce_fx=mean)` instead.
pytorch_lightning/loggers/base.py:337: LightningDeprecationWarning: `LightningLoggerBase.close` method is deprecated in v1.5 and will be removed in v1.7. Please use `LightningLoggerBase.finalize` instead.
Pitch
It would be nice if packages and/or code could be updated so as to avoid the deprecation warnings - and to be future ready :)
Alternatives
There's probably a way of switching off the warnings, but addressing them would be better than hiding them.
Additional context
The deprecation warnings can be obtained by running the HelloWorld model, as outlined in README.md:
I'm fixing a few issues that would prevent upgrading the pytorch-lightning package. Trainer.lr_schedulers is being replaced with trainer.lr_scheduler_configs. In future versions, using trainer.logger with multiple loggers will only return the first logger available, so I'm iterating through trainer.loggers instead. And LightningLoggerBase.close is being replaced with LightningLoggerBase.finalize.
Closesmicrosoft#751
I took a look at this in the current main branch (commit 2877002). The first two warning have already been fixed, but the third is still present. There are also 2 new warnings:
InnerEye-DeepLearning/InnerEye/ML/lightning_base.py:398: LightningDeprecationWarning: `Trainer.lr_schedulers` is deprecated in v1.6 and will be removed in v1.8. You can use `trainer.lr_scheduler_configs` instead which contains dataclasses instead of dictionaries.
InnerEye-DeepLearning/InnerEye/ML/model_training.py:269: LightningDeprecationWarning: Using `trainer.logger` when multiple loggers are configured. This behavior will change in v1.8 when `LoggerCollection` is removed, and `trainer.logger` will return the first logger available.
🚀 Feature
Update packages and/or InnerEye code, so as not to have lightning deprecation warnings.
Motivation
When running the InnerEye code (commit b42043f), the following deprecation warnings are issued:
Pitch
It would be nice if packages and/or code could be updated so as to avoid the deprecation warnings - and to be future ready :)
Alternatives
There's probably a way of switching off the warnings, but addressing them would be better than hiding them.
Additional context
The deprecation warnings can be obtained by running the
HelloWorld
model, as outlined in README.md:AB#6281
The text was updated successfully, but these errors were encountered: