From 1a44ecd4d512e1b99748287236ddd3d848224a7b Mon Sep 17 00:00:00 2001 From: Xavier Date: Wed, 8 Jul 2026 15:40:21 -0400 Subject: [PATCH] Replaces Python builtin max/min over the fitness tensor with torch.max/torch.min; at pop 1M this reduces default-settings generation time from ~2.5 s to ~0.09 s with identical output. --- src/evogp/pipeline/standard.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/evogp/pipeline/standard.py b/src/evogp/pipeline/standard.py index 8108514..c82e4ce 100644 --- a/src/evogp/pipeline/standard.py +++ b/src/evogp/pipeline/standard.py @@ -93,8 +93,8 @@ def show_details(self, start_time, generation_cnt, fitnesses): ] max_f, min_f, mean_f, std_f = ( - max(valid_fitness), - min(valid_fitness), + torch.max(valid_fitness), + torch.min(valid_fitness), torch.mean(valid_fitness), torch.std(valid_fitness), )