From 67289ac7eee7aa1c98ea3624c1e9db25d118b443 Mon Sep 17 00:00:00 2001 From: felipecode Date: Fri, 22 Dec 2017 11:28:13 -0200 Subject: [PATCH] Small bug class definition --- PythonClient/carla/benchmarks/benchmark.py | 19 +++++++++++++++---- PythonClient/carla/benchmarks/corl_2017.py | 4 ++-- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/PythonClient/carla/benchmarks/benchmark.py b/PythonClient/carla/benchmarks/benchmark.py index c32c688c7..dfdc2cf91 100644 --- a/PythonClient/carla/benchmarks/benchmark.py +++ b/PythonClient/carla/benchmarks/benchmark.py @@ -72,7 +72,7 @@ class Benchmark(object): self._experiments = self._build_experiments() # Create the log files and get the names - self._suffix_name, self._full_name = self._create_log_record(self._experiments) + self._suffix_name, self._full_name = self._create_log_record(name_to_save, self._experiments) # Get the line for the experiment to be continued self._line_on_file = self._continue_experiment(continue_experiment) @@ -318,7 +318,12 @@ class Benchmark(object): def _calculate_time_out(self, distance): pass - + @abc.abstractmethod + def _get_details(self): + """ + Get details + :return: a string with name and town of the subclass + """ @abc.abstractmethod def _build_experiments(self): """ @@ -327,9 +332,15 @@ class Benchmark(object): """ pass + @abc.abstractmethod + def get_all_statistics(self): + """ + Get the statistics of the evaluated experiments + :return: + """ @abc.abstractmethod - def _get_pose_and_task(self): + def _get_pose_and_task(self, line_on_file): """ Parse the experiment depending on number of poses and tasks """ @@ -349,7 +360,7 @@ class Benchmark(object): """ @staticmethod - def get_experiments_names(experiments): + def _get_experiments_names(experiments): name_cat = 'w' diff --git a/PythonClient/carla/benchmarks/corl_2017.py b/PythonClient/carla/benchmarks/corl_2017.py index 24a483bc4..323261507 100644 --- a/PythonClient/carla/benchmarks/corl_2017.py +++ b/PythonClient/carla/benchmarks/corl_2017.py @@ -57,8 +57,8 @@ class CoRL2017(Benchmark): for metric,values in metrics_summary.items(): - print('Metric : ',metric) - for weather,tasks in values.items(): + print('Metric : ', metric) + for weather, tasks in values.items(): if weather in set(weathers): print(' Weather: ',weather) count =0