[AIMOD-1432] Propagate variant id to content items - #1699
Conversation
|
|
||
| def parse_section_external_id(raw_external_id: str) -> tuple[str, int]: | ||
|
|
||
| def parse_section_variant(raw_external_id: str, source: str) -> tuple[str, int]: |
There was a problem hiding this comment.
This function returns 0/1/5050. Ideally I would know the exact source section for an article in Popular Today. For example, an article could be sampled from Politics or Headlines. I want to know which one is showing up more in Popular Today.
I could make variantId a string. I could then have variantId be:
$section_id-$source-$experiment-name
government-ml-exp5050
or
government-ml-base
or
photojournalism-editorial-base
There was a problem hiding this comment.
An alternative is to add two fields to the telemetry: variant_id and source_section.
Edit: ok the latest commit has that as well.
|
Don't send source section unless Popular Today, the FE should deduce otherwise. Preference is to have source section and variant as separate fields. Don't worry about mapping source section to integer. Do analysis for BQ etc cost of these new fields. |
References
JIRA: AIMOD-1432
Description
Section ExerimentVariantId is now VariantId. VariantId currently handles the base, ml-experiment, and editorial section variants. This variant field is propagated through the sections and to the articles sent to the client. The items in Popular Today have the variant_id from the section the item was sampled from.
The original front-end ticket just mentions variant-id. https://mozilla-hub.atlassian.net/browse/HNT-2716
We should also consider passing through source_section_id. This would give us the full picture of what section caused an impression.
PR Review Checklist
Put an
xin the boxes that apply[DISCO-####], and has the same title (if applicable)[load test: (abort|skip|warn)]keywords are applied to the last commit message (if applicable)┆Issue is synchronized with this Jira Task