Skip to content

Commit

Permalink
fix search callback
Browse files Browse the repository at this point in the history
  • Loading branch information
fschlatt committed Dec 16, 2024
1 parent dde4881 commit 2f996b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lightning_ir/callbacks/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ def _get_searcher(self, trainer: Trainer, pl_module: BiEncoderModule, dataset_id
dataset = dataloaders[dataset_idx].dataset

index_dir = self._get_index_dir(pl_module, dataset)
if self.searcher is not None and self.searcher.index_dir == index_dir:
if getattr(self, "searcher", None) is not None and self.searcher.index_dir == index_dir:
return self.searcher

searcher = self.search_config.search_class(index_dir, self.search_config, pl_module, self.use_gpu)
Expand Down

0 comments on commit 2f996b8

Please sign in to comment.