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

[BUG] Issues when multithreading with simstring #30

Open
youngbinkim0 opened this issue Dec 11, 2024 · 0 comments
Open

[BUG] Issues when multithreading with simstring #30

youngbinkim0 opened this issue Dec 11, 2024 · 0 comments

Comments

@youngbinkim0
Copy link

Bug Description
I saw that QuickUMLS supports multithreading through the use of unqlite rather than leveldb. However, I noticed that terms are not being returned on the second instance if I run two instances of QuickUMLS referring to the same database. The issue seems to be coming from SimstringDBReader as seen in the example below. How can I ensure that multiple SimstringDBReaders can read the same database? I want to multithread QuickUMLS without having to copy the database multiple times.
 
To Reproduce

import quickumls
simstring_reader = quickumls.toolbox.SimstringDBReader(path="your_path_here/umls-simstring.db", similarity_name="jaccard", threshold=0.9)
simstring_reader.get("diabetes")

When running two instances of this code concurrently, the first one returns ('diabetes',) while the second returns ()

Environment

  • QuickUMLS version [e.g. 1.4]
  • UMLS version [e.g. 2024AA]

Additional Note
Also posted the bug report in the original repo here

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

No branches or pull requests

1 participant