Skip to content

Commit

Permalink
diskcache: update eviction policy to none
Browse files Browse the repository at this point in the history
  • Loading branch information
mam10eks committed Sep 18, 2024
1 parent f6654e4 commit a27e548
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ir_axioms/axiom/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def _key(
document2: RankedDocument
) -> str:
return (
f"{self.axiom!r},{context!r},"
f"{self.axiom!r},{context},"
f"{query.title},{document1.id},{document2.id}"
)

Expand Down
3 changes: 2 additions & 1 deletion ir_axioms/backend/pyterrier/transformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ class AxiomaticPreferences(AxiomTransformer):
description = "Computing query axiom preferences"

axioms: Sequence[AxiomLike]
index: Union[Index, IndexRef, Path, str]
index: Optional[Union[Index, IndexRef, Path, str]] = None
context: Optional[IndexContext] = None
axiom_names: Optional[Sequence[str]] = None
dataset: Optional[Union[Dataset, str, IRDSDataset]] = None
contents_accessor: Optional[ContentsAccessor] = "text"
Expand Down
2 changes: 1 addition & 1 deletion ir_axioms/model/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class IndexContext(ABC):
def cache(self) -> Optional[Cache]:
if self.cache_dir is None:
return None
return Cache(str(self.cache_dir.absolute()))
return Cache(str(self.cache_dir.absolute()), eviction_policy='none')

@property
@abstractmethod
Expand Down

0 comments on commit a27e548

Please sign in to comment.