5b5fb4c657f0cdf4fe404aa9daaf99aca83d01cf,mltsp/tests/test_flask_app.py,FlaskAppTestCase,test_prediction_proc,#FlaskAppTestCase#,1500

Before Change


                                        "TEMP_TEST01"}).run(conn)
            r.table("predictions").insert({"id": "TEMP_TEST01"}).run(conn)
            fa.prediction_proc(
                pjoin(config["paths"]["upload_folder"], "TESTRUN_215153.dat"),
                "TEMP_TEST01", "TEMP_TEST01", "RandomForestClassifier",
                "TEMP_TEST01", "TEMP_TEST01",
                metadata_file=pjoin(config["paths"]["upload_folder"],
                                    "TESTRUN_215153_metadata.dat"))

            entry = r.table("predictions").get("TEMP_TEST01").run(conn)
            pred_results_dict = entry
            classes = np.array([el[0] for el in
                                pred_results_dict["pred_results_dict"]["TESTRUN_215153"]],
                               dtype="U")
            assert all(c in ["class1", "class2", "class3"] for c in classes)

            assert all(key in pred_results_dict for key in \
                       ("ts_data_dict", "features_dict"))
            for fpath in [pjoin(config["paths"]["upload_folder"], "TESTRUN_215153.dat"),
                          pjoin(config["paths"]["upload_folder"],
                                "TESTRUN_215153_metadata.dat"),
                          pjoin(config["paths"]["features_folder"],
                                "TEMP_TEST01_featureset.nc"),
                          pjoin(config["paths"]["models_folder"], "TEMP_TEST01.pkl"),
                          pjoin(config["paths"]["custom_feature_script_folder"],
                                "TESTRUN_CF.py")]:
                try:
                    os.remove(fpath)
                except Exception as e:

After Change


            fa.app.preprocess_request()
            conn = fa.g.rdb_conn

            ts_paths, custom_script_path = prediction_setup()

            rdb.table("features").insert({"id": "test",
                                        "name": "test",
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: cesium-ml/cesium
Commit Name: 5b5fb4c657f0cdf4fe404aa9daaf99aca83d01cf
Time: 2016-02-24
Author: brettnaul@gmail.com
File Name: mltsp/tests/test_flask_app.py
Class Name: FlaskAppTestCase
Method Name: test_prediction_proc


Project Name: cesium-ml/cesium
Commit Name: 5b5fb4c657f0cdf4fe404aa9daaf99aca83d01cf
Time: 2016-02-24
Author: brettnaul@gmail.com
File Name: mltsp/tests/test_flask_app.py
Class Name: FlaskAppTestCase
Method Name: test_prediction_proc


Project Name: cesium-ml/cesium
Commit Name: 5b5fb4c657f0cdf4fe404aa9daaf99aca83d01cf
Time: 2016-02-24
Author: brettnaul@gmail.com
File Name: mltsp/tests/test_flask_app.py
Class Name: FlaskAppTestCase
Method Name: test_featurize_proc


Project Name: cesium-ml/cesium
Commit Name: 5b5fb4c657f0cdf4fe404aa9daaf99aca83d01cf
Time: 2016-02-24
Author: brettnaul@gmail.com
File Name: mltsp/tests/test_flask_app.py
Class Name: FlaskAppTestCase
Method Name: test_prediction_page