diff --git a/core/src/main/java/feast/core/model/FeatureSet.java b/core/src/main/java/feast/core/model/FeatureSet.java index 59ea592103..947a0c6ca2 100644 --- a/core/src/main/java/feast/core/model/FeatureSet.java +++ b/core/src/main/java/feast/core/model/FeatureSet.java @@ -5,12 +5,9 @@ import feast.core.FeatureSetProto.EntitySpec; import feast.core.FeatureSetProto.FeatureSetSpec; import feast.core.FeatureSetProto.FeatureSpec; -import feast.core.SourceProto; -import feast.core.util.TypeConversion; import feast.types.ValueProto.ValueType; import java.util.ArrayList; import java.util.List; -import java.util.Map; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; @@ -68,7 +65,8 @@ public FeatureSet() { super(); } - public FeatureSet(String name, int version, long maxAgeSeconds, List entities, List features, + public FeatureSet(String name, int version, long maxAgeSeconds, List entities, + List features, Source source) { this.id = String.format("%s:%s", name, version); this.name = name; @@ -137,7 +135,8 @@ public FeatureSetSpec toProto() throws InvalidProtocolBufferException { */ public boolean equalTo(FeatureSet other) throws InvalidProtocolBufferException { return name.equals(other.getName()) && entities.equals(other.entities) && features - .equals(other.features) && source.equalTo(other.getSource()); + .equals(other.features) && source.equalTo(other.getSource()) + && maxAgeSeconds == other.maxAgeSeconds; } @Override diff --git a/sdk/python/feast/client.py b/sdk/python/feast/client.py index 71aa873668..b7568c8581 100644 --- a/sdk/python/feast/client.py +++ b/sdk/python/feast/client.py @@ -213,7 +213,14 @@ def _apply_feature_set(self, feature_set: FeatureSet): timeout=GRPC_CONNECTION_TIMEOUT_APPLY, ) # type: ApplyFeatureSetResponse applied_fs = FeatureSet.from_proto(apply_fs_response.feature_set) - feature_set._update_from_feature_set(applied_fs, is_dirty=False) + + if apply_fs_response.status == ApplyFeatureSetResponse.Status.CREATED: + print(f'Feature set updated/created: "{applied_fs.name}:{applied_fs.version}".') + feature_set._update_from_feature_set(applied_fs, is_dirty=False) + return + if apply_fs_response.status == ApplyFeatureSetResponse.Status.NO_CHANGE: + print(f'No change detected in feature set {feature_set.name}:{feature_set.version}') + return except grpc.RpcError as e: print(format_grpc_exception("ApplyFeatureSet", e.code(), e.details())) diff --git a/sdk/python/feast/feature_set.py b/sdk/python/feast/feature_set.py index 3760300056..db03d9a356 100644 --- a/sdk/python/feast/feature_set.py +++ b/sdk/python/feast/feature_set.py @@ -305,8 +305,10 @@ def ingest( force_update: bool = False, timeout: int = 5, max_workers: int = CPU_COUNT, + disable_progress_bar: bool = False ): - pbar = tqdm(unit="rows", total=dataframe.shape[0]) + + pbar = tqdm(unit="rows", total=dataframe.shape[0], disable=disable_progress_bar) q = Queue() proc = Process(target=self._listener, args=(pbar, q)) try: diff --git a/tests/e2e/basic/data.csv b/tests/e2e/basic/data.csv index be1ba79ada..d2994d253a 100644 --- a/tests/e2e/basic/data.csv +++ b/tests/e2e/basic/data.csv @@ -1,3 +1,3 @@ -datetime,customer,daily_transactions,total_transactions +datetime,customer_id,daily_transactions,total_transactions 1570366527,1001,1.3,500 1570366536,1002,1.4,600 \ No newline at end of file