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

refactor: remove redundant line as .reset() is call in Metrics().__init() #3044

Merged
merged 3 commits into from
Aug 24, 2023

Conversation

MarcBresson
Copy link
Contributor

The same line was in reset() and init() which is unecessary.

Check list:

  • New tests are added (if a new feature is added)
  • New doc strings: description and/or example code are in RST format
  • Documentation is updated (if required)

@github-actions github-actions bot added the module: metrics Metrics module label Aug 24, 2023
Copy link
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

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

LGTM, if mypy check wont complain

@MarcBresson
Copy link
Contributor Author

MarcBresson commented Aug 24, 2023

Do we even know why the kernel is recreated in the reset method ?

I think I removed it on the wrong line. It should only be called in init().

@MarcBresson MarcBresson marked this pull request as draft August 24, 2023 13:04
@vfdev-5
Copy link
Collaborator

vfdev-5 commented Aug 24, 2023

Yes, you are right, we do not need to recreate the kernel on reset.

@MarcBresson MarcBresson marked this pull request as ready for review August 24, 2023 13:16
Copy link
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix @MarcBresson !

@vfdev-5 vfdev-5 merged commit 86c2a1d into pytorch:master Aug 24, 2023
15 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: metrics Metrics module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants