Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let Accelerator inherit from ABC to make sure abstractmethod takes effect #11521

Merged
merged 3 commits into from
Jan 23, 2022

Conversation

chunyang-wen
Copy link
Contributor

What does this PR do?

  • We have to inherit from ABC in order to make abstractmethod to take effect. Make Accelerator inherit from ABC
  • Update docstring to better describe the function

@chunyang-wen
Copy link
Contributor Author

The failed test case means that ABC takes effect.

@mergify mergify bot added the ready PRs ready to be merged label Jan 18, 2022
Copy link
Contributor

@ananthsub ananthsub left a comment

Choose a reason for hiding this comment

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

thanks for working on this @chunyang-wen . Could you add an entry to the CHANGELOG since this may be a breaking change for people who write customized accelerator classes and who hadn't implemented the abstract methods?

Copy link
Contributor

@tchaton tchaton left a comment

Choose a reason for hiding this comment

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

LGTM !

@awaelchli awaelchli changed the title Inherit from ABC to make sure abstractmethod takes effect; Modiy comment Inherit from ABC to make sure abstractmethod takes effect Jan 23, 2022
@awaelchli awaelchli changed the title Inherit from ABC to make sure abstractmethod takes effect Inherit Accelerator from ABC to make sure abstractmethod takes effect Jan 23, 2022
@awaelchli awaelchli changed the title Inherit Accelerator from ABC to make sure abstractmethod takes effect Let Accelerator inherit from ABC to make sure abstractmethod takes effect Jan 23, 2022
@awaelchli awaelchli merged commit 350c88e into Lightning-AI:master Jan 23, 2022
@awaelchli
Copy link
Contributor

Thank you for the quick fix @chunyang-wen <3

@chunyang-wen chunyang-wen deleted the inhert-from-ABC branch January 24, 2022 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants