Skip to content

Commit 0a9fbec

Browse files
runs lint for test_dataset_builder
1 parent f34ac66 commit 0a9fbec

File tree

2 files changed

+20
-17
lines changed

2 files changed

+20
-17
lines changed

src/sagemaker/feature_store/dataset_builder.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -299,16 +299,16 @@ def with_feature_group(
299299
will be used as a join key (default: None).
300300
included_feature_names (List[str]): A list of strings representing features to be
301301
included in the output (default: None).
302-
feature_name_in_target (str): A string representing the feature in the target feature group
303-
that will be compared to the target feature in the base feature group. If None is
304-
provided, the record identifier will be used in the join statement. (default: None).
305-
join_comparator (JoinComparatorEnum): A JoinComparatorEnum representing the comparator used
306-
when joining the target feature in the base feature group and the feature in the target
307-
feature group (default: None).
308-
join_type (JoinTypeEnum): A JoinTypeEnum representing the type of join between the base and
309-
target feature groups. (default: None).
310-
Returns:
311-
This DatasetBuilder object.
302+
feature_name_in_target (str): A string representing the feature in the target feature group
303+
that will be compared to the target feature in the base feature group. If None is
304+
provided, the record identifier will be used in the join statement. (default: None).
305+
join_comparator (JoinComparatorEnum): A JoinComparatorEnum representing the comparator used
306+
when joining the target feature in the base feature group and the feature in the target
307+
feature group (default: None).
308+
join_type (JoinTypeEnum): A JoinTypeEnum representing the type of join between the base and
309+
target feature groups. (default: None).
310+
Returns:
311+
This DatasetBuilder object.
312312
"""
313313
self._feature_groups_to_be_merged.append(
314314
construct_feature_group_to_be_merged(

tests/unit/sagemaker/feature_store/test_dataset_builder.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,15 @@ def test_with_feature_group_with_additional_params(sagemaker_session_mock):
163163
{"FeatureName": "feature-2", "FeatureType": "String"},
164164
],
165165
}
166-
dataset_builder.with_feature_group(feature_group, "target-feature", [
167-
"feature-1", "feature-2"], join_comparator=JoinComparatorEnum.LESS_THAN, join_type=JoinTypeEnum.LEFT_JOIN, feature_name_in_target='feature-2')
168-
166+
dataset_builder.with_feature_group(
167+
feature_group,
168+
"target-feature",
169+
["feature-1", "feature-2"],
170+
join_comparator=JoinComparatorEnum.LESS_THAN,
171+
join_type=JoinTypeEnum.LEFT_JOIN,
172+
feature_name_in_target="feature-2",
173+
)
174+
169175
assert len(dataset_builder._feature_groups_to_be_merged) == 1
170176
assert dataset_builder._feature_groups_to_be_merged[0].features == [
171177
"feature-1",
@@ -189,10 +195,7 @@ def test_with_feature_group_with_additional_params(sagemaker_session_mock):
189195
dataset_builder._feature_groups_to_be_merged[0].event_time_identifier_feature.feature_type
190196
== FeatureTypeEnum.STRING
191197
)
192-
assert (
193-
dataset_builder._feature_groups_to_be_merged[0].join_type
194-
== JoinTypeEnum.LEFT_JOIN
195-
)
198+
assert dataset_builder._feature_groups_to_be_merged[0].join_type == JoinTypeEnum.LEFT_JOIN
196199
assert (
197200
dataset_builder._feature_groups_to_be_merged[0].join_comparator
198201
== JoinComparatorEnum.LESS_THAN

0 commit comments

Comments
 (0)