From 82fcb4c5581d98c708eb7908f88894b2c4d2cb3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eskil=20J=C3=B6rgensen?= Date: Fri, 22 Feb 2019 19:26:49 +0100 Subject: [PATCH] Fix incorrect reference to member output_dir (#45) Doing the same here, so that run_eval() works even when not called as __main__. --- python-sdk/nuscenes/eval/nuscenes_eval.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-sdk/nuscenes/eval/nuscenes_eval.py b/python-sdk/nuscenes/eval/nuscenes_eval.py index b415efb2..b4454d54 100644 --- a/python-sdk/nuscenes/eval/nuscenes_eval.py +++ b/python-sdk/nuscenes/eval/nuscenes_eval.py @@ -284,7 +284,7 @@ def run_eval(self) -> Dict: 'weighted_sum': weighted_sum, 'eval_time': eval_time } - with open(os.path.join(output_dir, 'metrics.json'), 'w') as f: + with open(os.path.join(self.output_dir, 'metrics.json'), 'w') as f: json.dump(all_metrics, f, indent=2) return all_metrics