diff --git a/benchmarl/experiment/experiment.py b/benchmarl/experiment/experiment.py index ba550fcd..dcf83fa0 100644 --- a/benchmarl/experiment/experiment.py +++ b/benchmarl/experiment/experiment.py @@ -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")