-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jon/fix/experiment-config-init #4543
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change the probability distribution configuration to use percentages, and derive the sum as the denominator for you calculations (incase the sum doesn't add up to 100%).
802a037
to
dd582a1
Compare
CHANGELOG.md
Outdated
@@ -7,6 +7,7 @@ | |||
- added: Paybis sell to debit card | |||
- changed: Change FlipInput styling to make the edit functionality more obvious | |||
- changed: Move asset-specific settings into their own settings page | |||
- fixed: Experiment config generation for more than 2 variants |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed: Write updated experiment configs to disk
and changed: Experiment config probability distribution support percentage based values
src/experimentConfig.ts
Outdated
console.error(`Misconfigured experimentDistribution for: '${key}'`) | ||
} else { | ||
// Distribute the probability of each config value | ||
const totalProbability = variantProbability.reduce((sum, probability) => sum + probability, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this value is a "probability" but instead a denomination
, so that might be a better name because that's what it is for each probability we calculate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume you are referring only to variantDenomination
because total denomination makes no sense
src/experimentConfig.ts
Outdated
if (totalProbability > 101 || totalProbability < 99) { | ||
console.warn(`Config values for ${key} do not add up to 100% +/- 1%`) | ||
} | ||
const distributedProbabilities = variantProbability.map(probability => probability / totalProbability) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Division by zero
isn't handled when it should.
dd582a1
to
c273f30
Compare
c273f30
to
bebe736
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with the added fixup
bebe736
to
6dab471
Compare
/rebase |
The logic was incorrect for checking each bucket of probabilities for 3+ variants
If new values were added to the experiment config, those new values weren't getting stored and the client was regenerating every time
6dab471
to
ad8fdb9
Compare
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
noneRequirements
If you have made any visual changes to the GUI. Make sure you have: