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
Convert the getter methods in the cluster environments to properties (read-only).
Motivation
The cluster environment is meant to be a look-up table, read-only
Pitch
Convert the getter methods in the cluster environments to properties (read-only).
PRO:
Consistent with the main_address and main_port methods which are already properties.
More pythonic?
CON:
Implementing a cluster environment requires overriding all methods/properties in the base abstract class. It can easily be forgotten by to add the @property decorator, leading to an error message a beginner might not understand.
Backward compatibility is harder to get right. On the metaclass level, we will have to wrap all non-property methods into properties when a developer uses an old environment implementation or implements one but doesn't add the decorator.
If you enjoy Lightning, check out our other projects! ⚡
Metrics: Machine learning metrics for distributed, scalable PyTorch applications.
Lite: enables pure PyTorch users to scale their existing code on any kind of device while retaining full control over their own loops and optimization logic.
Flash: The fastest way to get a Lightning baseline! A collection of tasks for fast prototyping, baselining, fine-tuning, and solving problems with deep learning.
Bolts: Pretrained SOTA Deep Learning models, callbacks, and more for research and production with PyTorch Lightning and PyTorch.
Lightning Transformers: Flexible interface for high-performance research using SOTA Transformers leveraging Pytorch Lightning, Transformers, and Hydra.
This issue has been automatically marked as stale because it hasn't had any recent activity. This issue will be closed in 7 days if no further activity occurs. Thank you for your contributions, Pytorch Lightning Team!
Proposed refactor
Convert the getter methods in the cluster environments to properties (read-only).
Motivation
The cluster environment is meant to be a look-up table, read-only
Pitch
Convert the getter methods in the cluster environments to properties (read-only).
PRO:
main_address
andmain_port
methods which are already properties.CON:
@property
decorator, leading to an error message a beginner might not understand.Additional context
Continuation from #6303
If you enjoy Lightning, check out our other projects! ⚡
Metrics: Machine learning metrics for distributed, scalable PyTorch applications.
Lite: enables pure PyTorch users to scale their existing code on any kind of device while retaining full control over their own loops and optimization logic.
Flash: The fastest way to get a Lightning baseline! A collection of tasks for fast prototyping, baselining, fine-tuning, and solving problems with deep learning.
Bolts: Pretrained SOTA Deep Learning models, callbacks, and more for research and production with PyTorch Lightning and PyTorch.
Lightning Transformers: Flexible interface for high-performance research using SOTA Transformers leveraging Pytorch Lightning, Transformers, and Hydra.
cc @justusschock @awaelchli @rohitgr7 @ananthsub
The text was updated successfully, but these errors were encountered: