forked from enviPath/enviPy
test fixes
This commit is contained in:
@ -42,9 +42,7 @@ class EnviFormerTest(TestCase):
|
|||||||
threshold = float(0.5)
|
threshold = float(0.5)
|
||||||
data_package_objs = [self.BBD_SUBSET]
|
data_package_objs = [self.BBD_SUBSET]
|
||||||
eval_packages_objs = [self.BBD_SUBSET]
|
eval_packages_objs = [self.BBD_SUBSET]
|
||||||
mod = EnviFormer.create(
|
mod = EnviFormer.create(self.package, data_package_objs, threshold=threshold)
|
||||||
self.package, data_package_objs, eval_packages_objs, threshold=threshold
|
|
||||||
)
|
|
||||||
|
|
||||||
mod.build_dataset()
|
mod.build_dataset()
|
||||||
mod.build_model()
|
mod.build_model()
|
||||||
@ -57,12 +55,9 @@ class EnviFormerTest(TestCase):
|
|||||||
with self.settings(MODEL_DIR=tmpdir):
|
with self.settings(MODEL_DIR=tmpdir):
|
||||||
threshold = float(0.5)
|
threshold = float(0.5)
|
||||||
data_package_objs = [self.BBD_SUBSET]
|
data_package_objs = [self.BBD_SUBSET]
|
||||||
eval_packages_objs = [self.BBD_SUBSET]
|
|
||||||
mods = []
|
mods = []
|
||||||
for _ in range(4):
|
for _ in range(4):
|
||||||
mod = EnviFormer.create(
|
mod = EnviFormer.create(self.package, data_package_objs, threshold=threshold)
|
||||||
self.package, data_package_objs, eval_packages_objs, threshold=threshold
|
|
||||||
)
|
|
||||||
mod.build_dataset()
|
mod.build_dataset()
|
||||||
mod.build_model()
|
mod.build_model()
|
||||||
mods.append(mod)
|
mods.append(mod)
|
||||||
|
|||||||
@ -72,7 +72,6 @@ class ModelTest(TestCase):
|
|||||||
self.package,
|
self.package,
|
||||||
rule_package_objs,
|
rule_package_objs,
|
||||||
data_package_objs,
|
data_package_objs,
|
||||||
eval_packages_objs,
|
|
||||||
threshold=threshold,
|
threshold=threshold,
|
||||||
name="ECC - BBD - 0.5",
|
name="ECC - BBD - 0.5",
|
||||||
description="Created MLRelativeReasoning in Testcase",
|
description="Created MLRelativeReasoning in Testcase",
|
||||||
@ -84,9 +83,7 @@ class ModelTest(TestCase):
|
|||||||
|
|
||||||
mod.build_dataset()
|
mod.build_dataset()
|
||||||
mod.build_model()
|
mod.build_model()
|
||||||
mod.multigen_eval = True
|
mod.evaluate_model(True, eval_packages_objs, n_splits=2)
|
||||||
mod.save()
|
|
||||||
mod.evaluate_model(n_splits=2)
|
|
||||||
|
|
||||||
results = mod.predict("CCN(CC)C(=O)C1=CC(=CC=C1)C")
|
results = mod.predict("CCN(CC)C(=O)C1=CC(=CC=C1)C")
|
||||||
|
|
||||||
@ -103,7 +100,6 @@ class ModelTest(TestCase):
|
|||||||
self.package,
|
self.package,
|
||||||
rule_package_objs,
|
rule_package_objs,
|
||||||
data_package_objs,
|
data_package_objs,
|
||||||
eval_packages_objs,
|
|
||||||
threshold=threshold,
|
threshold=threshold,
|
||||||
min_count=5,
|
min_count=5,
|
||||||
max_count=0,
|
max_count=0,
|
||||||
@ -113,8 +109,6 @@ class ModelTest(TestCase):
|
|||||||
|
|
||||||
mod.build_dataset()
|
mod.build_dataset()
|
||||||
mod.build_model()
|
mod.build_model()
|
||||||
mod.multigen_eval = True
|
mod.evaluate_model(True, eval_packages_objs, n_splits=2)
|
||||||
mod.save()
|
|
||||||
mod.evaluate_model(n_splits=2)
|
|
||||||
|
|
||||||
results = mod.predict("CCN(CC)C(=O)C1=CC(=CC=C1)C")
|
results = mod.predict("CCN(CC)C(=O)C1=CC(=CC=C1)C")
|
||||||
|
|||||||
Reference in New Issue
Block a user