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

Fix reset TensorRunningAccum #5106

Merged
merged 4 commits into from
Dec 16, 2020
Merged

Fix reset TensorRunningAccum #5106

merged 4 commits into from
Dec 16, 2020

Conversation

VinhLoiIT
Copy link
Contributor

What does this PR do?

Fixes #5073

@codecov
Copy link

codecov bot commented Dec 12, 2020

Codecov Report

Merging #5106 (1aa3f09) into master (afe5da7) will not change coverage.
The diff coverage is 100%.

@@          Coverage Diff           @@
##           master   #5106   +/-   ##
======================================
  Coverage      93%     93%           
======================================
  Files         134     134           
  Lines        9905    9905           
======================================
  Hits         9204    9204           
  Misses        701     701           

@rohitgr7 rohitgr7 added the bug Something isn't working label Dec 13, 2020
@rohitgr7 rohitgr7 added this to the 1.1.x milestone Dec 13, 2020
@rohitgr7 rohitgr7 added the ready PRs ready to be merged label Dec 13, 2020
@@ -50,7 +50,7 @@ def __init__(self, window_length: int):

def reset(self) -> None:
"""Empty the accumulator."""
self = TensorRunningAccum(self.window_length)
self.__init__(self.window_length)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add a test to make sure TensorRunningAccum is having the right behaviour ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. I've tested it manually, but I would add the test in the next commit as you suggested.

Copy link
Contributor

@carmocca carmocca Dec 14, 2020

Choose a reason for hiding this comment

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

I don't think we have tests for TensorRunningAccum, so you'll have to create them

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.

verified fails on master

@rohitgr7 rohitgr7 merged commit b4d926b into Lightning-AI:master Dec 16, 2020
awaelchli pushed a commit that referenced this pull request Dec 18, 2020
* Fix reset TensorRunningAccum

* add test for TensorRunningAccum's reset method

* fix CI failed due to PEP8

Co-authored-by: Rohit Gupta <[email protected]>
Borda pushed a commit that referenced this pull request Dec 23, 2020
* Fix reset TensorRunningAccum

* add test for TensorRunningAccum's reset method

* fix CI failed due to PEP8

Co-authored-by: Rohit Gupta <[email protected]>
Borda pushed a commit that referenced this pull request Dec 29, 2020
* Fix reset TensorRunningAccum

* add test for TensorRunningAccum's reset method

* fix CI failed due to PEP8

Co-authored-by: Rohit Gupta <[email protected]>
Borda pushed a commit that referenced this pull request Jan 4, 2021
* Fix reset TensorRunningAccum

* add test for TensorRunningAccum's reset method

* fix CI failed due to PEP8

Co-authored-by: Rohit Gupta <[email protected]>
Borda pushed a commit that referenced this pull request Jan 4, 2021
* Fix reset TensorRunningAccum

* add test for TensorRunningAccum's reset method

* fix CI failed due to PEP8

Co-authored-by: Rohit Gupta <[email protected]>
Borda pushed a commit that referenced this pull request Jan 5, 2021
* Fix reset TensorRunningAccum

* add test for TensorRunningAccum's reset method

* fix CI failed due to PEP8

Co-authored-by: Rohit Gupta <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TensorRunningAccum does not reset as it assumed to be
5 participants