Skip to content

Commit 8df5817

Browse files
authored
Merge pull request #19 from ShumzZzZz/hp-related-feature-objects
hp-related-feature-objects
2 parents 29d89db + eee16e6 commit 8df5817

File tree

5 files changed

+36
-599
lines changed

5 files changed

+36
-599
lines changed

devour_feature_store/category_item_ranking/feature_services.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,8 @@
1818
)
1919

2020
fs_test_v1 = FeatureService(
21-
name="fs_test_v2", features=[fv_push_user_propensity_score]
22-
)
21+
name="fs_test_v2",
22+
features=[
23+
fv_push_user_propensity_score
24+
]
25+
)

devour_feature_store/common/data_sources.py

Lines changed: 12 additions & 270 deletions
Original file line numberDiff line numberDiff line change
@@ -14,280 +14,22 @@
1414
)
1515

1616

17-
ds_file_product_bestseller_ethnicity_tag = FileSource(
18-
name="ds_file_product_bestseller_ethnicity_tag",
19-
path="data/bestseller_features/product_bestseller_ethnicity_tag.parquet",
20-
file_format=ParquetFormat(),
21-
timestamp_field="event_timestamp",
22-
)
23-
2417
ds_push_product_bestseller_ethnicity_tag = PushSource(
2518
name="ds_push_product_bestseller_ethnicity_tag",
26-
batch_source=ds_file_product_bestseller_ethnicity_tag,
27-
)
28-
29-
30-
ds_file_user_propensity_score = FileSource(
31-
name="ds_file_user_propensity_score",
32-
path="data/bestseller_features/user_propensity_score.parquet",
33-
file_format=ParquetFormat(),
34-
timestamp_field="event_timestamp",
19+
batch_source=FileSource(
20+
name="ds_file_product_bestseller_ethnicity_tag",
21+
path="data/bestseller_features/product_bestseller_ethnicity_tag.parquet",
22+
file_format=ParquetFormat(),
23+
timestamp_field="event_timestamp",
24+
),
3525
)
3626

