From b3aa176033ebfa520ad6dd2294d908c7f78ce401 Mon Sep 17 00:00:00 2001 From: enifeder <65483484+enifeder@users.noreply.github.com> Date: Sun, 2 Mar 2025 21:48:42 +0800 Subject: [PATCH] minor bug fix It is not possible to access params through function signiture, the key should be metric_str --- src/pytorch_tabular/tabular_model_tuner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pytorch_tabular/tabular_model_tuner.py b/src/pytorch_tabular/tabular_model_tuner.py index 6fd5684e..d199d1fb 100644 --- a/src/pytorch_tabular/tabular_model_tuner.py +++ b/src/pytorch_tabular/tabular_model_tuner.py @@ -409,7 +409,7 @@ def tune( params.update({"trial_id": i}) trials.append(params) if verbose: - logger.info(f"Trial {i+1}/{n_trials}: {params} | Score: {params[metric]}") + logger.info(f"Trial {i+1}/{n_trials}: {params} | Score: {params[metric_str]}") trials_df = pd.DataFrame(trials) trials = trials_df.pop("trial_id")