-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FeatureStore, FeatureView, Config, and BIgQuerySource classes for updated SDK #1364
Conversation
Signed-off-by: Jacob Klegar <jacob@tecton.ai>
/kind feature |
sdk/python/feast/big_query_source.py
Outdated
field_mapping: Optional[Dict[str, str]], | ||
query: Optional[str], | ||
): | ||
assert (table_ref is None) != (query is None), "Exactly one of table_ref and query should be specified" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nitpick, but generally I think we should avoid using assert for errors that we expect users will make in lieu of normal exceptions
Assert should normally be used for impossible to reach situations.
sdk/python/feast/feature_store.py
Outdated
self.config = Config.from_config_path(config_path) | ||
else: | ||
self.config = Config() | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need a return here?
): | ||
self.provider = provider if (provider is not None) else "local" | ||
self.online_store = online_store if (online_store is not None) else "local" | ||
self.metadata_store = metadata_store if (metadata_store is not None) else join(expanduser("~"), ".feast", "metadata_store") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to rather use the project repository as the local metadata store location? Using a shared folder across multiple projects seems like it can cause problems.
Signed-off-by: Jacob Klegar <jacob@tecton.ai>
Signed-off-by: Jacob Klegar <jacob@tecton.ai>
|
||
class Config: | ||
""" | ||
Python representation of the FeatureStore config that the user can specify via a yaml file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: If the user doesnt know what the yaml file is then this comment doesnt add value. How about Configuration object that contains all possible configuration options for a FeatureStore
?
sdk/python/feast/feature_view.py
Outdated
|
||
class FeatureView: | ||
""" | ||
Represents a collection of features that will be served online. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could in theory also have batch only users. How about A FeatureView defines a logical grouping of servable features
?
Signed-off-by: Jacob Klegar <jacob@tecton.ai>
) | ||
|
||
@classmethod | ||
def from_config_path(cls, config_path: str): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from_path
perhaps?
Signed-off-by: Jacob Klegar <jacob@tecton.ai>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jklegar, woop The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
Signed-off-by: Jacob Klegar jacob@tecton.ai
What this PR does / why we need it: Scaffold classes for updated SDK; FeatureStore will replace the Client class but these are currently just mostly-empty classes.
Which issue(s) this PR fixes:
Fixes #
Does this PR introduce a user-facing change?: