From b802f69292ea03a5938940dce2995202f77bf232 Mon Sep 17 00:00:00 2001 From: Ralph Rassweiler Date: Fri, 18 Oct 2024 09:50:16 -0300 Subject: [PATCH] fix: move incremental filter (#388) --- butterfree/transform/aggregated_feature_set.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/butterfree/transform/aggregated_feature_set.py b/butterfree/transform/aggregated_feature_set.py index 516b6fed..1230cd4d 100644 --- a/butterfree/transform/aggregated_feature_set.py +++ b/butterfree/transform/aggregated_feature_set.py @@ -580,10 +580,6 @@ def construct( for feature in self.keys + [self.timestamp]: output_df = feature.transform(output_df) - output_df = self.incremental_strategy.filter_with_incremental_strategy( - dataframe=output_df, start_date=start_date, end_date=end_date - ) - if self._windows and end_date is not None: # Run aggregations for each window agg_list = [ @@ -636,6 +632,10 @@ def construct( else: output_df = self._aggregate(output_df, features=self.features) + output_df = self.incremental_strategy.filter_with_incremental_strategy( + dataframe=output_df, start_date=start_date, end_date=end_date + ) + output_df = output_df.select(*self.columns).replace( # type: ignore float("nan"), None )