8484 CountTimestampMixedEvictionPolicy ,
8585 data_type_to_sparse_type ,
8686 FeatureL2NormBasedEvictionPolicy ,
87+ FeatureScoreBasedEvictionPolicy ,
8788 NoEvictionPolicy ,
8889 pooling_type_to_pooling_mode ,
8990 TimestampBasedEvictionPolicy ,
@@ -235,6 +236,9 @@ def _populate_zero_collision_tbe_params(
235236 counter_thresholds = [0 ] * len (config .embedding_tables )
236237 ttls_in_mins = [0 ] * len (config .embedding_tables )
237238 counter_decay_rates = [0.0 ] * len (config .embedding_tables )
239+ feature_score_counter_decay_rates = [0.0 ] * len (config .embedding_tables )
240+ max_training_id_num_per_table = [0 ] * len (config .embedding_tables )
241+ target_eviction_percent_per_table = [0.0 ] * len (config .embedding_tables )
238242 l2_weight_thresholds = [0.0 ] * len (config .embedding_tables )
239243 eviction_strategy = - 1
240244 table_names = [table .name for table in config .embedding_tables ]
@@ -251,6 +255,20 @@ def _populate_zero_collision_tbe_params(
251255 raise ValueError (
252256 f"Do not support multiple eviction strategy in one tbe { eviction_strategy } and 1 for tables { table_names } "
253257 )
258+ elif isinstance (policy_t , FeatureScoreBasedEvictionPolicy ):
259+ feature_score_counter_decay_rates [i ] = policy_t .decay_rate
260+ max_training_id_num_per_table [i ] = (
261+ policy_t .max_training_id_num_per_rank
262+ )
263+ target_eviction_percent_per_table [i ] = (
264+ policy_t .target_eviction_percent
265+ )
266+ if eviction_strategy == - 1 or eviction_strategy == 5 :
267+ eviction_strategy = 5
268+ else :
269+ raise ValueError (
270+ f"Do not support multiple eviction strategy in one tbe { eviction_strategy } and 5 for tables { table_names } "
271+ )
254272 elif isinstance (policy_t , TimestampBasedEvictionPolicy ):
255273 ttls_in_mins [i ] = policy_t .eviction_ttl_mins
256274 if eviction_strategy == - 1 or eviction_strategy == 0 :
@@ -288,6 +306,9 @@ def _populate_zero_collision_tbe_params(
288306 counter_thresholds = counter_thresholds ,
289307 ttls_in_mins = ttls_in_mins ,
290308 counter_decay_rates = counter_decay_rates ,
309+ feature_score_counter_decay_rates = feature_score_counter_decay_rates ,
310+ max_training_id_num_per_table = max_training_id_num_per_table ,
311+ target_eviction_percent_per_table = target_eviction_percent_per_table ,
291312 l2_weight_thresholds = l2_weight_thresholds ,
292313 meta_header_lens = meta_header_lens ,
293314 )
0 commit comments