-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: Allow online store only FeatureGroups #2015
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
|
@@ -290,7 +290,7 @@ class FeatureGroup: | |
|
||
def create( | ||
self, | ||
s3_uri: str, | ||
s3_uri: Union[str, bool], | ||
record_identifier_name: str, | ||
event_time_feature_name: str, | ||
role_arn: str, | ||
|
@@ -305,7 +305,8 @@ def create( | |
"""Create a SageMaker FeatureStore FeatureGroup. | ||
|
||
Args: | ||
s3_uri (str): S3 URI of the offline store. | ||
s3_uri (Union[str, bool]): S3 URI of the offline store, set to | ||
``False`` to disable offline store. | ||
record_identifier_name (str): name of the record identifier feature. | ||
event_time_feature_name (str): name of the event time feature. | ||
role_arn (str): ARN of the role used to call CreateFeatureGroup. | ||
|
@@ -342,15 +343,18 @@ def create( | |
create_feature_store_args.update({"online_store_config": online_store_config.to_dict()}) | ||
|
||
# offline store configuration | ||
s3_storage_config = S3StorageConfig(s3_uri=s3_uri) | ||
if offline_store_kms_key_id: | ||
s3_storage_config.kms_key_id = offline_store_kms_key_id | ||
offline_store_config = OfflineStoreConfig( | ||
s3_storage_config=s3_storage_config, | ||
disable_glue_table_creation=disable_glue_table_creation, | ||
data_catalog_config=data_catalog_config, | ||
) | ||
create_feature_store_args.update({"offline_store_config": offline_store_config.to_dict()}) | ||
if s3_uri: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the type differences are a bit odd, since |
||
s3_storage_config = S3StorageConfig(s3_uri=s3_uri) | ||
if offline_store_kms_key_id: | ||
s3_storage_config.kms_key_id = offline_store_kms_key_id | ||
offline_store_config = OfflineStoreConfig( | ||
s3_storage_config=s3_storage_config, | ||
disable_glue_table_creation=disable_glue_table_creation, | ||
data_catalog_config=data_catalog_config, | ||
) | ||
create_feature_store_args.update( | ||
{"offline_store_config": offline_store_config.to_dict()} | ||
) | ||
|
||
return self.sagemaker_session.create_feature_group(**create_feature_store_args) | ||
|
||
|
@@ -367,7 +371,9 @@ def describe(self, next_token: str = None) -> Dict[str, Any]: | |
Returns: | ||
Response dict from the service. | ||
""" | ||
return self.sagemaker_session.describe_feature_group(self.name, next_token) | ||
return self.sagemaker_session.describe_feature_group( | ||
feature_group_name=self.name, next_token=next_token | ||
) | ||
|
||
def load_feature_definitions( | ||
self, | ||
|
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 be better if it were set to
None
or""
?