3727
ds_push_user_propensity_score = PushSource(
3828
name="ds_push_user_propensity_score",
39-
batch_source=ds_file_user_propensity_score,
40-
)
41-
42-
ds_file_buy_it_again_feature_group = FileSource(
43-
name="ds_file_buy_it_again_feature_group",
44-
path="s3://sagemaker-us-west-2-551230544614/featurestore/hp-online-redis-test/buy-it-again-feature-group/",
45-
file_format=ParquetFormat(),
46-
timestamp_field="update_time",
47-
)
48-
49-
ds_push_buy_it_again_feature_group = PushSource(
50-
name="ds_push_buy_it_again_feature_group",
51-
batch_source=ds_file_buy_it_again_feature_group,
52-
)
53-
54-
55-
ds_file_cheap_product_black_list = FileSource(
56-
name="df_file_cheap_product_black_list",
57-
path="s3://sagemaker-us-west-2-551230544614/featurestore/hp-online-redis-test/cheap_product_black_list/",
58-
file_format=ParquetFormat(),
59-
timestamp_field="update_time",
60-
)
61-
62-
ds_push_cheap_product_black_list = PushSource(
63-
name="ds_push_cheap_product_black_list",
64-
batch_source=ds_file_cheap_product_black_list,
65-
)
66-
67-
ds_file_cold_start_retrieval = FileSource(
68-
name="ds_file_cold_start_retrieval",
69-
path="s3://sagemaker-us-west-2-551230544614/featurestore/hp-online-redis-test/cold-start-retrieval/",
70-
file_format=ParquetFormat(),
71-
timestamp_field="update_time",
72-
)
73-
74-
ds_push_cold_start_retrieval = PushSource(
75-
name="ds_push_cold_start_retrieval",
76-
batch_source=ds_file_cold_start_retrieval,
77-
)
78-
79-
ds_file_dssm_retrieval = FileSource(
80-
name="ds_file_dssm_retrieval",
81-
path="s3://sagemaker-us-west-2-551230544614/featurestore/hp-online-redis-test/dssm-retrieval/",
82-
file_format=ParquetFormat(),
83-
timestamp_field="update_time",
84-
)
85-
86-
ds_push_dssm_retrieval = PushSource(
87-
name="ds_push_dssm_retrieval",
88-
batch_source=ds_file_dssm_retrieval,
89-
)
90-
91-
ds_file_grocery_best_seller_v2 = FileSource(
92-
name="ds_file_grocery_best_seller_v2",
93-
path="s3://sagemaker-us-west-2-551230544614/featurestore/hp-online-redis-test/grocery-best-seller-v2/",
94-
file_format=ParquetFormat(),
95-
timestamp_field="update_time",
96-
)
97-
98-
ds_push_grocery_best_seller_v2 = PushSource(
99-
name="ds_push_grocery_best_seller_v2",
100-
batch_source=ds_file_grocery_best_seller_v2,
101-
)
102-
103-
ds_file_local_comp_items = FileSource(
104-
name="ds_file_local_comp_items",
105-
path="s3://sagemaker-us-west-2-551230544614/featurestore/hp-online-redis-test/local-comp-items/",
106-
file_format=ParquetFormat(),
107-
timestamp_field="update_time",
108-
)
109-
110-
ds_push_local_comp_items = PushSource(
111-
name="ds_push_local_comp_items",
112-
batch_source=ds_file_local_comp_items,
113-
)
114-
115-
ds_file_local_imp_discounting = FileSource(
116-
name="ds_file_local_imp_discounting",
117-
path="s3://sagemaker-us-west-2-551230544614/featurestore/hp-online-redis-test/local-imp-discounting/",
118-
file_format=ParquetFormat(),
119-
timestamp_field="update_time",
120-
)
121-
122-
ds_push_local_imp_discounting = PushSource(
123-
name="ds_push_local_imp_discounting",
124-
batch_source=ds_file_local_imp_discounting,
125-
)
126-
127-
ds_file_local_previous_pdp = FileSource(
128-
name="ds_file_local_previous_pdp",
129-
path="s3://sagemaker-us-west-2-551230544614/featurestore/hp-online-redis-test/local-previous-pdp/",
130-
file_format=ParquetFormat(),
131-
timestamp_field="update_time",
132-
)
133-
134-
ds_push_local_previous_pdp = PushSource(
135-
name="ds_push_local_previous_pdp",
136-
batch_source=ds_file_local_previous_pdp,
137-
)
138-
139-
ds_file_local_product_video = FileSource(
140-
name="ds_file_local_product_video",
141-
path="s3://sagemaker-us-west-2-551230544614/featurestore/hp-online-redis-test/local-product-video/",
142-
file_format=ParquetFormat(),
143-
timestamp_field="update_time",
144-
)
145-
146-
ds_push_local_product_video = PushSource(
147-
name="ds_push_local_product_video",
148-
batch_source=ds_file_local_product_video,
149-
)
150-
151-
ds_file_local_sales_org_hero_products = FileSource(
152-
name="ds_file_local_sales_org_hero_products",
153-
path="s3://sagemaker-us-west-2-551230544614/featurestore/hp-online-redis-test/local-sales-org-hero-products/",
154-
file_format=ParquetFormat(),
155-
timestamp_field="update_time",
156-
)
157-
158-
ds_push_local_sales_org_hero_products = PushSource(
159-
name="ds_push_local_sales_org_hero_products",
160-
batch_source=ds_file_local_sales_org_hero_products,
161-
)
162-
163-
ds_file_local_sim_items = FileSource(
164-
name="ds_file_local_sim_items",
165-
path="s3://sagemaker-us-west-2-551230544614/featurestore/hp-online-redis-test/local-sim-items/",
166-
file_format=ParquetFormat(),
167-
timestamp_field="update_time",
168-
)
169-
170-
ds_push_local_sim_items = PushSource(
171-
name="ds_push_local_sim_items",
172-
batch_source=ds_file_local_sim_items,
173-
)
174-
175-
ds_file_long_term_buy_again_retrieval = FileSource(
176-
name="ds_file_long_term_buy_again_retrieval",
177-
path="s3://sagemaker-us-west-2-551230544614/featurestore/hp-online-redis-test/long-term-buy-again-retrieval/",
178-
file_format=ParquetFormat(),
179-
timestamp_field="update_time",
180-
)
181-
182-
ds_push_long_term_buy_again_retrieval = PushSource(
183-
name="ds_push_long_term_buy_again_retrieval",
184-
batch_source=ds_file_long_term_buy_again_retrieval,
185-
)
186-
187-
ds_file_masgusto_hp_retrieval = FileSource(
188-
name="ds_file_masgusto_hp_retrieval",
189-
path="s3://sagemaker-us-west-2-551230544614/featurestore/hp-online-redis-test/masgusto-hp-retrieval/",
190-
file_format=ParquetFormat(),
191-
timestamp_field="update_time",
192-
)
193-
194-
ds_push_masgusto_hp_retrieval = PushSource(
195-
name="ds_push_masgusto_hp_retrieval",
196-
batch_source=ds_file_masgusto_hp_retrieval,
197-
)
198-
199-
ds_file_new_product_retrieval = FileSource(
200-
name="ds_file_new_product_retrieval",
201-
path="s3://sagemaker-us-west-2-551230544614/featurestore/hp-online-redis-test/new-product-retrieval/",
202-
file_format=ParquetFormat(),
203-
timestamp_field="update_time",
204-
)
205-
206-
ds_push_new_product_retrieval = PushSource(
207-
name="ds_push_new_product_retrieval",
208-
batch_source=ds_file_new_product_retrieval,
209-
)
210-
211-
ds_file_newuser_search_keyword = FileSource(
212-
name="ds_file_newuser_search_keyword",
213-
path="s3://sagemaker-us-west-2-551230544614/featurestore/hp-online-redis-test/newuser-search-keyword/",
214-
file_format=ParquetFormat(),
215-
timestamp_field="update_time", # TODO EventTime
216-
)
217-
218-
ds_push_newuser_search_keyword = PushSource(
219-
name="ds_push_newuser_search_keyword",
220-
batch_source=ds_file_newuser_search_keyword,
221-
)
222-
223-
ds_file_on_sale_personalized_ranking = FileSource(
224-
name="ds_file_on_sale_personalized_ranking",
225-
path="s3://sagemaker-us-west-2-551230544614/featurestore/hp-online-redis-test/on-sale-personalized-ranking/",
226-
file_format=ParquetFormat(),
227-
timestamp_field="update_time",
228-
)
229-
230-
ds_push_on_sale_personalized_ranking = PushSource(
231-
name="ds_push_on_sale_personalized_ranking",
232-
batch_source=ds_file_on_sale_personalized_ranking,
233-
)
234-
235-
ds_file_product_features_v2 = FileSource(
236-
name="ds_file_product_features_v2",
237-
path="s3://sagemaker-us-west-2-551230544614/featurestore/hp-online-redis-test/product-features-v2/",
238-
file_format=ParquetFormat(),
239-
timestamp_field="update_time",
240-
)
241-
242-
ds_push_product_features_v2 = PushSource(
243-
name="ds_push_product_features_v2",
244-
batch_source=ds_file_product_features_v2,
245-
)
246-
247-
ds_file_secondary_store_rfy = FileSource(
248-
name="ds_file_secondary_store_rfy",
249-
path="s3://sagemaker-us-west-2-551230544614/featurestore/hp-online-redis-test/secondary-store-rfy/",
250-
file_format=ParquetFormat(),
251-
timestamp_field="update_time",
252-
)
253-
254-
ds_push_secondary_store_rfy = PushSource(
255-
name="ds_push_secondary_store_rfy",
256-
batch_source=ds_file_secondary_store_rfy,
257-
)
258-
259-
ds_file_topx_retrieval = FileSource(
260-
name="ds_file_topx_retrieval",
261-
path="s3://sagemaker-us-west-2-551230544614/featurestore/hp-online-redis-test/topx-retrieval/",
262-
file_format=ParquetFormat(),
263-
timestamp_field="update_time",
264-
)
265-
266-
ds_push_topx_retrieval = PushSource(
267-
name="ds_push_topx_retrieval",
268-
batch_source=ds_file_topx_retrieval,
269-
)
270-
271-
ds_file_user_in_cart_history = FileSource(
272-
name="ds_file_user_in_cart_history",
273-
path="s3://sagemaker-us-west-2-551230544614/featurestore/hp-online-redis-test/user-in-cart-history/",
274-
file_format=ParquetFormat(),
275-
timestamp_field="update_time", # TODO
276-
)
277-
278-
ds_push_user_in_cart_history = PushSource(
279-
name="ds_push_user_in_cart_history",
280-
batch_source=ds_file_user_in_cart_history,
281-
)
282-
283-
ds_file_waterfall_secondary_product = FileSource(
284-
name="ds_file_waterfall_secondary_product",
285-
path="s3://sagemaker-us-west-2-551230544614/featurestore/hp-online-redis-test/waterfall-secondary-product/",
286-
file_format=ParquetFormat(),
287-
timestamp_field="update_time",
288-
)
289-
290-
ds_push_waterfall_secondary_product = PushSource(
291-
name="ds_push_waterfall_secondary_product",
292-
batch_source=ds_file_waterfall_secondary_product,
29+
batch_source=FileSource(
30+
name="ds_file_user_propensity",
31+
path="data/bestseller_features/user_propensity_score.parquet",
32+
file_format=ParquetFormat(),
33+
timestamp_field="event_timestamp",
34+
),
29335
)

