Skip to content

Commit

Permalink
Revert "caching disabled by default"
Browse files Browse the repository at this point in the history
This reverts commit 9a5492e.
  • Loading branch information
LckyLke committed Dec 5, 2024
1 parent 9a5492e commit 19f8bd4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion owlapy/owl_neural_reasoners/owl_neural_reasoner.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def is_valid_entity(text_input: str):

class OWLNeuralReasoner(AbstractNeuralReasoner):
""" OWL Neural Reasoner uses a neural link predictor to retrieve instances of an OWL Class Expression"""
def __init__(self, path_of_kb: str = None, path_neural_embedding: str = None, gamma: float = 0.25, max_cache_size: int = 0):
def __init__(self, path_of_kb: str = None, path_neural_embedding: str = None, gamma: float = 0.25, max_cache_size: int = 2**20):
assert gamma is None or 0 <= gamma <= 1, "Confidence threshold (gamma) must be in the range [0, 1]."
self.gamma = gamma
self._prediction_cache = OrderedDict()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_neural_reasoner_accuracy.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def test_retrieval_performance():
seed = 42
ratio_sample_object_prop = 1.0
ratio_sample_nc = 1.0
num_nominals = 5
num_nominals = 10
min_jaccard_similarity = 1.0
min_f1_score = 1.0

Expand Down

0 comments on commit 19f8bd4

Please sign in to comment.