From 0c8f2a0f0ee4f669ede799459ec3c52598429857 Mon Sep 17 00:00:00 2001 From: Eric Pedley Date: Wed, 1 Jun 2022 22:35:56 -0700 Subject: [PATCH] Changed deprecated DataFrame.append to pd.concat to fix warning (#1487) lso removed a loop that wasn't doing anything. DataFrame.append doesn't operate in place so that second loop wasn't causing any side effects, and it was also just adding empty series anyway. If anyone has any insight about why that was there in the first place that would be nice. --- autosklearn/metalearning/metalearning/meta_base.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/autosklearn/metalearning/metalearning/meta_base.py b/autosklearn/metalearning/metalearning/meta_base.py index f193a61fef..826bfaeda3 100644 --- a/autosklearn/metalearning/metalearning/meta_base.py +++ b/autosklearn/metalearning/metalearning/meta_base.py @@ -73,11 +73,7 @@ def add_dataset(self, name, metafeatures): "Dataset %s already in meta-data. Removing occurence.", name.lower() ) self.metafeatures.drop(name.lower(), inplace=True) - self.metafeatures = self.metafeatures.append(metafeatures) - - runs = pd.Series([], name=name, dtype=float) - for metric in self.algorithm_runs.keys(): - self.algorithm_runs[metric].append(runs) + self.metafeatures = pd.concat([self.metafeatures, pd.DataFrame(metafeatures).T]) def get_runs(self, dataset_name, performance_measure=None): """Return a list of all runs for a dataset."""