From 17f9dabac5ff4e9c9183e67c639b55410dce2e41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francesc=20Mart=C3=AD=20Escofet?= <154450563+FrancescMartiEscofetQC@users.noreply.github.com> Date: Fri, 5 Jul 2024 14:15:05 +0200 Subject: [PATCH] Fix score time (#48) --- metalearners/grid_search.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/metalearners/grid_search.py b/metalearners/grid_search.py index 21afde4..1d85f63 100644 --- a/metalearners/grid_search.py +++ b/metalearners/grid_search.py @@ -48,6 +48,7 @@ def _fit_and_score(job: _FitAndScoreJob) -> _GSResult: job.X_train, job.y_train, job.w_train, **job.metalerner_fit_params ) fit_time = time.time() - start_time + start_time = time.time() train_scores = job.metalearner.evaluate( X=job.X_train, @@ -67,7 +68,7 @@ def _fit_and_score(job: _FitAndScoreJob) -> _GSResult: ) else: test_scores = None - score_time = time.time() - fit_time + score_time = time.time() - start_time return _GSResult( metalearner=job.metalearner, fit_time=fit_time,