algs_filename = "algorithms.txt" report_filename = "report.html" python_version = "3.7" if len(sys.argv) == 1 else sys.argv[1] if __name__ == "__main__": with open(algs_filename, "r") as file_algs: algs = file_algs.read().split("\n") algs.remove("") print("Confromance testing start") for alg_name in algs: code = subprocess.call([ "./download_tests.sh", "--alg-name", "%s" % (alg_name), "--python-version", "%s" % (python_version) ]) if code: raise SystemExit(1) print(alg_name) alg_log = open("_log_%s.txt" % (alg_name), "w") subprocess.call([ "python", "-m", "daal4py", "-m", "pytest", "-s", "--disable-warnings", "test_%s.py" % (alg_name) ], stdout=alg_log) alg_log.close() make_report(algs_filename=algs_filename, report_filename=report_filename)
report_filename = f"report_{args.device}.html" with open(algs_filename, "r") as file_algs: algs = file_algs.read().split("\n") algs.remove("") print("Confromance testing start") for alg_name in algs: code = subprocess.call( ["./download_tests.sh", "--alg-name", "%s" % (alg_name)]) if code: raise Exception('Error while copying test files') print(alg_name) alg_log = open("_log_%s.txt" % (alg_name), "w") subprocess.call([ "python", "-m", "sklearnex", "run_tests_with_context.py", "-a" "%s" % (alg_name), "-d" "%s" % (args.device) ], stdout=alg_log) alg_log.close() make_report(algs_filename=algs_filename, report_filename=report_filename, device=args.device, consider_fails=args.consider_fails)
def handle_report_event(): firebase_result = firebase_get() response = make_report(firebase_result, report_file_name) emit("report response", str(response)) socketio.sleep(0.2)