-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for third party providers (#1501)
* Add support for third party providers Signed-off-by: Tsotne Tabidze <[email protected]> * Add unit tests & assume providers without dots in name refers to builtin providers Signed-off-by: Tsotne Tabidze <[email protected]>
- Loading branch information
Showing
5 changed files
with
197 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
from datetime import datetime | ||
from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union | ||
|
||
import pandas | ||
|
||
from feast import Entity, FeatureTable, FeatureView, RepoConfig | ||
from feast.infra.offline_stores.offline_store import RetrievalJob | ||
from feast.infra.provider import Provider | ||
from feast.protos.feast.types.EntityKey_pb2 import EntityKey as EntityKeyProto | ||
from feast.protos.feast.types.Value_pb2 import Value as ValueProto | ||
from feast.registry import Registry | ||
|
||
|
||
class FooProvider(Provider): | ||
def update_infra( | ||
self, | ||
project: str, | ||
tables_to_delete: Sequence[Union[FeatureTable, FeatureView]], | ||
tables_to_keep: Sequence[Union[FeatureTable, FeatureView]], | ||
entities_to_delete: Sequence[Entity], | ||
entities_to_keep: Sequence[Entity], | ||
partial: bool, | ||
): | ||
pass | ||
|
||
def teardown_infra( | ||
self, | ||
project: str, | ||
tables: Sequence[Union[FeatureTable, FeatureView]], | ||
entities: Sequence[Entity], | ||
): | ||
pass | ||
|
||
def online_write_batch( | ||
self, | ||
project: str, | ||
table: Union[FeatureTable, FeatureView], | ||
data: List[ | ||
Tuple[EntityKeyProto, Dict[str, ValueProto], datetime, Optional[datetime]] | ||
], | ||
progress: Optional[Callable[[int], Any]], | ||
) -> None: | ||
pass | ||
|
||
def materialize_single_feature_view( | ||
self, | ||
feature_view: FeatureView, | ||
start_date: datetime, | ||
end_date: datetime, | ||
registry: Registry, | ||
project: str, | ||
) -> None: | ||
pass | ||
|
||
@staticmethod | ||
def get_historical_features( | ||
config: RepoConfig, | ||
feature_views: List[FeatureView], | ||
feature_refs: List[str], | ||
entity_df: Union[pandas.DataFrame, str], | ||
registry: Registry, | ||
project: str, | ||
) -> RetrievalJob: | ||
pass | ||
|
||
def online_read( | ||
self, | ||
project: str, | ||
table: Union[FeatureTable, FeatureView], | ||
entity_keys: List[EntityKeyProto], | ||
) -> List[Tuple[Optional[datetime], Optional[Dict[str, ValueProto]]]]: | ||
pass | ||
|
||
def __init__(self, config, repo_path): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters