Skip to content

Commit fc20ef7

Browse files
authored
update (#1352)
1 parent b6aa70c commit fc20ef7

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

merino/curated_recommendations/ml_backends/static_local_model.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -303,16 +303,20 @@ def _get_section(section_name: str, thresholds: list[float]) -> InterestVectorCo
303303
)
304304

305305
def _build_local(
306-
self, model_id, surface_id, small_experiment=False
306+
self, model_id, surface_id, small_experiment=False, include_local_reranking=False
307307
) -> InferredLocalModel | None:
308308
model_thresholds = THRESHOLDS_V3_NORMALIZED
309309
private_features: list[str] | None = None
310310

311-
section_features = {
312-
a: self._get_section(a, model_thresholds)
313-
for a in BASE_SECTIONS_FOR_LOCAL_MODEL
314-
if a not in self.limited_topics_set
315-
}
311+
section_features = (
312+
{
313+
a: self._get_section(a, model_thresholds)
314+
for a in BASE_SECTIONS_FOR_LOCAL_MODEL
315+
if a not in self.limited_topics_set
316+
}
317+
if include_local_reranking
318+
else {}
319+
)
316320

317321
private_features = self.v3_limited_topics + [TIME_ZONE_OFFSET_INFERRED_KEY]
318322

merino/curated_recommendations/rankers/contextual_ranker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
# we're looking at are total impressions and we care about impressions with the inferred interests. When
3535
# contexual is rolled out we can use a dynamic computed value based on daily impressions.
3636

37-
CONTEXUAL_AVG_BETA_VALUE = 4000
37+
CONTEXUAL_AVG_BETA_VALUE = 12000
3838

3939
logger = logging.getLogger(__name__)
4040

0 commit comments

Comments
 (0)