示例#1
0
test_dir = os.getcwd()

# Build targets
test_suite.Build(version_dir, test_dir, targets, fout)

# start the wtachdog timer that will stop the test in case
# something goes wrong with the tests and they deadlock
t = threading.Timer(120, test_suite.ExpireTest, "allkn", fout)

# Start the tests
for directory in bin_dir.values():
    allkn1=directory+"/allkn --references_in="+\
        dataset_dir+"/random/random_1kx6.txt "+       \
        " --k_neighbors=5"
    os.system(allkn1 + " 2>&1 > temp")
    if (test_suite.EvaluateRun("temp", [], [])) == True:
        print >> fout, allkn1, "SUCCESS"
    else:
        print >> fout, allkn1, "FAILED"
        print allkn1, "FAILED"
    os.remove("temp")

    allkn2=directory+"/allkn --references_in="+ \
           dataset_dir+"/random/random_1kx6.txt "+     \
           " --k_neighbors=5 "+                  \
           " --distances_out=distances.txt "+    \
           " --indices_out=indices.txt"
    os.system(allkn2 + " 2>&1 > temp")
    if (test_suite.EvaluateRun("temp", ["distances.txt", "indices.txt"],
                               [])) == True:
        print >> fout, allkn2, "SUCCESS"
示例#2
0
for directory in bin_dir.values():
    mtsp1=directory+"/mtsp --references_augmented_data_in="+       \
        dataset_dir+"/mtsp/augmented.pb "     +       \
        "--queries_augmented_data_in="+                           \
        dataset_dir+"/climate.com/data/augmented_prediction.pb "+ \
        " --svd:svd_rank=2 "+                                     \
        " --svd:algorithm=covariance "+                           \
        " --timestamp_attribute=3 "+                              \
        " --references_in="+ dataset_dir=+"/mtsp/training.pb "+ \
        " --window=10 "+                                          \
        " --summary=svd "+                                        \
        " --time_lag=3 "+                                         \
        " --run_mode=train "+                                     \
        " --fixed_bw=0:10,10:1,2:2,3:2,3:5,4:1,5:1,6:1"

    os.system(mtsp + " 2>&1 > temp")
    if (test_suite.EvaluateRun("temp", [], [])) == True:
        print >> fout, mtsp1, "SUCCESS"
    else:
        print >> fout, mtsp1, "FAILED"
        print ams1, "FAILED"
    os.remove("temp")
    if os.path.exists("clusters") == True:
        os.remove("clusters")
    if os.path.exists("memberships") == True:
        os.remove("memberships")

print >> fout, "[mtsp] Test finished"
fout.close()
t.cancel()
示例#3
0
# start the wtachdog timer that will stop the test in case
# something goes wrong with the tests and they deadlock
t = threading.Timer(120, test_suite.ExpireTest, "svm", fout)

# Start the tests
for directory in bin_dir.values():
    svm1=directory+"/svm --references_in="\
        +dataset_dir+"/uci/adult_train_transformed_stratified_6k.txt "\
        + "--bandwidth=2 "                                            \
        + "--regularization=0.5 "                                     \
        + "--bandwidth_overload_factor=1.2 "                          \
        + "--iterations=1 "                                           \
        + "--support_vectors_out=support_vectors "                    \
        + "--alphas_out=alphas"
    os.system(svm1 + " 2>&1 > temp")
    if (test_suite.EvaluateRun("temp", ["support_vectors", "alphas"],
                               [])) == True:
        print >> fout, svm1, "SUCCESS"
    else:
        print >> fout, svm1, "FAILED"
        print svm1, "FAILED"
    os.remove("temp")
    if os.path.exists("support_vectors") == True:
        os.remove("support_vectors")
    else:
        print svm1, "(support_vectors) FAILED"
    if os.path.exists("alphas") == True:
        os.remove("alphas")
    else:
        print svm1, "(alphas) FAILED"

    svm2=directory+"/svm --references_in=" \