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

Side by Side Diff: scripts/slave/recipe_modules/auto_bisect/resources/significantly_different.py

Issue 1610203003: Iteratively increase sample size for good/bad classification. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Fixing bad rebase. Created 4 years, 10 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 unified diff | Download patch
OLDNEW
(Empty)
1 """Launches an anaconda environment to run some scipy hypothesis tests."""
2
3 import json
4 import os
5 import subprocess
6 import sys
7
8 class ScipyNotInstalledError(Exception):
9 pass
10
11 def main(argv, anaconda_path=None):
12 if not anaconda_path:
13 if os.name == 'nt':
14 anaconda_path = r'c:\conda-py-scientific\python.exe'
15 else:
16 anaconda_path = '/opt/conda-py-scientific/bin/python'
17 if not os.path.exists(anaconda_path):
18 raise ScipyNotInstalledError()
19
20 _, list_a, list_b, significance = argv
21
22 inner_script_location = os.path.join(os.path.dirname(os.path.realpath(
23 __file__)), 'significantly_different_inner.py')
24
25 conda_environ = dict(os.environ)
26 del conda_environ["PYTHONPATH"]
Vadim Sh. 2016/02/12 02:01:31 nit: conda_environ.pop("PYTHONPATH", None) Otherw
27
28 return json.loads(subprocess.check_output(
29 [anaconda_path, inner_script_location,list_a, list_b, significance],
30 env=conda_environ))
31
32 if __name__ == '__main__':
33 result = main(sys.argv)
34 if result:
35 print json.dumps(result, indent=4)
36 sys.exit(0)
37 sys.exit(1)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698