medspacy icon indicating copy to clipboard operation
medspacy copied to clipboard

medspacy.load(enable) seems to ignore "medspacy_quickumls" in the component list

Open RonWilkinson opened this issue 3 years ago • 10 comments

Please check notebook notebook 11a. Cell 4 attempts to enable a list of components including "medspacy_quickumls". Cell 5 displays the components actually loaded. "medspacy_quickumls" is not among them. If one does a manual medspacy.add_pipe("medspacy_quickumls") afterward, it loads fine, so I think there is a flaw in the enable logic.

RonWilkinson avatar Oct 28 '22 13:10 RonWilkinson

@RonWilkinson Are you running this notebook on Windows? If so, QuickUMLS (and therefore medspacy_quickumls) are not installed by default. Did you run through these steps to install QuickUMLS manually following the medspacy install?

https://github.com/medspacy/medspacy/blob/master/windows_and_quickumls.md

burgersmoke avatar Nov 03 '22 16:11 burgersmoke

I’m running on Linux. In any case, in my note I point out that I a manual add_pipe works when Load(activate) does not. Add_pipe would not work if medspacy_quickumls were not installed.

--Ron

From: Kelly Peterson @.> Sent: Thursday, November 3, 2022 12:54 PM To: medspacy/medspacy @.> Cc: Wilkinson, Ronald @.>; Mention @.> Subject: Re: [medspacy/medspacy] medspacy.load(enable) seems to ignore "medspacy_quickumls" in the component list (Issue #167) [EXTERNAL]

  • External Email - Caution *

@RonWilkinsonhttps://urldefense.com/v3/__https:/github.com/RonWilkinson__;!!NZvER7FxgEiBAiR_!q8oMEeSuP1OHitFnW6BbCewSk-Jt1NzEKtuBWIz-YfrZaRT0kPv_D8jbTmH3BFWaLPHNBWL0fwNIaN5abNyh7ZS6l-7OJWJh1UfkHPb6$ Are you running this notebook on Windows? If so, QuickUMLS (and therefore medspacy_quickumls) are not installed by default. Did you run through these steps to install QuickUMLS manually following the medspacy install?

https://github.com/medspacy/medspacy/blob/master/windows_and_quickumls.mdhttps://urldefense.com/v3/__https:/github.com/medspacy/medspacy/blob/master/windows_and_quickumls.md__;!!NZvER7FxgEiBAiR_!q8oMEeSuP1OHitFnW6BbCewSk-Jt1NzEKtuBWIz-YfrZaRT0kPv_D8jbTmH3BFWaLPHNBWL0fwNIaN5abNyh7ZS6l-7OJWJh1YLEU6iA$

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/medspacy/medspacy/issues/167*issuecomment-1302398356__;Iw!!NZvER7FxgEiBAiR_!q8oMEeSuP1OHitFnW6BbCewSk-Jt1NzEKtuBWIz-YfrZaRT0kPv_D8jbTmH3BFWaLPHNBWL0fwNIaN5abNyh7ZS6l-7OJWJh1SzZ-sGJ$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ACXCDPJD4ZMNT2Z3VBLJMVLWGPU2DANCNFSM6AAAAAARRC3K2I__;!!NZvER7FxgEiBAiR_!q8oMEeSuP1OHitFnW6BbCewSk-Jt1NzEKtuBWIz-YfrZaRT0kPv_D8jbTmH3BFWaLPHNBWL0fwNIaN5abNyh7ZS6l-7OJWJh1eRi9_zM$. You are receiving this because you were mentioned.Message ID: @.***>

RonWilkinson avatar Nov 03 '22 17:11 RonWilkinson

You are right. Thank you for re-iterating that behavior. We will look into this.

burgersmoke avatar Nov 03 '22 18:11 burgersmoke

We are about to release a new medspacy version (1.1). After that is released and stable, either @turbosheep or myself can fix this so that "medspacy_quickumls" will be uncommented from this block in util.py:

ALL_PIPE_NAMES = {
    "medspacy_tokenizer",
    "medspacy_preprocessor",
    "medspacy_pyrush",
    "medspacy_target_matcher",
    # "medspacy_quickumls", # quickumls still not included by default due to install issues
    "medspacy_context",
    "medspacy_sectionizer",
    "medspacy_postprocessor",
    "medspacy_doc_consumer",
}

burgersmoke avatar May 05 '23 21:05 burgersmoke

In other words, we will fix this, but I think we want to make sure we have at least a stable week of new usage before we flip the switch.

burgersmoke avatar May 05 '23 21:05 burgersmoke

@turbosheep This should be possible to fix now with 1.1.2. Could you add a test for this to make sure it works with medspacy.load().

burgersmoke avatar May 26 '23 19:05 burgersmoke

hi @burgersmoke I'm encountering the same issue. I'm running on linux and have medspacy 1.1.2, medspacy-quickumls 3.0 installed. Manual adding by nlp.add_pipe("medspacy_quickumls") works.

ivcvy avatar Oct 15 '23 00:10 ivcvy

concurrent medspacy and quickumls installation results in this error message when adding pipe: ValueError: [E002] Can't find factory for 'medspacy_quickumls' for language English (en). the error is reproducible when running notebook 11b, python 3.11, in venv with medspacy and quickumls installed.

managed to initialize UMLS resources by running this with python 3.8 without installing quickumls: python -m quickumls.install <umls_installation_path> <destination_path>

ivcvy avatar Oct 17 '23 08:10 ivcvy

@ivcvy Are you unblocked at the moment then? Sorry we don't have a lot of additional time to address issues since medspacy is something we support on the side of other work priorities.

I did want to make sure that you are running again since I would not have expected that the error you report:

Can't find factory for 'medspacy_quickumls' for language English

to have been solved by generating UMLS resources. The error above to me looks like python module for quickumls not being imported before any calls to nlp.add_pipe("medspacy_quickumls") (whether as a part of madspacy.load() or a manual call)

burgersmoke avatar Oct 17 '23 15:10 burgersmoke

@burgersmoke Thank you for your support. My intention was to use full UMLS resource using medspacy_quickumls and it works at the moment. I did not intend to install quickumls and use it as standalone, but I thought I have to install quickumls before generating UMLS resource (following the guide).

ivcvy avatar Oct 18 '23 01:10 ivcvy

This should have been resolved in our latest release

jianlins avatar Nov 21 '24 22:11 jianlins