Skip to content

Commit

Permalink
[Perf] Empty cuda cache before running
Browse files Browse the repository at this point in the history
  • Loading branch information
matteobettini committed Nov 27, 2023
1 parent 3f5471f commit 395fb44
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions benchmarl/experiment/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,7 @@ def _setup_logger(self):
def run(self):
"""Run the experiment until completion."""
try:
torch.cuda.empty_cache()
self._collection_loop()
except KeyboardInterrupt as interrupt:
print("\n\nExperiment was closed gracefully\n\n")
Expand Down

0 comments on commit 395fb44

Please sign in to comment.