diff --git a/src/neps/optimizers/multi_fidelity/utils.py b/src/neps/optimizers/multi_fidelity/utils.py index c9242943..fbe080b6 100644 --- a/src/neps/optimizers/multi_fidelity/utils.py +++ b/src/neps/optimizers/multi_fidelity/utils.py @@ -243,7 +243,7 @@ def get_partial_configs_at_max_seen(self): def extract_learning_curve(self, config_id: int, budget_id: int) -> list[float]: # reduce budget_id to discount the current validation loss # both during training and prediction phase - budget_id = budget_id - 1 + budget_id = max(0, budget_id - 1) if self.lc_col_name in self.df.columns: lc = self.df.loc[(config_id, budget_id), self.lc_col_name] else: