Skip to content

Commit d895fdc

Browse files
squashing the last 15 commits to one.
1 parent a75cd1e commit d895fdc

File tree

9 files changed

+151
-284
lines changed

9 files changed

+151
-284
lines changed

.github/workflows/pr_integration_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
strategy:
8787
fail-fast: false
8888
matrix:
89-
python-version: [ "3.9", "3.10", "3.11" ]
89+
python-version: [ "3.11" ]
9090
os: [ ubuntu-latest ]
9191
env:
9292
OS: ${{ matrix.os }}

.github/workflows/pr_local_integration_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
python-version: [ "3.9", "3.10", "3.11" ]
22+
python-version: [ "3.11" ]
2323
os: [ ubuntu-latest ]
2424
env:
2525
OS: ${{ matrix.os }}

Makefile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,6 @@ lock-python-dependencies-all:
7070
pixi run --environment py311 --manifest-path infra/scripts/pixi/pixi.toml "uv pip compile --system --no-strip-extras setup.py --output-file sdk/python/requirements/py3.11-requirements.txt"
7171
pixi run --environment py311 --manifest-path infra/scripts/pixi/pixi.toml "uv pip compile --system --no-strip-extras setup.py --extra ci --output-file sdk/python/requirements/py3.11-ci-requirements.txt"
7272

73-
lock-python-dependencies-all:
74-
pixi run --environment py39 --manifest-path infra/scripts/pixi/pixi.toml "python -m piptools compile -U --output-file sdk/python/requirements/py3.9-requirements.txt"
75-
pixi run --environment py39 --manifest-path infra/scripts/pixi/pixi.toml "python -m piptools compile -U --extra ci --output-file sdk/python/requirements/py3.9-ci-requirements.txt"
76-
pixi run --environment py310 --manifest-path infra/scripts/pixi/pixi.toml "python -m piptools compile -U --output-file sdk/python/requirements/py3.10-requirements.txt"
77-
pixi run --environment py310 --manifest-path infra/scripts/pixi/pixi.toml "python -m piptools compile -U --extra ci --output-file sdk/python/requirements/py3.10-ci-requirements.txt"
78-
7973
benchmark-python:
8074
IS_TEST=True python -m pytest --integration --benchmark --benchmark-autosave --benchmark-save-data sdk/python/tests
8175

infra/scripts/pixi/pixi.lock

Lines changed: 120 additions & 246 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

infra/scripts/pixi/pixi.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,18 @@ platforms = ["linux-64"]
66
[tasks]
77

88
[dependencies]
9-
pip-tools = ">=7.4.1,<7.5"
9+
uv = ">=0.1.39,<0.2"
1010

1111
[feature.py39.dependencies]
1212
python = "~=3.9.0"
1313

1414
[feature.py310.dependencies]
1515
python = "~=3.10.0"
1616

17+
[feature.py311.dependencies]
18+
python = "~=3.11.0"
19+
1720
[environments]
1821
py39 = ["py39"]
19-
py310 = ["py310"]
22+
py310 = ["py310"]
23+
py311 = ["py311"]

sdk/python/feast/infra/online_stores/remote.py

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232

3333
class RemoteOnlineStoreConfig(FeastConfigBaseModel):
34-
"""Online store config for Redis store"""
34+
"""Remote Online store config for remote online store"""
3535

