Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name = "feast"
description = "Python SDK for Feast"
readme = "README.md"
requires-python = ">=3.10.0"
license = {file = "LICENSE"}
license = "Apache-2.0"
license-files = ["LICENSE"]
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10"
Expand All @@ -23,7 +23,7 @@ dependencies = [
"mmh3",
"numpy>=2.0.0,<3",
"pandas>=1.4.3,<3",
"pyarrow<=21.0.0",
"pyarrow>=21.0.0",
"pydantic>=2.10.6",
"pygments>=2.12.0,<3",
"PyYAML>=5.4.0,<7",
Expand Down Expand Up @@ -59,7 +59,7 @@ clickhouse = ["clickhouse-connect>=0.7.19"]
couchbase = ["couchbase==4.3.2", "couchbase-columnar==1.0.0"]
delta = ["deltalake<1.0.0"]
docling = ["docling==2.27.0"]
duckdb = ["ibis-framework[duckdb]>=9.0.0,<=9.5.0"]
duckdb = ["ibis-framework[duckdb]>=10.0.0"]
elasticsearch = ["elasticsearch>=8.13.0"]
faiss = ["faiss-cpu>=1.7.0,<=1.10.0"]
gcp = [
Expand All @@ -82,9 +82,7 @@ grpcio = [
hazelcast = ["hazelcast-python-client>=5.1"]
hbase = ["happybase>=1.2.0,<3"]
ibis = [
"ibis-framework>=9.0.0,<=9.5.0",
"ibis-substrait>=4.0.0",
"substrait<0.25.0", # TODO: remove this once we upgrade protobuf
"ibis-framework>=10.0.0",
"poetry-core<2",
"poetry-dynamic-versioning",
]
Expand All @@ -99,11 +97,11 @@ image = [
"scikit-learn>=1.0.0",
]
milvus = [
"pymilvus==2.4.15",
"pymilvus>2.5",
"milvus-lite==2.4.12",
"feast[setuptools]"
]
mssql = ["ibis-framework[mssql]>=9.0.0,<=9.5.0"]
mssql = ["ibis-framework[mssql]>=10.0.0"]
mysql = ["pymysql", "types-PyMySQL"]
opentelemetry = ["prometheus_client", "psutil"]
spark = ["pyspark>=4.0.0"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,11 @@ def _get_or_create_collection(
index_name=f"vector_index_{vector_field.name}",
params={"nlist": config.online_store.nlist},
)
self.client.create_index(
collection_name=collection_name,
index_params=index_params,
)
if len(index_params) > 0:
self.client.create_index(
collection_name=collection_name,
index_params=index_params,
)
else:
self.client.load_collection(collection_name)
self._collections[collection_name] = self.client.describe_collection(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,14 @@ def from_ibis(cls, user_function, sources):

import ibis
import ibis.expr.datatypes as dt
from ibis_substrait.compiler.core import SubstraitCompiler

try:
from ibis_substrait.compiler.core import SubstraitCompiler
except ImportError:
raise ImportError(
"Failed to use substrait transformation: 'ibis-substrait' package is not installed. "
"Install it with: `pip install ibis-substrait and only if https://github.com/ibis-project/ibis-substrait/issues/1309 issue is resolved."
)

compiler = SubstraitCompiler()

Expand Down
1 change: 0 additions & 1 deletion sdk/python/pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ filterwarnings =
ignore::DeprecationWarning:httpx.*:
ignore::DeprecationWarning:happybase.*:
ignore::DeprecationWarning:pkg_resources.*:
ignore::FutureWarning:ibis_substrait.compiler.*:
1,131 changes: 557 additions & 574 deletions sdk/python/requirements/py3.10-ci-requirements.txt

Large diffs are not rendered by default.

961 changes: 478 additions & 483 deletions sdk/python/requirements/py3.10-minimal-requirements.txt

Large diffs are not rendered by default.

430 changes: 216 additions & 214 deletions sdk/python/requirements/py3.10-minimal-sdist-requirements-build.txt

Large diffs are not rendered by default.

982 changes: 481 additions & 501 deletions sdk/python/requirements/py3.10-minimal-sdist-requirements.txt

Large diffs are not rendered by default.

536 changes: 270 additions & 266 deletions sdk/python/requirements/py3.10-requirements.txt

Large diffs are not rendered by default.

1,400 changes: 692 additions & 708 deletions sdk/python/requirements/py3.11-ci-requirements.txt

Large diffs are not rendered by default.

1,106 changes: 551 additions & 555 deletions sdk/python/requirements/py3.11-minimal-requirements.txt

Large diffs are not rendered by default.

575 changes: 288 additions & 287 deletions sdk/python/requirements/py3.11-minimal-sdist-requirements-build.txt

Large diffs are not rendered by default.

1,127 changes: 554 additions & 573 deletions sdk/python/requirements/py3.11-minimal-sdist-requirements.txt

Large diffs are not rendered by default.

591 changes: 295 additions & 296 deletions sdk/python/requirements/py3.11-requirements.txt

Large diffs are not rendered by default.

1,400 changes: 692 additions & 708 deletions sdk/python/requirements/py3.12-ci-requirements.txt

Large diffs are not rendered by default.

1,106 changes: 551 additions & 555 deletions sdk/python/requirements/py3.12-minimal-requirements.txt

Large diffs are not rendered by default.

575 changes: 288 additions & 287 deletions sdk/python/requirements/py3.12-minimal-sdist-requirements-build.txt

Large diffs are not rendered by default.

1,133 changes: 557 additions & 576 deletions sdk/python/requirements/py3.12-minimal-sdist-requirements.txt

Large diffs are not rendered by default.

591 changes: 295 additions & 296 deletions sdk/python/requirements/py3.12-requirements.txt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,6 @@ def values(self):
def construct_universal_feature_views(
data_sources: UniversalDataSources,
with_odfv: bool = True,
use_substrait_odfv: bool = False,
) -> UniversalFeatureViews:
driver_hourly_stats = create_driver_hourly_stats_feature_view(data_sources.driver)
driver_hourly_stats_base_feature_view = (
Expand All @@ -396,7 +395,6 @@ def construct_universal_feature_views(
driver_hourly_stats_base_feature_view[["conv_rate"]],
create_conv_rate_request_source(),
],
use_substrait_odfv=use_substrait_odfv,
)
if with_odfv
else None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import numpy as np
import pandas as pd
from ibis.expr.types.relations import Table

from feast import (
BatchFeatureView,
Expand All @@ -16,7 +15,7 @@
)
from feast.data_source import DataSource, RequestSource
from feast.feature_view_projection import FeatureViewProjection
from feast.on_demand_feature_view import PandasTransformation, SubstraitTransformation
from feast.on_demand_feature_view import PandasTransformation
from feast.types import Array, FeastType, Float32, Float64, Int32, Int64, String
from tests.integration.feature_repos.universal.entities import (
customer,
Expand Down Expand Up @@ -59,22 +58,10 @@ def conv_rate_plus_100(features_df: pd.DataFrame) -> pd.DataFrame:
return df


def conv_rate_plus_100_ibis(features_table: Table) -> Table:
return features_table.mutate(
conv_rate_plus_100=features_table["conv_rate"] + 100,
conv_rate_plus_val_to_add=features_table["conv_rate"]
+ features_table["val_to_add"],
conv_rate_plus_100_rounded=(features_table["conv_rate"] + 100)
.round(digits=0)
.cast("int32"),
)


def conv_rate_plus_100_feature_view(
sources: List[Union[FeatureView, RequestSource, FeatureViewProjection]],
infer_features: bool = False,
features: Optional[List[Field]] = None,
use_substrait_odfv: bool = False,
) -> OnDemandFeatureView:
# Test that positional arguments and Features still work for ODFVs.
_features = features or [
Expand All @@ -89,10 +76,8 @@ def conv_rate_plus_100_feature_view(
feature_transformation=PandasTransformation(
udf=conv_rate_plus_100,
udf_string="raw udf source", # type: ignore
)
if not use_substrait_odfv
else SubstraitTransformation.from_ibis(conv_rate_plus_100_ibis, sources),
mode="pandas" if not use_substrait_odfv else "substrait",
),
mode="pandas",
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,14 @@
@pytest.mark.integration
@pytest.mark.universal_offline_stores
@pytest.mark.parametrize("full_feature_names", [True, False], ids=lambda v: f"full:{v}")
@pytest.mark.parametrize(
"use_substrait_odfv", [True, False], ids=lambda v: f"substrait:{v}"
)
def test_historical_features_main(
environment, universal_data_sources, full_feature_names, use_substrait_odfv
environment, universal_data_sources, full_feature_names
):
store = environment.feature_store

(entities, datasets, data_sources) = universal_data_sources

feature_views = construct_universal_feature_views(
data_sources, use_substrait_odfv=use_substrait_odfv
)
feature_views = construct_universal_feature_views(data_sources)

entity_df_with_request_data = datasets.entity_df.copy(deep=True)
entity_df_with_request_data["val_to_add"] = [
Expand Down
132 changes: 0 additions & 132 deletions sdk/python/tests/unit/test_substrait_transformation.py

This file was deleted.

13 changes: 5 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"mmh3",
"numpy>=2.0.0,<3",
"pandas>=1.4.3,<3",
"pyarrow<=21.0.0",
"pyarrow>=21.0.0",
"pydantic>=2.0.0",
"pygments>=2.12.0,<3",
"PyYAML>=5.4.0,<7",
Expand Down Expand Up @@ -132,9 +132,7 @@
]

IBIS_REQUIRED = [
"ibis-framework>=9.0.0,<10",
"ibis-substrait>=4.0.0",
"substrait<0.25.0", # TODO: remove this once we upgrade protobuf
"ibis-framework>=10.0.0",
]

GRPCIO_REQUIRED = [
Expand All @@ -143,7 +141,7 @@
"grpcio-health-checking>=1.56.2,<=1.62.3",
]

DUCKDB_REQUIRED = ["ibis-framework[duckdb]>=9.0.0,<10"]
DUCKDB_REQUIRED = ["ibis-framework[duckdb]>=10.0.0"]

DELTA_REQUIRED = ["deltalake<1.0.0"]

Expand All @@ -158,14 +156,14 @@
"couchbase-columnar==1.0.0"
]

MSSQL_REQUIRED = ["ibis-framework[mssql]>=9.0.0,<10"]
MSSQL_REQUIRED = ["ibis-framework[mssql]>=10.0.0"]

FAISS_REQUIRED = ["faiss-cpu>=1.7.0,<=1.10.0"]
QDRANT_REQUIRED = ["qdrant-client>=1.12.0"]

GO_REQUIRED = ["cffi>=1.15.0"]

MILVUS_REQUIRED = ["pymilvus==2.4.15", "milvus-lite==2.4.12", "setuptools>=60,<81"]
MILVUS_REQUIRED = ["pymilvus>2.5", "milvus-lite==2.4.12", "setuptools>=60,<81"]

TORCH_REQUIRED = [
"torch>=2.7.0",
Expand Down Expand Up @@ -381,7 +379,6 @@
classifiers=[
# Trove classifiers
# Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
Expand Down