Skip to content

Commit 337fbbf

Browse files
EddyLXJfacebook-github-bot
authored andcommitted
support metadata mask for feature score eviction
Differential Revision: D80131015
1 parent 4c92c18 commit 337fbbf

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

torchrec/modules/embedding_configs.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,13 @@ class FeatureScoreBasedEvictionPolicy(VirtualTableEvictionPolicy):
212212
decay_rate: float = 0.99 # default decay by default #TODO: Change to real value
213213
max_training_id_num_per_rank: int = 0 # max number of training ids per rank
214214
target_eviction_percent: float = 0.0 # target eviction percent
215+
inference_eviction_feature_score_threshold: Optional[float] = (
216+
None # 0 means no eviction
217+
)
218+
219+
def __post_init__(self) -> None:
220+
if self.inference_eviction_feature_score_threshold is None:
221+
self.inference_eviction_feature_score_threshold = 0
215222

216223

217224
@dataclass

0 commit comments

Comments
 (0)