You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ArgumentError: Paramters must be greater than zero. [sic] #655
In #calc_simulated_conversion_rates, beta is passed to RubyStats::BetaDistribution.
BetaDistribution#initialize requires beta > 0 and raises an exception.
Assuming there is no bug in the logic here, a good resolution might be to only call experiment.calc_winning_alternatives within dashboard/views/_experiment.erb if it will succeed.
changed the title [-]ArgumentError: Paramters must be greater than zero.[/-][+]ArgumentError: Paramters must be greater than zero. [sic][/+]on Mar 26, 2021
Hi there, yeah, it's probably related to that. BetaDistribution requires > 0.
As the participation_count should not be less than the completed count. At first, the solution was to ensure the participation_count was also increased when someone forced that alternative. But then I reworked that on #637 in order to not take admin into metrics. So, it should not be possible to get into the same problem on v4.
But that still leaves a problem where the counts on alternatives may already be wrong.
I can make a patch to avoid running the BetaDistribution in such situations and think about how I can warn users about this on the dashboard.
For now, you could alternative.participant_count = completion_count for the alternatives where the 'conversions' is greater than that. WDYT?
Interesting. I’m not sure how I got my database into such a state but clearing Redis seems to have done the trick.
If it’s always the case that participation_count >= completion_count then I’d personally prefer some kind of error describing which “impossible” thing happened so that I could fix it. But as you seem to have made this situation far less likely, it might not be worth the effort. Perhaps a guard and error log surrounding the call to BetaDistribution will suffice? If so I’m happy to provide a PR.
Activity
[-]ArgumentError: Paramters must be greater than zero.[/-][+]ArgumentError: Paramters must be greater than zero. [sic][/+]lrworth commentedon Mar 26, 2021
I get a very similar problem with
split-3.4.1. Perhaps I'm using it incorrectly?lrworth commentedon Mar 26, 2021
Probably related to #563.
andrehjr commentedon Mar 27, 2021
Hi there, yeah, it's probably related to that. BetaDistribution requires > 0.
As the participation_count should not be less than the completed count. At first, the solution was to ensure the participation_count was also increased when someone forced that alternative. But then I reworked that on #637 in order to not take admin into metrics. So, it should not be possible to get into the same problem on v4.
But that still leaves a problem where the counts on alternatives may already be wrong.
I can make a patch to avoid running the BetaDistribution in such situations and think about how I can warn users about this on the dashboard.
For now, you could
alternative.participant_count = completion_countfor the alternatives where the 'conversions' is greater than that. WDYT?lrworth commentedon Mar 28, 2021
Interesting. I’m not sure how I got my database into such a state but clearing Redis seems to have done the trick.
If it’s always the case that participation_count >= completion_count then I’d personally prefer some kind of error describing which “impossible” thing happened so that I could fix it. But as you seem to have made this situation far less likely, it might not be worth the effort. Perhaps a guard and error log surrounding the call to BetaDistribution will suffice? If so I’m happy to provide a PR.