Skip to content

Commit

Permalink
Added erase to the timeit utility (pytorch#480)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-dufour authored Sep 23, 2022
1 parent c498aac commit 7f9b2a9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions torchrl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ def print(prefix=None):
)
print(" -- ".join(strings))

@staticmethod
def erase():
for k in timeit._REG:
timeit._REG[k] = [0.0, 0.0, 0]


def _check_for_faulty_process(processes):
terminate = False
Expand Down

0 comments on commit 7f9b2a9

Please sign in to comment.