skip DF examples for previos versions of DAAL
@@ -8,6 +8,8 @@ os.chdir(examples_path)
import unittest
import numpy as np
+from daal import __version__ as dv
+daal_version = tuple(map(int, dv.split('.')))
# let's try to use pandas' fast csv reader
try:
@@ -39,12 +41,14 @@ class Test(unittest.TestCase):
r = result.cosineDistance
self.assertTrue(np.allclose(np.array([[np.amin(r)],[np.amax(r)],[np.mean(r)],[np.average(r)]]), testdata))
+ @unittest.skipIf(daal_version < (2019, 1), "not supported in this library version")
def test_decision_forest_classification_batch(self):
testdata = read_csv(os.path.join(unittest_data_path, "decision_forest_classification_batch.csv"), range(1))
from decision_forest_classification_batch import main as get_results
(_, predict_result, _) = get_results()
self.assertTrue(np.allclose(predict_result.prediction, testdata))
+ @unittest.skipIf(daal_version < (2019, 1), "not supported in this library version")
def test_decision_forest_regression_batch(self):
testdata = read_csv(os.path.join(unittest_data_path, "decision_forest_regression_batch.csv"), range(1))
from decision_forest_regression_batch import main as get_results
