@@ -2639,7 +2639,7 @@ def tune( # noqa: C901
26392639 warm_start_config (dict): Configuration defining the type of warm start and
26402640 other required configurations.
26412641 max_runtime_in_seconds (int or PipelineVariable): The maximum time in seconds
2642- that a hyperparameter tuning job can run.
2642+ that a training job launched by a hyperparameter tuning job can run.
26432643 completion_criteria_config (sagemaker.tuner.TuningJobCompletionCriteriaConfig): A
26442644 configuration for the completion criteria.
26452645 early_stopping_type (str): Specifies whether early stopping is enabled for the job.
@@ -2894,7 +2894,7 @@ def _map_tuning_config(
28942894 tuning job.
28952895 max_parallel_jobs (int): Maximum number of parallel training jobs to start.
28962896 max_runtime_in_seconds (int or PipelineVariable): The maximum time in seconds
2897- that a hyperparameter tuning job can run.
2897+ that a training job launched by a hyperparameter tuning job can run.
28982898 early_stopping_type (str): Specifies whether early stopping is enabled for the job.
28992899 Can be either 'Auto' or 'Off'. If set to 'Off', early stopping will not be
29002900 attempted. If set to 'Auto', early stopping of some training jobs may happen,
@@ -5097,9 +5097,15 @@ def describe_feature_group(
50975097 return self .sagemaker_client .describe_feature_group (** kwargs )
50985098
50995099 def update_feature_group (
5100- self , feature_group_name : str , feature_additions : Sequence [Dict [str , str ]]
5100+ self ,
5101+ feature_group_name : str ,
5102+ feature_additions : Sequence [Dict [str , str ]] = None ,
5103+ online_store_config : Dict [str , any ] = None ,
51015104 ) -> Dict [str , Any ]:
5102- """Update a FeatureGroup and add new features from the given feature definitions.
5105+ """Update a FeatureGroup
5106+
5107+ either adding new features from the given feature definitions
5108+ or updating online store config
51035109
51045110 Args:
51055111 feature_group_name (str): name of the FeatureGroup to update.
@@ -5108,6 +5114,12 @@ def update_feature_group(
51085114 Response dict from service.
51095115 """
51105116
5117+ if feature_additions is None :
5118+ return self .sagemaker_client .update_feature_group (
5119+ FeatureGroupName = feature_group_name ,
5120+ OnlineStoreConfig = online_store_config ,
5121+ )
5122+
51115123 return self .sagemaker_client .update_feature_group (
51125124 FeatureGroupName = feature_group_name , FeatureAdditions = feature_additions
51135125 )
@@ -5258,6 +5270,7 @@ def put_record(
52585270 self ,
52595271 feature_group_name : str ,
52605272 record : Sequence [Dict [str , str ]],
5273+ ttl_duration : Dict [str , str ] = None ,
52615274 ):
52625275 """Puts a single record in the FeatureGroup.
52635276
@@ -5266,6 +5279,14 @@ def put_record(
52665279 record (Sequence[Dict[str, str]]): list of FeatureValue dicts to be ingested
52675280 into FeatureStore.
52685281 """
5282+
5283+ if ttl_duration :
5284+ return self .sagemaker_featurestore_runtime_client .put_record (
5285+ FeatureGroupName = feature_group_name ,
5286+ Record = record ,
5287+ TtlDuration = ttl_duration ,
5288+ )
5289+
52695290 return self .sagemaker_featurestore_runtime_client .put_record (
52705291 FeatureGroupName = feature_group_name ,
52715292 Record = record ,
@@ -5298,36 +5319,51 @@ def get_record(
52985319 record_identifier_value_as_string : str ,
52995320 feature_group_name : str ,
53005321 feature_names : Sequence [str ],
5322+ expiration_time_response : str = None ,
53015323 ) -> Dict [str , Sequence [Dict [str , str ]]]:
53025324 """Gets a single record in the FeatureGroup.
53035325
53045326 Args:
53055327 record_identifier_value_as_string (str): name of the record identifier.
53065328 feature_group_name (str): name of the FeatureGroup.
53075329 feature_names (Sequence[str]): list of feature names.
5330+ expiration_time_response (str): the field of expiration time response
5331+ to toggle returning of expiresAt.
53085332 """
53095333 get_record_args = {
53105334 "FeatureGroupName" : feature_group_name ,
53115335 "RecordIdentifierValueAsString" : record_identifier_value_as_string ,
53125336 }
53135337
5338+ if expiration_time_response :
5339+ get_record_args ["ExpirationTimeResponse" ] = expiration_time_response
5340+
53145341 if feature_names :
53155342 get_record_args ["FeatureNames" ] = feature_names
53165343
53175344 return self .sagemaker_featurestore_runtime_client .get_record (** get_record_args )
53185345
5319- def batch_get_record (self , identifiers : Sequence [Dict [str , Any ]]) -> Dict [str , Any ]:
5346+ def batch_get_record (
5347+ self ,
5348+ identifiers : Sequence [Dict [str , Any ]],
5349+ expiration_time_response : str = None ,
5350+ ) -> Dict [str , Any ]:
53205351 """Gets a batch of record from FeatureStore.
53215352
53225353 Args:
53235354 identifiers (Sequence[Dict[str, Any]]): list of identifiers to uniquely identify records
53245355 in FeatureStore.
5356+ expiration_time_response (str): the field of expiration time response
5357+ to toggle returning of expiresAt.
53255358
53265359 Returns:
53275360 Response dict from service.
53285361 """
53295362 batch_get_record_args = {"Identifiers" : identifiers }
53305363
5364+ if expiration_time_response :
5365+ batch_get_record_args ["ExpirationTimeResponse" ] = expiration_time_response
5366+
53315367 return self .sagemaker_featurestore_runtime_client .batch_get_record (** batch_get_record_args )
53325368
53335369 def start_query_execution (
0 commit comments