Skip to content
680 changes: 680 additions & 0 deletions Bugs MWE Corrected.ipynb

Large diffs are not rendered by default.

1,592 changes: 1,592 additions & 0 deletions Bugs MWE.ipynb

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ pre-commit:
$(PRECOMMIT) run --all-files

format-black:
$(BLACK) autosklearn/.*
$(BLACK) test/.*
$(BLACK) examples/.*
$(BLACK) autosklearn
$(BLACK) test
$(BLACK) examples

format-isort:
$(ISORT) autosklearn
Expand Down
18 changes: 16 additions & 2 deletions autosklearn/automl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1825,7 +1825,15 @@ def _get_runhistory_models_performance(self):
@property
def performance_over_time_(self):
check_is_fitted(self)
individual_performance_frame = self._get_runhistory_models_performance()
individual_performance_frame = (
self._get_runhistory_models_performance().sort_values(
by=["Timestamp", "single_best_optimization_score"]
)
)

metric = self._metrics[0]
individual_performance_frame["single_best_optimization_score"] *= metric._sign

best_values = pd.Series(
{
"single_best_optimization_score": -np.inf,
Expand All @@ -1841,6 +1849,8 @@ def performance_over_time_(self):
best_values = individual_performance_frame.loc[idx]
individual_performance_frame.loc[idx] = best_values

individual_performance_frame["single_best_optimization_score"] *= metric._sign

performance_over_time = individual_performance_frame

if self._ensemble_class is not None:
Expand All @@ -1856,6 +1866,10 @@ def performance_over_time_(self):
best_values = ensemble_performance_frame.loc[idx]
ensemble_performance_frame.loc[idx] = best_values

for c in ensemble_performance_frame.columns:
if c != "Timestamp":
ensemble_performance_frame[c] *= metric._sign

performance_over_time = (
pd.merge(
ensemble_performance_frame,
Expand All @@ -1867,7 +1881,7 @@ def performance_over_time_(self):
.fillna(method="ffill")
)

return performance_over_time
return performance_over_time.drop_duplicates()

@property
def cv_results_(self):
Expand Down
1 change: 0 additions & 1 deletion autosklearn/estimators.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,6 @@ def build_automl(self):
return automl

def fit(self, **kwargs):

# Automatically set the cutoff time per task
if self.per_run_time_limit is None:
self.per_run_time_limit = self._n_jobs * self.time_left_for_this_task // 10
Expand Down
3 changes: 2 additions & 1 deletion scripts/02_retrieve_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ def __init__(self, info, feat_type=None):
self._info = info
self.feat_type = feat_type


def main():
parser = ArgumentParser()

Expand Down Expand Up @@ -239,7 +240,7 @@ def main():
configuration_space = pipeline.get_configuration_space(
DummyDatamanager(
info={"is_sparse": sparse, "task": task},
feat_type={"A": "numerical", "B": "categorical"}
feat_type={"A": "numerical", "B": "categorical"},
)
)

Expand Down