devour_feature_store/common/entities.py

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
value_type=ValueType.INT64,
77
description="User ID",
88
)
9-
109
et_product = Entity(
1110
name="et_product",
1211
join_keys=["product_id"],
@@ -20,52 +19,3 @@
2019
value_type=ValueType.STRING,
2120
description="User Ethnicity",
2221
)
23-
24-
et_ethnicity_product = Entity(
25-
name="et_ethnicity_product",
26-
join_keys=["ethnicity_product"],
27-
value_type=ValueType.STRING,
28-
description="Product Ethnicity",
29-
)
30-
31-
et_use_case = Entity(
32-
name="et_use_case",
33-
join_keys=["use_case_id"],
34-
value_type=ValueType.STRING,
35-
description="Use Case ID",
36-
)
37-
38-
et_lang_store = Entity(
39-
name="et_lang_store",
40-
join_keys=["lang_store"],
41-
value_type=ValueType.STRING,
42-
description="Language + Store ID",
43-
)
44-
45-
et_lang_store_kw = Entity(
46-
name="et_lang_store_kw",
47-
join_keys=["lang_store_kw"],
48-
value_type=ValueType.STRING,
49-
description="Language + Store ID + Keyword",
50-
)
51-
52-
et_store = Entity(
53-
name="et_store",
54-
join_keys=["store"],
55-
value_type=ValueType.STRING,
56-
description="Language | Store ID, such as lang_xxx | store_xxx",
57-
)
58-
59-
et_sales_org = Entity(
60-
name="et_sales_org",
61-
join_keys=["sales_org_id"],
62-
value_type=ValueType.STRING,
63-
description="Sales Org ID",
64-
)
65-
66-
et_prodEth_salesReg = Entity(
67-
name="et_prodEth_salesOrg",
68-
join_keys=["prodethnicity_salesregion"],
69-
value_type=ValueType.STRING,
70-
description="Product Ethnicity + Sales Region ID",
71-
)

0 commit comments

Comments
 (0)