Skip to content
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

DataPoint.has_bounds implementation correctness #11605

Open
brennie opened this issue Oct 22, 2024 · 2 comments
Open

DataPoint.has_bounds implementation correctness #11605

brennie opened this issue Oct 22, 2024 · 2 comments

Comments

@brennie
Copy link
Member

brennie commented Oct 22, 2024

The DataPoint.has_bounds implementation is:

    def has_bounds(self) -> bool:
        return self.lower and self.upper

which will report false for self.lower = self.upper = 0.

Updating this check to self.lower is not None and self.upper is not None is probably more correct but breaks unit tests. (The log is too long to attach as a comment to this issue.)

This happens because we end up in compute_signficance from here because has_bounds() is now true and the compute_signficance method doesnt expect lower = upper = 0

┆Issue is synchronized with this Jira Task

@brennie
Copy link
Member Author

brennie commented Oct 22, 2024

Test failure log: https://www.pastery.net/nbmzwm/

@brennie
Copy link
Member Author

brennie commented Oct 22, 2024

relevant section:

{'absolute': {'all': [],
E                                                                                                                         'first': {}},
E                                                                                                            'difference': {'control': {'all': [],
E                                                                                                                                       'first': {}},
E                                                                                                                           'variant': {'all': [{'lower': 0.0,
E                                                                                                                                                'point': 0.0,
E                                                                                                                                                'upper': 0.0},
E                                                                                                                                               {'lower': 0.0,
E                                                                                                                                                'point': 0.0,
E                                                                                                                                                'upper': 0.0}],
E                                                                                                                                       'first': {'lower': 0.0,
E                                                                                                                                                 'point': 0.0,
E                                                                                                                                                 'upper': 0.0}}},
E                                                                                                            'relative_uplift': {'control': {'all': [],
E                                                                                                                                            'first': {}},
E                                                                                                                                'variant': {'all': [],
E                                                                                                                                            'first': {}}},
E                                                                                                            'significance': {'control': {'overall': {},
E                                                                                                                                         'weekly': {}},
E   -                                                                                                                         'variant': {'overall': {'1': 'negative'},
E   ?                                                                                                                                                 ---------------
E   
E   +                                                                                                                         'variant': {'overall': {},
E                                                                                                                                         'weekly': {}}}},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant