Skip to content

Conversation

mart-r
Copy link
Collaborator

@mart-r mart-r commented Oct 15, 2025

When trying to remove a bunch of CUIs at once, the CDB.remove_cui method is quite slow because it's resetting the subnames every time.

The issue is that there's nothing mapping subnames to the CUIs so at removal of a CUI the model can't tell whether / which subnames need to be removed. As such, they're regenerated from scratch every time.

This PR adds a CDB.remove_cuis_bulk method that calls _reset_subnames once instead.

@tomolopolis
Copy link
Member

Copy link
Member

@tomolopolis tomolopolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mart-r mart-r merged commit b48555a into main Oct 15, 2025
20 checks passed
@mart-r mart-r deleted the feat/medcat/CU-869auz1ck-add-bulk-CUI-removal-method-to-CDB branch October 15, 2025 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants