Browse Source

[FIX] add bool check in _check_equal

pull/3/head
troyyyyy 1 year ago
parent
commit
55a56bb706
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      abl/reasoning/kb.py

+ 5
- 1
abl/reasoning/kb.py View File

@@ -88,7 +88,11 @@ class KBBase(ABC):
"""
if logic_result == None:
return False
return abs(logic_result - y) <= self.max_err
if isinstance(logic_result, (int, float)) and isinstance(y, (int, float)):
return abs(logic_result - y) <= self.max_err
else:
return logic_result == y
def revise_at_idx(self, pred_pseudo_label, y, revision_idx):
"""


Loading…
Cancel
Save