Skip to content

Commit

Permalink
CU-8696n7w95: Remove commented code to fix DeID (oversight in PR 490) (
Browse files Browse the repository at this point in the history
  • Loading branch information
mart-r authored Nov 15, 2024
1 parent c0082ef commit df3df66
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions medcat/ner/transformers_ner.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ def create_eval_pipeline(self):
# NOTE: this will fix the DeID model(s) created before medcat 1.9.3
# though this fix may very well be unstable
self.ner_pipe.tokenizer._in_target_context_manager = False
# if not hasattr(self.ner_pipe.tokenizer, 'split_special_tokens'):
# # NOTE: this will fix the DeID model(s) created with transformers before 4.42
# # and allow them to run with later transforemrs
# self.ner_pipe.tokenizer.split_special_tokens = False
if not hasattr(self.ner_pipe.tokenizer, 'split_special_tokens'):
# NOTE: this will fix the DeID model(s) created with transformers before 4.42
# and allow them to run with later transforemrs
self.ner_pipe.tokenizer.split_special_tokens = False
self.ner_pipe.device = self.model.device
self._consecutive_identical_failures = 0
self._last_exception: Optional[Tuple[str, Type[Exception]]] = None
Expand Down

0 comments on commit df3df66

Please sign in to comment.