Skip to content

Commit

Permalink
ensure smeagle has prediction
Browse files Browse the repository at this point in the history
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
  • Loading branch information
vsoch committed Jul 30, 2022
1 parent 65032e5 commit 65e340c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions spliced/predict/smeagle/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def test_lib(self, splice, lib, facts_path):
{
"return_code": -1,
"lib": lib,
"prediction": False,
"data": splice.metadata[lib]["missing"],
"message": "Library is missing symbols, so smeagle model would fail.",
}
Expand Down
5 changes: 4 additions & 1 deletion spliced/predict/smeagle/smeagle.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def compatible_test(self, lib, lib_set, lookup, detail=False, out=None):
result = setup.solve(logic_programs=self.compatible_lp)

# Assuming anything missing is failure
res = {"A": lib, "B": lib_set, "prediction": False}
res = {"A": lib, "B": lib_set, "prediction": True}

# Keep a subset of data (missing stuff) for the result
missing = {}
Expand Down Expand Up @@ -128,6 +128,7 @@ def stability_test(
if lib1_res["return_code"] != 0 and lib2_res["return_code"] != 0:
res.update(
{
"prediction": False,
"return_code": -1,
"return_code_original": lib1_res["return_code"],
"return_code_splice": lib2_res["return_code"],
Expand All @@ -142,6 +143,7 @@ def stability_test(
if lib1_res["return_code"] != 0:
res.update(
{
"prediction": False,
"return_code": -1,
"return_code_original": lib1_res["return_code"],
"return_code_splice": lib2_res["return_code"],
Expand All @@ -155,6 +157,7 @@ def stability_test(
if lib2_res["return_code"] != 0:
res.update(
{
"prediction": False,
"return_code": -1,
"return_code_original": lib1_res["return_code"],
"return_code_splice": lib2_res["return_code"],
Expand Down

0 comments on commit 65e340c

Please sign in to comment.