Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CU-8696n7w95: Remove commented code to fix DeID (oversight in PR 490) #502

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading