Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(651)

Unified Diff: scripts/slave/recipe_modules/auto_bisect/resources/significantly_different_inner.py

Issue 2247373002: Refactor stages 1, 2 and test_api overhaul. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Addressing all early feedback. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: scripts/slave/recipe_modules/auto_bisect/resources/significantly_different_inner.py
diff --git a/scripts/slave/recipe_modules/auto_bisect/resources/significantly_different_inner.py b/scripts/slave/recipe_modules/auto_bisect/resources/significantly_different_inner.py
deleted file mode 100644
index 72c60047dc3358c085ec518b12b3d640555f1eb7..0000000000000000000000000000000000000000
--- a/scripts/slave/recipe_modules/auto_bisect/resources/significantly_different_inner.py
+++ /dev/null
@@ -1,38 +0,0 @@
-"""This file is meant to be run in an environment where scipy is available."""
-import json
-import logging
-import sys
-
-try:
- from scipy import stats
-except ImportError:
- def main():
- # scipy required, see module docstring.
- logging.warning(sys.modules[__name__].__doc__)
- return 1
-else:
-
- def main():
- if len(sys.argv) < 4:
- return 1
- _, list_a, list_b, significance = sys.argv[:4]
- list_a = json.loads(list_a)
- list_b = json.loads(list_b)
- significance = float(significance)
-
- mann_whitney_p_value = stats.mannwhitneyu(list_a, list_b).pvalue
-
- results = {
- 'first_sample': list_a,
- 'second_sample': list_b,
- 'mann_p_value': mann_whitney_p_value,
- }
-
- results['significantly_different'] = bool(
- float(results['mann_p_value']) < float(significance))
-
- print json.dumps(results)
- return 0
-
-if __name__ == '__main__':
- sys.exit(main())

Powered by Google App Engine
This is Rietveld 408576698