Skip to content

Commit

Permalink
add debugging info
Browse files Browse the repository at this point in the history
  • Loading branch information
svlandeg committed Jul 24, 2023
1 parent 0d50bc9 commit 63fb645
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
5 changes: 3 additions & 2 deletions tutorials/llm_clinical_trials/falcon_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
cupy-cuda117
torch==1.13.1+cu117 -f https://download.pytorch.org/whl/torch_stable.html
torch==2.0.1+cu117 -f https://download.pytorch.org/whl/torch_stable.html
transformers
einops
einops
xformers
2 changes: 1 addition & 1 deletion tutorials/llm_clinical_trials/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ title: 'Clinical trial results extraction with LLMs'
description: "Using an LLM in a spaCy pipeline to extract patient groups, treatments and outcomes in clinical trials."

vars:
ner_config: "ner_dolly.cfg" # "ner_falcon.cfg" # "ner_openai.cfg"
ner_config: "ner_falcon.cfg" # "ner_dolly.cfg" # "ner_openai.cfg"
trial_config: "trial_openai.cfg"
pmid: 27144689

Expand Down
10 changes: 8 additions & 2 deletions tutorials/llm_clinical_trials/scripts/visualise_entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@


def visualise_entities(pmid: int, config_path: Path, verbose: bool = False):
msg.text(f"Processing PMID {pmid}", show=verbose)
msg.text(f"Loading config from {config_path}", show=verbose)
import logging
import spacy_llm

spacy_llm.logger.addHandler(logging.StreamHandler())
spacy_llm.logger.setLevel(logging.DEBUG)

#msg.text(f"Processing PMID {pmid}", show=verbose)
#msg.text(f"Loading config from {config_path}", show=verbose)
text = read_trial(pmid, verbose=verbose)
nlp = assemble(config_path)
doc = nlp(text)
Expand Down

0 comments on commit 63fb645

Please sign in to comment.