From c9debb188bc9e8abb3be98d23427032158748e05 Mon Sep 17 00:00:00 2001 From: Masha Itkina Date: Wed, 1 Nov 2023 16:18:15 -0700 Subject: [PATCH] Fix for stochastic evaluation results. --- robomimic/scripts/run_trained_agent.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/robomimic/scripts/run_trained_agent.py b/robomimic/scripts/run_trained_agent.py index 2ec09dfe..d2384fdc 100644 --- a/robomimic/scripts/run_trained_agent.py +++ b/robomimic/scripts/run_trained_agent.py @@ -217,6 +217,10 @@ def run_trained_agent(args): np.random.seed(args.seed) torch.manual_seed(args.seed) + # Fix to get deterministic results. + torch.backends.cudnn.deterministic = True + torch.backends.cudnn.benchmark = False + # maybe create video writer video_writer = None if write_video: