Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
9e0e7c7
Add support for DynamoDB and S3 registry
leonid133 Apr 27, 2021
44aadd8
rcu and wcu as a parameter of dynamodb online store
leonid133 Apr 27, 2021
6383791
fix linter
leonid133 May 4, 2021
73ff67a
aws dependency to extras
leonid133 May 18, 2021
aa6d0da
FEAST_S3_ENDPOINT_URL
leonid133 May 18, 2021
0a87050
tests
leonid133 May 18, 2021
3b8bb31
merge from master
leonid133 May 18, 2021
00e8675
fix signature, after merge
leonid133 May 18, 2021
6a99cd9
aws default region name configurable
leonid133 May 18, 2021
32dc799
merge from master
leonid133 Jun 11, 2021
db616c4
add offlinestore config type to test
leonid133 Jun 11, 2021
8dcbd5a
review changes
leonid133 Jun 11, 2021
fee93dd
merge from master
leonid133 Jun 18, 2021
2bbe268
Merge branch 'master' of https://github.com/feast-dev/feast into feat…
leonid133 Jun 18, 2021
5d33a79
Merge branch 'master' of https://github.com/feast-dev/feast into feat…
leonid133 Jun 18, 2021
24c44ee
merge latest from master
leonid133 Jun 23, 2021
7b99cde
review requested changes
leonid133 Jun 23, 2021
3a985b0
integration test for Dynamo
leonid133 Jun 23, 2021
6973581
change the rest of table_name to table_instance (where table_name is …
leonid133 Jun 28, 2021
e928424
fix DynamoDBOnlineStore commit
leonid133 Jun 28, 2021
59d7e4c
move client to _initialize_dynamodb
leonid133 Jun 28, 2021
594b932
rename document_id to entity_id and Row to entity_id
leonid133 Jun 28, 2021
15a787c
The default value is None
leonid133 Jun 28, 2021
7eaa654
Remove Datastore from the docstring.
leonid133 Jun 28, 2021
1468117
get rid of the return call from S3RegistryStore
leonid133 Jun 28, 2021
5dbe429
merge two exceptions
leonid133 Jun 29, 2021
986d45e
For ci requirement
leonid133 Jun 29, 2021
79d85c7
remove configuration from test
leonid133 Jun 29, 2021
f50b2fb
feast-integration-tests for tests
leonid133 Jun 29, 2021
509c521
change test path
leonid133 Jun 29, 2021
cd67973
add fixture feature_store_with_s3_registry to test
leonid133 Jun 29, 2021
5466d20
merge from master
leonid133 Jun 29, 2021
3d1b78c
region required
leonid133 Jun 29, 2021
ff8d635
Merge branch 'master' of https://github.com/feast-dev/feast into feat…
leonid133 Jun 29, 2021
57a607c
Address the rest of the comments
Jul 2, 2021
e9422ea
Merge branch 'master' into feature/online_dynamodb
Jul 2, 2021
3cd9597
Update to_table to to_arrow
Jul 2, 2021
124b337
Merge branch 'master' into feature/online_dynamodb
Jul 3, 2021
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
Prev Previous commit
Next Next commit
review requested changes
Signed-off-by: lblokhin <lenin133@yandex.ru>
  • Loading branch information
leonid133 committed Jun 23, 2021
commit 7b99cdeb6b99e8d071634aaeecf7311cf4118d5e
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ install-ci-dependencies: install-python-ci-dependencies install-go-ci-dependenci
install-python-ci-dependencies:
pip install -e "sdk/python[ci]"

install-python-aws-dependencies:
pip install -e "sdk/python[aws]"

package-protos:
cp -r ${ROOT_DIR}/protos ${ROOT_DIR}/sdk/python/feast/protos

Expand Down
Binary file modified docs/specs/dynamodb_online_example.monopic
Binary file not shown.
Binary file modified docs/specs/dynamodb_online_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 6 additions & 16 deletions sdk/python/feast/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,14 @@ def __init__(self, name, project=None):
super().__init__(f"Feature table {name} does not exist")


class FeatureBucketNotExist(FeastObjectNotFoundException):
def __init__(self, bucket, project=None):
if project:
super().__init__(
f"Feature bucket {bucket} does not exist in project {project}"
)
else:
super().__init__(f"Feature bucket {bucket} does not exist")
class S3RegistryBucketNotExist(FeastObjectNotFoundException):
def __init__(self, bucket):
super().__init__(f"S3 bucket {bucket} for the Feast registry does not exist")


class FeatureBucketForbiddenAccess(FeastObjectNotFoundException):
def __init__(self, bucket, project=None):
if project:
super().__init__(
f"Private Registry Bucket {bucket} forbidden Access in project {project}"
)
else:
super().__init__(f"Private Registry Bucket {bucket} forbidden Access")
class S3RegistryBucketForbiddenAccess(FeastObjectNotFoundException):
def __init__(self, bucket):
super().__init__(f"S3 bucket {bucket} for the Feast registry can't be accessed")


class FeastProviderLoginError(Exception):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,6 @@ def materialize_single_feature_view(
created_timestamp_column,
) = _get_column_names(feature_view, entities)

start_date = utils.make_tzaware(start_date)
end_date = utils.make_tzaware(end_date)

table = self.offline_store.pull_latest_from_table_or_query(
data_source=feature_view.input,
join_key_columns=join_key_columns,
Expand All @@ -120,8 +117,6 @@ def materialize_single_feature_view(
self.repo_config, feature_view, rows_to_write, lambda x: pbar.update(x)
)

feature_view.materialization_intervals.append((start_date, end_date))
registry.apply_feature_view(feature_view, project)

@staticmethod
def get_historical_features(
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/feast/infra/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def get_provider(config: RepoConfig, repo_path: Path) -> Provider:

return GcpProvider(config)
elif config.provider == "aws":
from feast.infra.aws_provider import AwsProvider
from feast.infra.aws import AwsProvider

return AwsProvider(config)
elif config.provider == "local":
Expand Down
8 changes: 4 additions & 4 deletions sdk/python/feast/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
from feast.entity import Entity
from feast.errors import (
EntityNotFoundException,
FeatureBucketForbiddenAccess,
FeatureBucketNotExist,
S3RegistryBucketForbiddenAccess,
S3RegistryBucketNotExist,
FeatureTableNotFoundException,
FeatureViewNotFoundException,
)
Expand Down Expand Up @@ -577,9 +577,9 @@ def get_registry_proto(self):
# If it was a 404 error, then the bucket does not exist.
error_code = int(e.response["Error"]["Code"])
if error_code == 404:
raise FeatureBucketNotExist(self._bucket)
raise S3RegistryBucketNotExist(self._bucket)
else:
raise FeatureBucketForbiddenAccess(self._bucket)
raise S3RegistryBucketForbiddenAccess(self._bucket)

try:
obj = bucket.Object(self._key)
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/feast/templates/aws/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def bootstrap():
driver_stats_path = data_path / "driver_stats.parquet"
driver_df.to_parquet(path=str(driver_stats_path), allow_truncated_timestamps=True)

example_py_file = repo_path / "driver_example.py"
example_py_file = repo_path / "example.py"
replace_str_in_file(example_py_file, "%PARQUET_PATH%", str(driver_stats_path))


Expand Down
2 changes: 1 addition & 1 deletion sdk/python/feast/templates/aws/feature_store.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
project: my_project
registry: s3://data/registry.db
registry: data/registry.db
provider: aws
7 changes: 2 additions & 5 deletions sdk/python/feast/templates/aws/test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from datetime import datetime

import pandas as pd
from driver_example import driver, driver_hourly_stats_view
from example import driver, driver_hourly_stats_view

from feast import FeatureStore

Expand All @@ -20,20 +20,17 @@ def main():
# Select features
feature_refs = ["driver_hourly_stats:conv_rate", "driver_hourly_stats:acc_rate"]

# print()
print("Loading features into the online store...")
fs.materialize_incremental(end_date=datetime.now())

# print()
print("Retrieving online features...")

# Retrieve features from the online store (Dynamodb)
# Retrieve features from the online store (DynamoDB)
online_features = fs.get_online_features(
feature_refs=feature_refs,
entity_rows=[{"driver_id": 1001}, {"driver_id": 1002}],
).to_dict()

print()
print(pd.DataFrame.from_dict(online_features))


Expand Down