diff --git a/base/testing/benchmarker.py b/base/testing/benchmarker.py index 7d4970de..152195b9 100644 --- a/base/testing/benchmarker.py +++ b/base/testing/benchmarker.py @@ -123,9 +123,8 @@ def benchmark_submissions(self, contest: Contest, submissions: dict[Key, Reposit average_benchmarking_time = self.get_average_benchmarking_time() if average_benchmarking_time: - submissions_left = len(submissions) - len(self.benchmarks) - eta = submissions_left * average_benchmarking_time - logger.info(f"{submissions_left}/{len(submissions)} benchmarked. Average benchmark time: {average_benchmarking_time:.2f}s, ETA: {timedelta(seconds=eta)}") + eta = (len(submissions) - len(self.benchmarks)) * average_benchmarking_time + logger.info(f"{len(self.benchmarks)}/{len(submissions)} benchmarked. Average benchmark time: {average_benchmarking_time:.2f}s, ETA: {timedelta(seconds=eta)}") if self._is_done(submissions): logger.info("Benchmarking complete") diff --git a/validator/weight_setting/validator.py b/validator/weight_setting/validator.py index a2443df3..2160b8e7 100644 --- a/validator/weight_setting/validator.py +++ b/validator/weight_setting/validator.py @@ -188,9 +188,8 @@ def update_benchmarks(self, benchmarking_results: list[BenchmarkingResults]): self.contest_state.invalid_submissions.update(result.invalid_submissions) if average_benchmarking_time and average_benchmarking_time != self.contest_state.average_benchmarking_time: - submissions_left = len(self.contest_state.submissions) - len(self.contest_state.benchmarks) - eta = submissions_left * average_benchmarking_time - logger.info(f"{submissions_left}/{len(self.contest_state.submissions)} benchmarked. Average benchmark time: {average_benchmarking_time:.2f}s, ETA: {timedelta(seconds=eta)}") + eta = (len(self.contest_state.submissions) - len(self.contest_state.benchmarks)) * average_benchmarking_time + logger.info(f"{len(self.contest_state.benchmarks)}/{len(self.contest_state.submissions)} benchmarked. Average benchmark time: {average_benchmarking_time:.2f}s, ETA: {timedelta(seconds=eta)}") self.contest_state.average_benchmarking_time = average_benchmarking_time