Skip to content

Conversation

@ethanfurman
Copy link
Contributor

Fixes #12749

  • change from_str to use __members__ for enum names
  • change from_str to use built-in __getitem__ syntax for names
  • make _OnAccessEnumMeta more robust and efficient
  • create DeprecatedEnum as a base class
  • change DistributedType and DeviceType to use DeprecatedEnum

change `from_str` to use `__members__` for enum names
change `from_str` to use built-in `__getitem__` syntax for names
make `_OnAccessEnumMeta` more robust and efficient
create `DeprecatedEnum` as a base class
change `DistributedType` and `DeviceType` to use `DeprecatedEnum`
@Borda Borda added this to the 1.6.x milestone Apr 13, 2022
@mergify mergify bot added the ready PRs ready to be merged label Apr 13, 2022
Make private by prepending an `_`.
add missing `_`
Copy link
Contributor

@awaelchli awaelchli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Someone is playing with metaclasses! <3

@awaelchli awaelchli enabled auto-merge (squash) April 16, 2022 11:33
@awaelchli awaelchli merged commit ffdcbdd into Lightning-AI:master Apr 22, 2022
otaj pushed a commit that referenced this pull request Apr 25, 2022
lexierule pushed a commit that referenced this pull request Apr 27, 2022
@rohitgr7 rohitgr7 mentioned this pull request Jul 1, 2022
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready PRs ready to be merged refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve LightningEnum and its deprecation

6 participants