3636
type: Literal["remote"] = "remote"
3737
"""Online store type selector"""
@@ -78,27 +78,23 @@ def online_read(
7878
response_json = json.loads(response.text)
7979
event_ts = self._get_event_ts(response_json)
8080
# Iterating over results and converting the API results in column format to row format.
81-
feature_value_index = 0
8281
result_tuples: List[
8382
Tuple[Optional[datetime], Optional[Dict[str, ValueProto]]]
8483
] = []
85-
while feature_value_index < len(entity_keys):
86-
feature_values_dict = dict()
84+
for feature_value_index in range(len(entity_keys)):
85+
feature_values_dict: Dict[str, ValueProto] = dict()
8786
for index, feature_name in enumerate(
8887
response_json["metadata"]["feature_names"]
8988
):
9089
if self._check_if_feature_requested(
9190
feature_name, requested_features
9291
):
93-
is_present = (
94-
True
95-
if response_json["results"][index]["statuses"][
92+
if (
93+
response_json["results"][index]["statuses"][
9694
feature_value_index
9795
]
9896
== "PRESENT"
99-
else False
100-
)
101-
if is_present:
97+
):
10298
message = python_values_to_proto_values(
10399
[
104100
response_json["results"][index]["values"][
@@ -112,7 +108,6 @@ def online_read(
112108
feature_values_dict[feature_name] = ValueProto()
113109

114110
result_tuples.append((event_ts, feature_values_dict))
115-
feature_value_index += 1
116111
return result_tuples
117112
else:
118113
error_msg = f"Unable to retrieve the online store data using feature server API. Error_code={response.status_code}, error_message={response.reason}"
@@ -154,10 +149,8 @@ def _check_if_feature_requested(self, feature_name, requested_features):
154149

155150
def _get_event_ts(self, response_json) -> datetime:
156151
event_ts = ""
157-
for index, result in enumerate(response_json["results"]):
158-
if index == 1:
159-
event_ts = result["event_timestamps"][0]
160-
break
152+
if len(response_json["results"]) > 1:
153+
event_ts = response_json["results"][1]["event_timestamps"][0]
161154
return datetime.fromisoformat(event_ts.replace("Z", "+00:00"))
162155

163156
def update(
@@ -170,7 +163,6 @@ def update(
170163
partial: bool,
171164
):
172165
pass
173-
# raise NotImplementedError("for remote online store update method is not available.")
174166

175167
def teardown(
176168
self,

sdk/python/tests/integration/feature_repos/repo_configuration.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
from tests.integration.feature_repos.universal.data_sources.file import (
3535
DuckDBDataSourceCreator,
3636
DuckDBDeltaDataSourceCreator,
37-
DuckDBDeltaS3DataSourceCreator,
3837
FileDataSourceCreator,
3938
)
4039
from tests.integration.feature_repos.universal.data_sources.redshift import (
@@ -80,7 +79,6 @@
8079
"connection_string": "127.0.0.1:6001,127.0.0.1:6002,127.0.0.1:6003",
8180
}
8281

83-
8482
SNOWFLAKE_CONFIG = {
8583
"type": "snowflake.online",
8684
"account": os.getenv("SNOWFLAKE_CI_DEPLOYMENT", ""),
@@ -153,7 +151,6 @@
153151
AVAILABLE_ONLINE_STORES["datastore"] = ("datastore", None)
154152
AVAILABLE_ONLINE_STORES["snowflake"] = (SNOWFLAKE_CONFIG, None)
155153
AVAILABLE_ONLINE_STORES["bigtable"] = (BIGTABLE_CONFIG, None)
156-
157154
# Uncomment to test using private Rockset account. Currently not enabled as
158155
# there is no dedicated Rockset instance for CI testing and there is no
159156
# containerized version of Rockset.
@@ -468,6 +465,13 @@ def construct_test_environment(
468465
project, fixture_request=fixture_request
469466
)
470467

468+
if test_repo_config.online_store_creator:
469+
online_creator = test_repo_config.online_store_creator(
470+
project, fixture_request=fixture_request
471+
)
472+
else:
473+
online_creator = None
474+
471475
if test_repo_config.python_feature_server and test_repo_config.provider == "aws":
472476
from feast.infra.feature_servers.aws_lambda.config import (
473477
AwsLambdaFeatureServerConfig,
@@ -501,13 +505,6 @@ def construct_test_environment(
501505
cache_ttl_seconds=1,
502506
)
503507

504-
if test_repo_config.online_store_creator:
505-
online_creator = test_repo_config.online_store_creator(
506-
project, fixture_request=fixture_request, registry_path=registry.path
507-
)
508-
else:
509-
online_creator = None
510-
511508
environment = Environment(
512509
name=project,
513510
provider=test_repo_config.provider,

sdk/python/tests/integration/online_store/test_remote_online_store.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ def test_remote_online_store_read():
2020
server_store, server_url, registry_path = (
2121
_create_server_store_spin_feature_server(temp_dir=remote_server_tmp_dir)
2222
)
23-
2423
assert None not in (server_store, server_url, registry_path)
2524
client_store = _create_remote_client_feature_store(
2625
temp_dir=remote_client_tmp_dir,
@@ -100,6 +99,14 @@ def _assert_existing_feature_views_entity(
10099
entity_rows=entity_rows,
101100
)
102101

102+
features = ["driver_hourly_stats:conv_rate"]
103+
_assert_client_server_online_stores_are_matching(
104+
client_store=client_store,
105+
server_store=server_store,
106+
features=features,
107+
entity_rows=entity_rows,
108+
)
109+
103110

104111
def _assert_client_server_online_stores_are_matching(
105112
client_store: FeatureStore, server_store: FeatureStore, features, entity_rows

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@
6666
"uvicorn[standard]>=0.14.0,<1",
6767
"gunicorn; platform_system != 'Windows'",
6868
"dask[dataframe]>=2024.4.2",
69-
"bowler", # Needed for automatic repo upgrades
7069
]
7170

7271
GCP_REQUIRED = [

0 commit comments

Comments
 (0)