Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
f1fd9b8
Allow specifying FeatureServices in FeatureStore methods
achals Jul 6, 2021
27ea33e
format and lint
achals Jul 6, 2021
7ae1ed3
features_refs -> features
achals Jul 6, 2021
6269200
remote type: ignores
achals Jul 6, 2021
8574163
implement applying and persisting feature services into registry
achals Jul 6, 2021
dbe2995
Fix integration test references
achals Jul 6, 2021
7efd3c3
Add backwards compatibility
achals Jul 6, 2021
3e54197
More lint
achals Jul 6, 2021
3e6cad3
add integration tests
achals Jul 7, 2021
86a528a
refactor and lint
achals Jul 7, 2021
a929aa4
More tests
achals Jul 7, 2021
0368903
Add cli commands
achals Jul 7, 2021
7633674
Update sdk/python/feast/feature_store.py
achals Jul 7, 2021
f48542f
Update sdk/python/feast/feature_store.py
achals Jul 7, 2021
42c6a5f
Update sdk/python/feast/feature_store.py
achals Jul 7, 2021
f612ab3
Update sdk/python/feast/feature_store.py
achals Jul 7, 2021
8fe06c1
Update tests to use file offline source
achals Jul 7, 2021
7248a4c
Make tests integration and lint
achals Jul 7, 2021
09a651d
Retrieve feature services to avoid stale references
achals Jul 7, 2021
8dc58aa
Fix lint
achals Jul 7, 2021
6f09686
Merge changes from master
achals Jul 9, 2021
c656190
Merge master into branch
achals Jul 9, 2021
9540c72
fix tests
achals Jul 9, 2021
4241885
fix import
achals Jul 9, 2021
77ab6c0
fix integ tests
achals Jul 9, 2021
6eac6e8
CR
achals Jul 9, 2021
976293b
format
achals Jul 9, 2021
e1f9a07
Fix integ test
achals Jul 10, 2021
52a6507
Fix integ test
achals Jul 10, 2021
8a91fc1
Merge branch 'master' into achal/feature-service-api
achals Jul 12, 2021
c457f1e
Rename in comments
achals Jul 12, 2021
e3d70a9
Docstrings for Feature Services
achals Jul 12, 2021
545f675
make format
achals Jul 12, 2021
a77eb0f
merge from master
achals Jul 14, 2021
eaa3a89
format and refactor
achals Jul 14, 2021
e3cebc1
docs and updates
achals Jul 14, 2021
8a1534e
Update docs/concepts/feature-service.md
achals Jul 14, 2021
3274a1e
Update sdk/python/feast/feature_service.py
achals Jul 14, 2021
39bf511
Update sdk/python/feast/feature_service.py
achals Jul 14, 2021
2133abc
docs docs docs
achals Jul 14, 2021
f6938c0
docs docs
achals Jul 14, 2021
d495856
merge from master
achals Jul 19, 2021
1317d08
Fixes after merge
achals Jul 19, 2021
ea2210d
Remove dupe
achals Jul 19, 2021
2f0d698
Renames and deletions
achals Jul 19, 2021
ac211d2
lint
achals Jul 19, 2021
23c0d80
format and tests
achals Jul 19, 2021
798df64
remove unused imports
achals Jul 19, 2021
81fb228
fix registry
achals Jul 19, 2021
21aa6b6
fix docs
achals Jul 19, 2021
a6ecc6d
fix dangling print
achals Jul 20, 2021
54c95ae
make format and lint
achals Jul 20, 2021
2394f0a
list feature servces
achals Jul 20, 2021
2d11ab4
Merge branch 'master' into achal/feature-service-api
achals Jul 22, 2021
1ed9592
Merge from master
achals Jul 22, 2021
2a48ae8
fix tests
achals Jul 22, 2021
0943faf
Remove unused file
achals Jul 22, 2021
03d0ba5
single heading
achals Jul 22, 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
Rename in comments
Signed-off-by: Achal Shah <achals@gmail.com>
  • Loading branch information
achals committed Jul 12, 2021
commit c457f1ecdff8eaa68fd751808625f054542a80ae
4 changes: 2 additions & 2 deletions sdk/python/feast/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ class FeatureServiceNotFoundException(FeastObjectNotFoundException):
def __init__(self, name, project=None):
if project:
super().__init__(
f"FeatureService {name} does not exist in project {project}"
f"Feature service {name} does not exist in project {project}"
)
else:
super().__init__(f"FeatureService {name} does not exist")
super().__init__(f"Feature service {name} does not exist")


