ucam-department-of-psychiatry / crate

Create and use de-identified research databases. Preprocess, extract text, anonymise/de-identify, link, apply natural language processing, query for research, manage consent for contact.
GNU General Public License v3.0
19 stars 7 forks source link

Internal NLP web server launcher #77

Open RudolfCardinal opened 2 years ago

RudolfCardinal commented 2 years ago

I'm a bit unconvinced that the launchers are all working properly for the "proper" NLPRP server (not the toy one). If the NLP web config file is in $CRATE_NLP_WEB_CONFIG, then:

crate_nlp_webserver_pserve "${CRATE_NLP_WEB_CONFIG}"

which is the pserve (Pyramid) launcher (which then, in my test config, launches Gunicorn), reads the port correctly from the config file but doesn't appear to read the processor list.

After some fixing (in the nlp_docs) branch,

crate_nlp_webserver_launch_gunicorn \
    --crate_config "${CRATE_NLP_WEB_CONFIG}" \
    --bind localhost:6543

works (you have to specify the port this way as it ignores the config file settings) but doesn't appear to read the processor file correctly;

crate_nlp_webserver_launch_celery

seems to launch some sort of worker process by default (which doesn't do much by itself?) but I'm not sure if that was the intent.

In progress.

RudolfCardinal commented 2 years ago

ah, the Celery one is deliberately back-end; I failed to read the help. So just the processor detection, then, and maybe the Gunicorn port thing (or documentation around that).

martinburchell commented 2 years ago

@RudolfCardinal Is this fixed by https://github.com/RudolfCardinal/crate/pull/74?

RudolfCardinal commented 2 years ago

don't think so! Residual...