class FeatureViewNotFoundException(FeastObjectNotFoundException):
Expand Down
8 changes: 2 additions & 6 deletions sdk/python/feast/feature_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,8 @@ def get_historical_features(
column used to ensure point-in-time correctness. Either a Pandas DataFrame can be provided or a string
SQL query. The query must be of a format supported by the configured offline store (e.g., BigQuery)
features: A list of features, that should be retrieved from the offline store.
Feature references are of the format "feature_view:feature", e.g., "customer_fv:daily_transactions",
or it can be an instance of a FeatureService object.
Either a list of string feature references can be provided or a FeatureService object.
Feature references are of the format "feature_view:feature", e.g., "customer_fv:daily_transactions".
full_feature_names: A boolean that provides the option to add the feature view prefixes to the feature names,
changing them from the format "feature" to "feature_view__feature" (e.g., "daily_transactions" changes to
"customer_fv__daily_transactions"). By default, this value is set to False.
Expand Down Expand Up @@ -355,11 +355,9 @@ def get_historical_features(
_feature_refs = _features

all_feature_views = self._registry.list_feature_views(project=self.project)
print(f"All feature views: {all_feature_views}")
feature_views = list(
view for view, _ in _group_feature_refs(_feature_refs, all_feature_views)
)
print(f"Selected feature views: {feature_views}")

_validate_feature_refs(_feature_refs, full_feature_names)

Expand Down Expand Up @@ -717,8 +715,6 @@ def _group_feature_refs(
) -> List[Tuple[FeatureView, List[str]]]:
""" Get list of feature views and corresponding feature names based on feature references"""

print(f"Input Features: {features}")

# view name to view proto
view_index = {view.name: view for view in all_feature_views}

Expand Down
12 changes: 6 additions & 6 deletions sdk/python/feast/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ def list_entities(self, project: str, allow_cache: bool = False) -> List[Entity]

def apply_feature_service(self, feature_service: FeatureService, project: str):
"""
Registers a single entity with Feast
Registers a single Feature service with Feast
Comment thread
achals marked this conversation as resolved.
Outdated

Args:
feature_service: FeatureService that will be registered
feature_service: A Feature service that will be registered
Comment thread
achals marked this conversation as resolved.
Outdated
project: Feast project that this entity belongs to
"""
feature_service_proto = feature_service.to_proto()
Expand Down Expand Up @@ -180,14 +180,14 @@ def get_feature_service(
self, name: str, project: str, allow_cache: bool = False
) -> FeatureService:
"""
Retrieves a FeatureService.
Retrieves a Feature service.
Comment thread
achals marked this conversation as resolved.
Outdated

Args:
name: Name of FeatureService
project: Feast project that this FeatureService belongs to
name: Name of Feature service
Comment thread
achals marked this conversation as resolved.
Outdated
project: Feast project that this Feature service belongs to
Comment thread
achals marked this conversation as resolved.
Outdated

Returns:
Returns either the specified FeatureService, or raises an exception if
Returns either the specified Feature service, or raises an exception if
Comment thread
achals marked this conversation as resolved.
Outdated
none is found
"""
registry_proto = self._get_registry_proto(allow_cache=allow_cache)
Expand Down
4 changes: 2 additions & 2 deletions sdk/python/feast/repo_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,13 @@ def parse_repo(repo_root: Path) -> ParsedRepo:
def apply_feature_services(registry: Registry, project: str, repo: ParsedRepo):
from colorama import Fore, Style

# Determine which FeatureServices should be deleted.
# Determine which Feature services should be deleted.
Comment thread
achals marked this conversation as resolved.
Outdated
existing_feature_services = registry.list_feature_services(project)
for feature_service in repo.feature_services:
if feature_service in existing_feature_services:
existing_feature_services.remove(feature_service)

# The remaining features services in the list should be deleted.
# The remaining Features services in the list should be deleted.
Comment thread
achals marked this conversation as resolved.
Outdated
for feature_service_to_delete in existing_feature_services:
registry.delete_feature_service(feature_service_to_delete.name, project)
click.echo(
Expand Down