Git Product home page Git Product logo

ijmarshall / robotreviewer Goto Github PK

View Code? Open in Web Editor NEW
135.0 16.0 74.0 635.32 MB

Automatic synthesis of RCTs

Home Page: https://www.robotreviewer.net

License: GNU General Public License v3.0

Python 46.56% PLSQL 0.33% HTML 1.55% CSS 1.41% JavaScript 12.63% Shell 0.74% OpenEdge ABL 0.02% Dockerfile 0.39% Jupyter Notebook 36.37%
clinical-trials systematic-reviews bias trial icasr rcts cochrane

robotreviewer's Introduction

RobotReviewer

Automatic extraction of data from clinical trial reports

RobotReviewer is a system for providing automatic annotations from clinical trials (in PDF format). Currently, RobotReviewer provides data on the trial PICO characteristics (Population, Interventions/Comparators, and Outcomes), and also automatically assesses trials for likely biases using the Cochrane Risk of Bias tool.

You can cite the current version as DOI.

We offer RobotReviewer free of charge, but we'd be most grateful if you would cite us if you use it. We're academics, and thrive on links and citations! Getting RobotReviewer widely used and cited helps us obtain the funding to maintain the project and make RobotReviewer better.

It also makes your methods transparent to your readers, and not least we'd love to see where RobotReviewer is used! :)

The easy way

For most people, we encourage you to use RobotReviewer via our website.

No need to install anything, simply upload your PDFs, and RobotReviewer will automatically extract key data and present a summary table.

RobotReviewer web screenshot

RobotReviewer online

For those who are particularly technically minded, or have a pressing need to run the software on their own machines, read on...

Developers of systematic review software?

RobotReviewer is open source and free to use under the GPL license, version 3.0 (see the LICENSE.txt file in this directory).

We'd appreciate it if you would:

  1. Display the text, 'Risk of Bias automation by RobotReviewer (how to cite)' on the same screen or webpage on which the RobotReviewer results (highlighted text or risk of bias judgements) are displayed.
  2. For web-based tools, the text 'how to cite' should link to our website http://vortext.systems/robotreviewer
  3. For desktop software, you should usually link to the same website. If this is not possible, you may alternately display the text and example citations from the 'How to cite RobotReviewer' section below.

You can cite RobotReviewer as:

Marshall IJ, Kuiper J, Banner E, Wallace BC. “Automating Biomedical Evidence Synthesis: RobotReviewer.” Proceedings of the Conference of the Association for Computational Linguistics (ACL). 2017 (July): 7–12.

A BibTeX entry for LaTeX users is:

@article{RobotReviewer2017, title = "Automating Biomedical Evidence Synthesis: {RobotReviewer}", author = "Marshall, Iain J and Kuiper, Jo{"e}l and Banner, Edward and Wallace, Byron C", journal = "Proceedings of the Conference of the Association for Computational Linguistics (ACL)", volume = 2017, pages = "7--12", month = jul, year = 2017, }

Docker

The project can be run as a set of Docker services using the docker-compose command, which is usually the easiest way to install locally.

First you should clone this repository, and download/decompress the SciBERT model file.

git clone https://github.com/ijmarshall/robotreviewer.git
wget https://s3-us-west-2.amazonaws.com/ai2-s2-research/scibert/tensorflow_models/scibert_scivocab_uncased.tar.gz
tar -zxf scibert_scivocab_uncased.tar.gz --directory robotreviewer/robotreviewer/data

Afterwards, create a config.json file from config.json.example. When running from docker-compose, the following configuration for running locally is enough:

{
    "robotreviewer": {
        "use_grobid": true,
        "grobid_threads": 4,
        "spacy_threads": 4,
        "dont_delete": 0,
        "log": "log.txt",
        "api_keys": {
            "a_secret_key": {
                "uid": 1
            }
        }
    }
}

Then, create an .env file from the .envTemplate file. Keep the ROBOTREVIEWER_GROBID_HOST value if the docker-compose files are not modified and th grobid service is running on port 8070.

Then, to build, from within the code directory run:

docker-compose build

If the build is successful, you can then start the services locally - in detached mode - by running:

docker-compose up -d

You can then access the website on any browser on your local machine at: http://localhost:5050, while the API server will be available at: http://localhost:5051 (consider using Postman for testing the endpoints.)

To stop the websever, run:

docker-compose down --remove-orphans

Docker running with GPU support

The docker-compose file docker-compose.gpu.yml is provided including the necessary settings for making the GPU visible to docker containers. Before running the docker-compose command, it is necessary to install Nvidia Cuda drivers and nvidia-container-runtime following the instructions from https://docs.docker.com/config/containers/resource_constraints/#gpu and https://docs.docker.com/compose/gpu-support/.

You can test that your GPU is visible within the docker container by running the following command:

docker run -it --rm --gpus all ubuntu nvidia-smi

To run RobotReviewer with GPU support, you must specify the GPU docker-compose file:

docker-compose -f docker-compose.gpu.yml build
docker-compose -f docker-compose.gpu.yml up -d

To stop the services running with GPU support, use:

docker-compose -f docker-compose.gpu.yml down --remove-orphans

Docker running in development mode

The docker-compose.dev.yml compose file can be used when the Flask development server is desired instead of Gunicorn. To run in development mode, use the same commands as before, specifying the development compose file:

docker compose -f docker-compose.dev.yml build
docker compose -f docker-compose.dev.yml up

To stop the services running in development mode, use:

docker compose -f docker-compose.dev.yml down --remove-orphans

Installation

We have tested the installation on Ubuntu, and Mac OS which both work successfully with the following instructions. Windows does work in the end but with a lot of installation headaches!

  1. Ensure you have a working version of Python 3.6. We strongly recommend using Python from the Anaconda Python distribution for a quicker and more reliable experience.

  2. Install git-lfs for managing the model file versions (on Mac: brew install git-lfs). NB! If you already have git lfs installed, make sure it's the most recent version, since older versions have not downloaded files properly.

  3. Get a copy of the RobotReviewer repo, and go into that directory

    git clone https://github.com/ijmarshall/robotreviewer.git
    cd robotreviewer
  4. Install the Python libraries that RobotReviewer needs. The most reliable way is through a conda environment. The following downloads the packages, and installs the required data.

    conda env create -f robotreviewer_env.yml
    conda activate robotreviewer
    python -m spacy download en
    python -m nltk.downloader punkt stopwords

You then should install tensorflow V 1.12.0, with or without GPU support depending on your preference:

conda activate robotreviewer
pip install tensorflow==1.12.0 # OR
pip install tensorflow-gpu==1.12.0
  1. Ensure keras is set to use tensorflow as its default backend. Steps on how to do this can be found here.

  2. This version of RobotReviewer requires Grobid, which in turn uses Java. Follow the instructions here to download and build it. This version of RobotReviewer has been tested with Grobid 0.5.1, but no longer works with 0.4 versions.

  3. Create the robotreviewer/config.json file and ensure it contains the path to the directory where you have installed Grobid. (RobotReviewer will start it automatically in a subprocess). Note that this should be the path to the entire (parent) Grobid directory, not the bin subfolder. An example of this file is provided in robotreviewer/config.json.example (it is only necessary to change the grobid_path).

  4. Also install rabbitmq. This can be done via homebrew on OS X, or by alternative means documented here. Finally, install make sure celery is installed and on your path. Note that this ships with Anaconda by default and will be found in the $(anaconda-home)/bin/celery dir by default.

  5. We now also make use of BERT embeddings, specifically SciBERT. For this we use the bert-as-service. This needs to be running locally.

To do this, get the SciBERT model file:

wget https://s3-us-west-2.amazonaws.com/ai2-s2-research/scibert/tensorflow_models/scibert_scivocab_uncased.tar.gz

And (from the RobotReviewer base directory) decompress to the robotreviewer data folder:

tar -zxf scibert_scivocab_uncased.tar.gz --directory robotreviewer/data

Running

RobotReviewer requires a 'worker' process (which does the Machine Learning), and a webserver to be started. Ensure that you are within the conda environment (default name: robotreviewer) when running the following processes.

First, be sure that rabbitmq-server is running. If you haven't set this to start on login, you can invoke manually:

rabbitmq-server

Then, to start the Machine Learning worker (using the GPU):

celery -A robotreviewer.ml_worker worker --loglevel=info --concurrency=1 --pool=solo

Alternatively, to start RobotReviewer using CPU only, use the following command:

env CUDA_VISIBLE_DEVICES=-1 celery -A robotreviewer.ml_worker worker --loglevel=info --concurrency=1 --pool=solo

Next, be sure that bert-as-a-service is running, and using the SciBERT weights:

bert-serving-start -model_dir=/Path/to/SciBERT-weights/

Finally, to start the webserver (on localhost:5000):

python -m robotreviewer

NEW! To start the server for the Swagger API, run:

REST_API=true python -m robotreviewer --rest

Demonstration reports

We have included example reports, with open access RCT PDFs to demonstrate RobotReviewer. These are saved in the default database, and can be accessed via the following links.

Decision aids: http://localhost:5000/#report/Tvg0-pHV2QBsYpJxE2KW- Influenza vaccination: http://localhost:5000/#report/_fzGUEvWAeRsqYSmNQbBq Hypertension: http://localhost:5000/#report/HBkzX1I3Uz_kZEQYeqXJf

Rest API

The big change in this version of RobotReviewer is that we now deal with groups of clinical trial reports, rather than one at a time. This is to allow RobotReviewer to synthesise the results of multiple trials.

As a consequence, the API has become more sophisticated than previously and we will add further documentation about it here.

In the meantime, the code for the API endpoints can be found in /robotreviewer/app.py.

Some things remain simple; e.g., for an example of using RR to classify abstracts as RCTs (or not) see this gist.

If you are interested in incorporating RobotReviewer into your own software, please contact us and we'd be pleased to assist.

Testing

The following

python -m unittest

will run the testing modules. These should be used to assure that changes made do not break or have an affect on the core of the code. If Ran X tests in Ys is displayed, the tests have completed successfully.

Help

Feel free to contact us at [email protected] with any questions.

Common Problems

Grobid isn't working properly

Most likely the problem is that your path to Grobid in robotreviewer/config.json is incorrect. If your path uses a ~, try using a path without one.

rabbitmq-server: command not found

Often found on OS X. If you installed rabbitmq using Homebrew, running the command brew services start rabbitmq should work.

References

  1. Marshall, I. J., Kuiper, J., & Wallace, B. C. (2015). RobotReviewer: evaluation of a system for automatically assessing bias in clinical trials. Journal of the American Medical Informatics Association. [doi]
  2. Zhang Y, Marshall I. J., & Wallace, B. C. (2016) Rationale-Augmented Convolutional Neural Networks for Text Classification. Conference on Empirical Methods on Natural Language Processing. [preprint]
  3. Marshall, I., Kuiper, J., & Wallace, B. (2015). Automating Risk of Bias Assessment for Clinical Trials. IEEE Journal of Biomedical and Health Informatics. [doi]
  4. Kuiper, J., Marshall, I. J., Wallace, B. C., & Swertz, M. A. (2014). Spá: A Web-Based Viewer for Text Mining in Evidence Based Medicine. In Proceedings of the European Conference on Machine Learning and Principles and Practice of Knowledge Discovery in Databases (ECML-PKDD 2014) (Vol. 8726, pp. 452–455). Springer Berlin Heidelberg. [doi]
  5. Marshall, I. J., Kuiper, J., & Wallace, B. C. (2014). Automating Risk of Bias Assessment for Clinical Trials. In Proceedings of the ACM Conference on Bioinformatics, Computational Biology, and Health Informatics (ACM-BCB) (pp. 88–95). ACM. [doi]

Copyright (c) 2018 Iain Marshall, Joël Kuiper, and Byron Wallace

Acknowledgements

We are enormously grateful to our many collaborators, whose work is incorporated in RobotReviewer. These include Ani Nenkova and Zachary Ives at UPenn, Benjamin Nye at Northeastern, James Thomas at the EPPI Centre, UCL, and Anna Noel-Storr at the University of Oxford and Cochrane Dementia group. !e would like to express our gratitude to the Cochrane Collaboration, and especially to David Tovey and Chris Mavergames among many others who facilitated getting access to data, and made many useful introductions. We are hugely appreciative to the volunteers of the Cochrane Crowd, and to Anna Noel-Storr and Gordon Dooley, whose efforts and data we depend on to build our machine learning systems for identifying RCTs.

We include an implimentation of the Schwartz-Hearst algorithm in Python by Vincent Van Asch and Phil Gooch, which is released under the MIT licence.

Support

This work is supported by: National Institutes of Health (NIH) under the National Library of Medicine, grant R01-LM012086-01A1, "Semi-Automating Data Extraction for Systematic Reviews", and by NIH grant 5UH2CA203711-02, "Crowdsourcing Mark-up of the Medical Literature to Support Evidence-Based Medicine and Develop Automated Annotation Capabilities", and the UK Medical Research Council (MRC), through its Skills Development Fellowship program, grant MR/N015185/1

robotreviewer's People

Contributors

ajoorabchi avatar bwallace avatar derrreks avatar ebanner avatar h21k avatar ijmarshall avatar joelkuiper avatar sgalvezortiz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

robotreviewer's Issues

Run the docker but always show connection reset?

I would try to run the docker image on Ubuntu 18.04 and start normally, but when I use the browser connect to the webpage, it always shows "Connection Reset".

I'm sure that the firewall enables port 5050 and changeth start.sh form 127.0.0.1 to 0.0.0.0 still cannot connect to the web page.

My OS:
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic

Docker Ver:
Version: 20.10.2
API version: 1.41
Go version: go1.13.8
Git commit: 20.10.2-0ubuntu1~18.04.2
Built: Tue Mar 30 21:24:16 2021
OS/Arch: linux/amd64
Context: default
Experimental: true

Please help me with anything I mistake?
Thanks a lot!

Getting such error <HaltServer 'Worker failed to boot.' 3>

2023-07-27 02:55:21 [entrypoint.sh] Starting background cleanup task
2023-07-27 02:55:21 [entrypoint.sh] Starting RobotReviewer Web server
2023-07-27 02:55:21 [2023-07-26 18:55:21 +0000] [11] [INFO] Starting gunicorn 21.2.0
2023-07-27 02:55:21 [2023-07-26 18:55:21 +0000] [11] [INFO] Listening at: http://0.0.0.0:5000 (11)
2023-07-27 02:55:21 [2023-07-26 18:55:21 +0000] [11] [INFO] Using worker: gevent
2023-07-27 02:55:21 [2023-07-26 18:55:21 +0000] [14] [INFO] Booting worker with pid: 14
2023-07-27 02:55:21 [2023-07-26 18:55:21 +0000] [15] [INFO] Booting worker with pid: 15
2023-07-27 02:55:21 [2023-07-26 18:55:21 +0000] [15] [ERROR] Exception in worker process
2023-07-27 02:55:21 Traceback (most recent call last):
2023-07-27 02:55:21 File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/gunicorn/arbiter.py", line 609, in spawn_worker
2023-07-27 02:55:21 worker.init_process()
2023-07-27 02:55:21 File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/gunicorn/workers/ggevent.py", line 147, in init_process
2023-07-27 02:55:21 super().init_process()
2023-07-27 02:55:21 File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/gunicorn/workers/base.py", line 134, in init_process
2023-07-27 02:55:21 self.load_wsgi()
2023-07-27 02:55:21 File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
2023-07-27 02:55:21 self.wsgi = self.app.wsgi()
2023-07-27 02:55:21 File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
2023-07-27 02:55:21 self.callable = self.load()
2023-07-27 02:55:21 File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
2023-07-27 02:55:21 return self.load_wsgiapp()
2023-07-27 02:55:21 File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
2023-07-27 02:55:21 return util.import_app(self.app_uri)
2023-07-27 02:55:21 File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/gunicorn/util.py", line 371, in import_app
2023-07-27 02:55:21 mod = importlib.import_module(module)
2023-07-27 02:55:21 File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/importlib/init.py", line 126, in import_module
2023-07-27 02:55:21 return _bootstrap._gcd_import(name[level:], package, level)
2023-07-27 02:55:21 File "", line 994, in _gcd_import
2023-07-27 02:55:21 File "", line 971, in _find_and_load
2023-07-27 02:55:21 File "", line 955, in _find_and_load_unlocked
2023-07-27 02:55:21 File "", line 665, in _load_unlocked
2023-07-27 02:55:21 File "", line 678, in exec_module
2023-07-27 02:55:21 File "", line 219, in _call_with_frames_removed
2023-07-27 02:55:21 File "/var/lib/deploy/server.py", line 2, in
2023-07-27 02:55:21 from robotreviewer import config
2023-07-27 02:55:21 File "/var/lib/deploy/robotreviewer/config.py", line 50, in
2023-07-27 02:55:21 export_config(config())
2023-07-27 02:55:21 File "/var/lib/deploy/robotreviewer/config.py", line 44, in config
2023-07-27 02:55:21 return merge_dicts(json_config(), environ_config())
2023-07-27 02:55:21 File "/var/lib/deploy/robotreviewer/config.py", line 23, in json_config
2023-07-27 02:55:21 with open(path) as p:
2023-07-27 02:55:21 FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/deploy/robotreviewer/config.json'
2023-07-27 02:55:21 [2023-07-26 18:55:21 +0000] [15] [INFO] Worker exiting (pid: 15)
2023-07-27 02:55:22 [2023-07-26 18:55:21 +0000] [14] [ERROR] Exception in worker process
2023-07-27 02:55:22 Traceback (most recent call last):
2023-07-27 02:55:22 File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/gunicorn/arbiter.py", line 609, in spawn_worker
2023-07-27 02:55:22 worker.init_process()
2023-07-27 02:55:22 File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/gunicorn/workers/ggevent.py", line 147, in init_process
2023-07-27 02:55:22 super().init_process()
2023-07-27 02:55:22 File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/gunicorn/workers/base.py", line 134, in init_process
2023-07-27 02:55:22 self.load_wsgi()
2023-07-27 02:55:22 File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
2023-07-27 02:55:22 self.wsgi = self.app.wsgi()
2023-07-27 02:55:22 File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
2023-07-27 02:55:22 self.callable = self.load()
2023-07-27 02:55:22 File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
2023-07-27 02:55:22 return self.load_wsgiapp()
2023-07-27 02:55:22 File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
2023-07-27 02:55:22 return util.import_app(self.app_uri)
2023-07-27 02:55:22 File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/gunicorn/util.py", line 371, in import_app
2023-07-27 02:55:22 mod = importlib.import_module(module)
2023-07-27 02:55:22 File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/importlib/init.py", line 126, in import_module
2023-07-27 02:55:22 return _bootstrap._gcd_import(name[level:], package, level)
2023-07-27 02:55:22 File "", line 994, in _gcd_import
2023-07-27 02:55:22 File "", line 971, in _find_and_load
2023-07-27 02:55:22 File "", line 955, in _find_and_load_unlocked
2023-07-27 02:55:22 File "", line 665, in _load_unlocked
2023-07-27 02:55:22 File "", line 678, in exec_module
2023-07-27 02:55:22 File "", line 219, in _call_with_frames_removed
2023-07-27 02:55:22 File "/var/lib/deploy/server.py", line 2, in
2023-07-27 02:55:22 from robotreviewer import config
2023-07-27 02:55:22 File "/var/lib/deploy/robotreviewer/config.py", line 50, in
2023-07-27 02:55:22 export_config(config())
2023-07-27 02:55:22 File "/var/lib/deploy/robotreviewer/config.py", line 44, in config
2023-07-27 02:55:22 return merge_dicts(json_config(), environ_config())
2023-07-27 02:55:22 File "/var/lib/deploy/robotreviewer/config.py", line 23, in json_config
2023-07-27 02:55:22 with open(path) as p:
2023-07-27 02:55:22 FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/deploy/robotreviewer/config.json'
2023-07-27 02:55:22 [2023-07-26 18:55:22 +0000] [14] [INFO] Worker exiting (pid: 14)
2023-07-27 02:55:22 [2023-07-26 18:55:22 +0000] [11] [ERROR] Worker (pid:15) exited with code 3
2023-07-27 02:55:22 [2023-07-26 18:55:22 +0000] [11] [ERROR] Worker (pid:14) was sent SIGTERM!
2023-07-27 02:55:22 [2023-07-26 18:55:22 +0000] [11] [ERROR] Shutting down: Master
2023-07-27 02:55:22 [2023-07-26 18:55:22 +0000] [11] [ERROR] Reason: Worker failed to boot.

Demo website down

We're sorry! We're having some technical problems, and our RobotReviewer demo website is down at the moment. We're working to get it up and running as soon as possible, but we need to get a new server.
http://www.robotreviewer.net/status/

Website would be extremely helpful in avoiding manual intallation. Thanks for all of the work you've done in making this program.

Issue with Website

Hello,

The demo website doesn't seem to be working. After a successful upload, the page was stuck on "thinking" for over 20 minutes.

In the console, the following error was thrown:

[Error] TypeError: null is not an object (evaluating 'e.meta.process_percentage') (anonymous function) (main.js:99:12532) l (main.js:90:23634) fireWith (main.js:90:24396) r (main.js:91:28364) (anonymous function) (main.js:92:1237)

This is persistent on both Safari and Chrome

UnpicklingError

I was trying to run robotreviewer but I received the following error:

preprocessor = pickle.load(open(vectorizer_loc, 'rb'))
_pickle.UnpicklingError: invalid load key, 'v'.

Would you mind of helping me with this? Many thanks.

Trial registration

Great project. If your framework is a Cochrane Risk of Bias table, then when you develop assessment of 'Reporting bias', consider parsing the pdf for evidence of trial registration and, if evidence of registration not found, alert users that at risk of selective reporting. Unfortunately, this still does not catch when a trial was registered and the publication changes outcomes; however, you could create a link to the trial registration and suggest users compare planned/reported outcomes.

error IO when launching robotreviewer

I'm working on a mac, I followed all the instructions but when launching robotreviewer for the first time this error appears

IOError: [Errno 2] No such file or directory: '[path].../robotreviewer/data/pubmed/pubmed_title_hash_2016_08_18.npz'

are there any file to update before launching robotreviewer? the file in the repository has the date 2016/07/24

unknown opcode (theano version issue ? )

Hi

I am trying to run robotreviewer, but got following error message:

[INFO] robotreviewer.app 2017-07-25 21:51:12,107: Loading the robots

...
loading model architecture from file: robotreviewer/data/keras/models/RSG.json
XXX lineno: 343, opcode: 0
Traceback (most recent call last):
  File "/mnt/data/bin/anaconda3/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/mnt/data/bin/anaconda3/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/mnt/data/workspace/nlp/robotreviewer3/robotreviewer/__main__.py", line 1, in <module>
    from robotreviewer import app
  File "/mnt/data/workspace/nlp/robotreviewer3/robotreviewer/app.py", line 84, in <module>
    bots = {"bias_bot": BiasRobot(top_k=3),
  File "/mnt/data/workspace/nlp/robotreviewer3/robotreviewer/robots/rationale_robot.py", line 90, in __init__
    document_model_weights_path=weight_loc)
  File "robotreviewer/ml/rationale_CNN.py", line 90, in __init__
    self.doc_model = model_from_json(doc_arch_str)
  File "/mnt/data/bin/anaconda3/lib/python3.6/site-packages/keras/models.py", line 213, in model_from_json
    return layer_from_config(config, custom_objects=custom_objects)
  File "/mnt/data/bin/anaconda3/lib/python3.6/site-packages/keras/utils/layer_utils.py", line 40, in layer_from_config
    custom_objects=custom_objects)
  File "/mnt/data/bin/anaconda3/lib/python3.6/site-packages/keras/engine/topology.py", line 2582, in from_config
    process_layer(layer_data)
  File "/mnt/data/bin/anaconda3/lib/python3.6/site-packages/keras/engine/topology.py", line 2577, in process_layer
    layer(input_tensors[0])
  File "/mnt/data/bin/anaconda3/lib/python3.6/site-packages/keras/engine/topology.py", line 572, in __call__
    self.add_inbound_node(inbound_layers, node_indices, tensor_indices)
  File "/mnt/data/bin/anaconda3/lib/python3.6/site-packages/keras/engine/topology.py", line 635, in add_inbound_node
    Node.create_node(self, inbound_layers, node_indices, tensor_indices)
  File "/mnt/data/bin/anaconda3/lib/python3.6/site-packages/keras/engine/topology.py", line 166, in create_node
    output_tensors = to_list(outbound_layer.call(input_tensors[0], mask=input_masks[0]))
  File "/mnt/data/bin/anaconda3/lib/python3.6/site-packages/keras/layers/wrappers.py", line 126, in call
    y = self.layer.call(inputs)  # (nb_samples * timesteps, ...)
  File "/mnt/data/bin/anaconda3/lib/python3.6/site-packages/keras/layers/core.py", line 641, in call
    return self.function(x, **arguments)
  File "/home/ubuntu/rationale-CNN/rationale_CNN.py", line 343, in <lambda>
    sw_layer = Lambda(lambda x: K.max(x[:,0:2], axis=1), output_shape=(1,))
SystemError: unknown opcode

I had another issue before, that:

  File "/mnt/data/bin/anaconda3/lib/python3.6/site-packages/keras/layers/core.py", line 111, in call
    x = K.in_train_phase(dropped_inputs, lambda: x)
  File "/mnt/data/bin/anaconda3/lib/python3.6/site-packages/keras/backend/theano_backend.py", line 1176, in in_train_phase
    x = ifelse.ifelse(_LEARNING_PHASE, x, alt)
AttributeError: 'function' object has no attribute 'ifelse'

This error can be solved by adding:
import theano.ifelse
from theano.ifelse import IfElse, ifelse
at the beginning of the theano_backend.py. But it may indicates the theano version may matters.

My theano version is 0.10.0.dev1, keras version 1.2.2

Any idea how to fix this ? Or what is the working version of theano ?

Thanks
Yinfei

Pickling error when running

I have followed all of the instructions to install (including git-lfs + Keras has been set to use theano) but upon running RR3 I receive this error:

Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/.../robotreviewer3/robotreviewer/__main__.py", line 1, in <module>
    from robotreviewer import app
  File "/home/.../robotreviewer3/robotreviewer/app.py", line 85, in <module>
    bots = {"bias_bot": BiasRobot(top_k=3),
  File "/home/.../robotreviewer3/robotreviewer/robots/rationale_robot.py", line 87, in __init__
    preprocessor = pickle.load(open(vectorizer_loc, 'rb'))
_pickle.UnpicklingError: invalid load key, 'v'.

Any ideas on how to fix?

Data for the classifier

Hello,

I am a university student looking into automated risk of bias assessments. I am trying to understand where the data is for the RobotReviewer risk of bias classifier. Where can I find the data?

Extract for 15,000 Articles

This is a great project! I'm hoping to use it in a research project to extract PICO statements from articles. I have the text and title of around 15,000 articles and was hoping for some advice on doing this using RR3.

RR3 killed

Whenever I run RR3, this is printed to the terminal:

[INFO] robotreviewer.app 2017-09-03 14:59:33,678: Loading the robots...
loading model architecture from file: robotreviewer/data/keras/models/RSG.json
ok!
Killed

Any ideas on why it is killed?

What is sent.text?

In PICO Robot, what does this line do:

doc_sents = [sent.text for sent in doc_text.sents]

mkl version conflict

Got the following error in step 26 of docker build:

UnsatisfiableError: The following specifications were found to be in conflict:
  - mkl==2019.0=118
  - mkl_fft==1.0.6=py36h7dd41cf_0 -> mkl[version='>=2018.0.3,<2019.0a0']

Error when running docker-compose

Hi, when following the steps to build and up the docker-compose.yml, I get the following error in the logs, is there any issue in the code itself?
Thanks

celery_1    | [entrypoint.sh] Starting Celery
celery_1    | /var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/fuzzywuzzy/fuzz.py:11: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning
celery_1    |   warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning')
celery_1    | Traceback (most recent call last):
celery_1    |   File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/celery/app/utils.py", line 373, in find_app
celery_1    |     sym = symbol_by_name(app, imp=imp)
celery_1    |   File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/celery/bin/base.py", line 534, in symbol_by_name
celery_1    |     return imports.symbol_by_name(name, imp=imp)
celery_1    |   File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/kombu/utils/imports.py", line 62, in symbol_by_name
celery_1    |     return getattr(module, cls_name) if cls_name else module
celery_1    | AttributeError: module 'robotreviewer' has no attribute 'ml_worker'
celery_1    | 
celery_1    | During handling of the above exception, another exception occurred:
celery_1    | 
celery_1    | Traceback (most recent call last):
celery_1    |   File "/var/lib/deploy/miniconda3/envs/robotreviewer/bin/celery", line 8, in <module>
celery_1    |     sys.exit(main())
celery_1    |   File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/celery/__main__.py", line 16, in main
celery_1    |     _main()
celery_1    |   File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/celery/bin/celery.py", line 322, in main
celery_1    |     cmd.execute_from_commandline(argv)
celery_1    |   File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/celery/bin/celery.py", line 499, in execute_from_commandline
celery_1    |     super(CeleryCommand, self).execute_from_commandline(argv)))
celery_1    |   File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/celery/bin/base.py", line 289, in execute_from_commandline
celery_1    |     argv = self.setup_app_from_commandline(argv)
celery_1    |   File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/celery/bin/base.py", line 509, in setup_app_from_commandline
celery_1    |     self.app = self.find_app(app)
celery_1    |   File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/celery/bin/base.py", line 531, in find_app
celery_1    |     return find_app(app, symbol_by_name=self.symbol_by_name)
celery_1    |   File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/celery/app/utils.py", line 376, in find_app
celery_1    |     sym = imp(app)
celery_1    |   File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/celery/utils/imports.py", line 111, in import_from_cwd
celery_1    |     return imp(module, package=package)
celery_1    |   File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/importlib/__init__.py", line 126, in import_module
celery_1    |     return _bootstrap._gcd_import(name[level:], package, level)
celery_1    |   File "<frozen importlib._bootstrap>", line 994, in _gcd_import
celery_1    |   File "<frozen importlib._bootstrap>", line 971, in _find_and_load
celery_1    |   File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
celery_1    |   File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
celery_1    |   File "<frozen importlib._bootstrap_external>", line 678, in exec_module
celery_1    |   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
celery_1    |   File "/var/lib/deploy/robotreviewer/ml_worker.py", line 52, in <module>
celery_1    |     from robotreviewer.robots.pico_span_robot import PICOSpanRobot
celery_1    |   File "/var/lib/deploy/robotreviewer/robots/pico_span_robot.py", line 32, in <module>
celery_1    |     from robotreviewer.textprocessing import minimap
celery_1    |   File "/var/lib/deploy/robotreviewer/textprocessing/minimap.py", line 21, in <module>
celery_1    |     str_to_cui = pickle.load(f)
celery_1    | _pickle.UnpicklingError: invalid load key, 'v'.

No module named keras.preprocessing

Whenever running this command:

celery -A robotreviewer.ml_worker worker --loglevel=info

I get the following message:


[INFO] robotreviewer.ml_worker 2017-10-19 01:22:06,140: RobotReviewer machine learning tasks starting
[INFO] robotreviewer.textprocessing.pdfreader 2017-10-19 01:22:06,719: Attempting to start Grobid sever...
[INFO] robotreviewer.textprocessing.pdfreader 2017-10-19 01:22:06,720: Launching Grobid process... (from /Users/.../grobid-grobid-parent-0.4.4)
[INFO] robotreviewer.textprocessing.pdfreader 2017-10-19 01:22:06,727: Success! :)
[DEBUG] robotreviewer.textprocessing.tokenizer 2017-10-19 01:22:06,731: Loading spacy.io data for tokenization
[DEBUG] pip.vcs 2017-10-19 01:22:07,268: Registered VCS backend: git
[DEBUG] pip.vcs 2017-10-19 01:22:07,332: Registered VCS backend: hg
[DEBUG] pip.vcs 2017-10-19 01:22:07,434: Registered VCS backend: svn
[DEBUG] pip.vcs 2017-10-19 01:22:07,436: Registered VCS backend: bzr

Traceback (most recent call last):
  File "/Users/.../miniconda3/bin/celery", line 11, in <module>
    sys.exit(main())
  File "/Users/.../miniconda3/lib/python3.6/site-packages/celery/__main__.py", line 14, in main
    _main()
  File "/Users/.../miniconda3/lib/python3.6/site-packages/celery/bin/celery.py", line 326, in main
    cmd.execute_from_commandline(argv)
  File "/Users/.../miniconda3/lib/python3.6/site-packages/celery/bin/celery.py", line 488, in execute_from_commandline
    super(CeleryCommand, self).execute_from_commandline(argv)))
  File "/Users/.../miniconda3/lib/python3.6/site-packages/celery/bin/base.py", line 279, in execute_from_commandline
    argv = self.setup_app_from_commandline(argv)
  File "/Users/.../miniconda3/lib/python3.6/site-packages/celery/bin/base.py", line 481, in setup_app_from_commandline
    self.app = self.find_app(app)
  File "/Users/.../miniconda3/lib/python3.6/site-packages/celery/bin/base.py", line 503, in find_app
    return find_app(app, symbol_by_name=self.symbol_by_name)
  File "/Users/.../miniconda3/lib/python3.6/site-packages/celery/app/utils.py", line 358, in find_app
    sym = imp(app)
  File "/Users/.../miniconda3/lib/python3.6/site-packages/celery/utils/imports.py", line 101, in import_from_cwd
    return imp(module, package=package)
  File "/Users/.../miniconda3/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 978, in _gcd_import
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load
  File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
  File "/Users/.../robotreviewer3/robotreviewer/ml_worker.py", line 44, in <module>
    from robotreviewer.robots.rationale_robot import BiasRobot
  File "/Users/.../robotreviewer3/robotreviewer/robots/rationale_robot.py", line 38, in <module>
    from robotreviewer.ml.vectorizer import ModularVectorizer
  File "/Users/.../robotreviewer3/robotreviewer/ml/vectorizer.py", line 19, in <module>
    from keras.preprocessing import sequence
ModuleNotFoundError: No module named 'keras.preprocessing'

IDs of training RCTs

I would like to obtain the exact list of PMIDs used in training RobotReviewer, so that I can later analyze its RoB classification performance on truly unseen data. Any idea where I can find such a list or extract it from?

dockfile throws an error (Step 38/42)

1. encountered this error in the dockfile:

Step 38/42 : RUN cd /var/lib/deploy/robotreviewer/ &&     r.js -o static/build.js &&     mv static static.bak &&     mv build static &&     rm -rf static.bak
 ---> Running in caacf611e66c
Error: Error: /var/lib/deploy/robotreviewer/static/scripts/main.js does not exist.
    at /usr/local/lib/node_modules/requirejs/bin/r.js:29302:27

The command '/bin/sh -c cd /var/lib/deploy/robotreviewer/ &&     r.js -o static/build.js &&     mv static static.bak &&     mv build static &&     rm -rf static.bak' returned a non-zero code: 1

2. comment out "USER deploy" in the doc file:

# USER deploy
VOLUME /var/lib/deploy/src/robotreviewer/data
# compile client side assets
RUN cd /var/lib/deploy/robotreviewer/ && \
    r.js -o static/build.js && \
    mv static static.bak && \
    mv build static && \
    rm -rf static.bak

this solved the "file not found error" but now another error is thrown:

Step 37/41 : RUN cd /var/lib/deploy/robotreviewer/ &&     r.js -o static/build.js &&     mv static static.bak &&     mv build static &&     rm -rf static.bak
 ---> Running in 94870ea459c2
Optimizing (standard) CSS file: /var/lib/deploy/robotreviewer/build/css/main.css
Optimizing (standard) CSS file: /var/lib/deploy/robotreviewer/build/css/report.css
Optimizing (standard) CSS file: /var/lib/deploy/robotreviewer/build/scripts/spa/css/foundation.css
Optimizing (standard) CSS file: /var/lib/deploy/robotreviewer/build/scripts/spa/css/main.css
Optimizing (standard) CSS file: /var/lib/deploy/robotreviewer/build/scripts/spa/css/normalize.css
Optimizing (standard) CSS file: /var/lib/deploy/robotreviewer/build/scripts/spa/css/style.css

Tracing dependencies for: main

Tracing dependencies for: JSXTransformer

Tracing dependencies for: text
Error: Cannot parse file: /var/lib/deploy/robotreviewer/build/build.js for comments. Skipping it. Error is:
Error: Line 19: Unexpected token }
.
.
.
 ---> cd0439f2dcec
Removing intermediate container 94870ea459c2
Step 38/41 : EXPOSE 5000
 ---> Running in c66817511147
 ---> ee7dc309a149
Removing intermediate container c66817511147
Step 39/41 : ENV HOME /var/lib/deploy
 ---> Running in 3a18846e4167
 ---> 43a16c051bfb
Removing intermediate container 3a18846e4167
Step 40/41 : USER root
 ---> Running in e99db339a524
 ---> 8965968677ec
Removing intermediate container e99db339a524
Step 41/41 : ENTRYPOINT /var/lib/deploy/run
 ---> Running in aed5f55ab2b0
 ---> b94fa797d3e0
Removing intermediate container aed5f55ab2b0
Successfully built b94fa797d3e0

below is the docker log:


arash@AJ-780-1:~/Desktop/robotreviewer3-master$ sudo docker logs robotreviewer
Warning: PID file not written; -detached was passed.
[INFO] robotreviewer.app 2018-12-11 21:23:15,413: Welcome to RobotReviewer server :)
[INFO] robotreviewer.ml_worker 2018-12-11 21:23:16,654: RobotReviewer machine learning tasks starting
Traceback (most recent call last):
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/celery/app/utils.py", line 359, in find_app
    sym = symbol_by_name(app, imp=imp)
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/celery/bin/base.py", line 504, in symbol_by_name
    return imports.symbol_by_name(name, imp=imp)
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/kombu/utils/imports.py", line 61, in symbol_by_name
    return getattr(module, cls_name) if cls_name else module
AttributeError: module 'robotreviewer' has no attribute 'ml_worker'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/bin/celery", line 11, in <module>
    sys.exit(main())
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/celery/__main__.py", line 16, in main
    _main()
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/celery/bin/celery.py", line 322, in main
    cmd.execute_from_commandline(argv)
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/celery/bin/celery.py", line 496, in execute_from_commandline
    super(CeleryCommand, self).execute_from_commandline(argv)))
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/celery/bin/base.py", line 273, in execute_from_commandline
    argv = self.setup_app_from_commandline(argv)
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/celery/bin/base.py", line 479, in setup_app_from_commandline
    self.app = self.find_app(app)
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/celery/bin/base.py", line 501, in find_app
    return find_app(app, symbol_by_name=self.symbol_by_name)
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/celery/app/utils.py", line 362, in find_app
    sym = imp(app)
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/celery/utils/imports.py", line 104, in import_from_cwd
    return imp(module, package=package)
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/var/lib/deploy/robotreviewer/ml_worker.py", line 38, in <module>
    from robotreviewer.textprocessing.pdfreader import PdfReader
  File "/var/lib/deploy/robotreviewer/textprocessing/pdfreader.py", line 10, in <module>
    from robotreviewer import config
  File "/var/lib/deploy/robotreviewer/config.py", line 50, in <module>
    export_config(config())
  File "/var/lib/deploy/robotreviewer/config.py", line 44, in config
    return merge_dicts(json_config(), environ_config())
  File "/var/lib/deploy/robotreviewer/config.py", line 23, in json_config
    with open(path) as p:
FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/deploy/robotreviewer/config.json'
Using Theano backend.
/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/fuzzywuzzy/fuzz.py:11: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning
  warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning')
[INFO] summarizer.preprocessing.cleaner 2018-12-11 21:23:24,594: 'pattern' package not found; tag filters are not available for English
/var/lib/deploy/robotreviewer/app.py:69: FlaskWTFDeprecationWarning: "flask_wtf.CsrfProtect" has been renamed to "CSRFProtect" and will be removed in 1.0.
  csrf = CsrfProtect()
[INFO] robotreviewer.app 2018-12-11 21:23:24,661: Loading the robots...
[INFO] robotreviewer.app 2018-12-11 21:23:24,661: Robots loaded successfully! Ready...
[WARNING] robotreviewer.app 2018-12-11 21:23:24,664: Could not start scheduled clean-up task
arash@AJ-780-1:~/Desktop/robotreviewer3-master$ sudo docker logs robotreviewer
Warning: PID file not written; -detached was passed.
[INFO] robotreviewer.app 2018-12-11 21:23:15,413: Welcome to RobotReviewer server :)
[INFO] robotreviewer.ml_worker 2018-12-11 21:23:16,654: RobotReviewer machine learning tasks starting
Traceback (most recent call last):
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/celery/app/utils.py", line 359, in find_app
    sym = symbol_by_name(app, imp=imp)
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/celery/bin/base.py", line 504, in symbol_by_name
    return imports.symbol_by_name(name, imp=imp)
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/kombu/utils/imports.py", line 61, in symbol_by_name
    return getattr(module, cls_name) if cls_name else module
AttributeError: module 'robotreviewer' has no attribute 'ml_worker'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/bin/celery", line 11, in <module>
    sys.exit(main())
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/celery/__main__.py", line 16, in main
    _main()
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/celery/bin/celery.py", line 322, in main
    cmd.execute_from_commandline(argv)
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/celery/bin/celery.py", line 496, in execute_from_commandline
    super(CeleryCommand, self).execute_from_commandline(argv)))
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/celery/bin/base.py", line 273, in execute_from_commandline
    argv = self.setup_app_from_commandline(argv)
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/celery/bin/base.py", line 479, in setup_app_from_commandline
    self.app = self.find_app(app)
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/celery/bin/base.py", line 501, in find_app
    return find_app(app, symbol_by_name=self.symbol_by_name)
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/celery/app/utils.py", line 362, in find_app
    sym = imp(app)
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/celery/utils/imports.py", line 104, in import_from_cwd
    return imp(module, package=package)
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/var/lib/deploy/robotreviewer/ml_worker.py", line 38, in <module>
    from robotreviewer.textprocessing.pdfreader import PdfReader
  File "/var/lib/deploy/robotreviewer/textprocessing/pdfreader.py", line 10, in <module>
    from robotreviewer import config
  File "/var/lib/deploy/robotreviewer/config.py", line 50, in <module>
    export_config(config())
  File "/var/lib/deploy/robotreviewer/config.py", line 44, in config
    return merge_dicts(json_config(), environ_config())
  File "/var/lib/deploy/robotreviewer/config.py", line 23, in json_config
    with open(path) as p:
FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/deploy/robotreviewer/config.json'
Using Theano backend.
/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/fuzzywuzzy/fuzz.py:11: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning
  warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning')
[INFO] summarizer.preprocessing.cleaner 2018-12-11 21:23:24,594: 'pattern' package not found; tag filters are not available for English
/var/lib/deploy/robotreviewer/app.py:69: FlaskWTFDeprecationWarning: "flask_wtf.CsrfProtect" has been renamed to "CSRFProtect" and will be removed in 1.0.
  csrf = CsrfProtect()
[INFO] robotreviewer.app 2018-12-11 21:23:24,661: Loading the robots...
[INFO] robotreviewer.app 2018-12-11 21:23:24,661: Robots loaded successfully! Ready...
[WARNING] robotreviewer.app 2018-12-11 21:23:24,664: Could not start scheduled clean-up task
::ffff:172.17.0.1 - - [2018-12-11 21:26:02] "GET / HTTP/1.1" 200 2090 0.016438
::ffff:172.17.0.1 - - [2018-12-11 21:26:02] "GET /css/main.css HTTP/1.1" 200 176417 0.016441
::ffff:172.17.0.1 - - [2018-12-11 21:26:02] "GET /css/report.css HTTP/1.1" 200 1911 0.002908
::ffff:172.17.0.1 - - [2018-12-11 21:26:02] "GET /scripts/modernizr.js HTTP/1.1" 200 11472 0.001443
::ffff:172.17.0.1 - - [2018-12-11 21:26:02] "GET /scripts/spa/scripts/vendor/pdfjs/pdf.js HTTP/1.1" 200 142180 0.002863
::ffff:172.17.0.1 - - [2018-12-11 21:26:02] "GET /scripts/spa/scripts/vendor/compatibility.js HTTP/1.1" 200 8238 0.001442
::ffff:172.17.0.1 - - [2018-12-11 21:26:02] "GET /scripts/require.js HTTP/1.1" 200 15385 0.002254
::ffff:172.17.0.1 - - [2018-12-11 21:26:03] "GET /img/logo.svg HTTP/1.1" 200 77727 0.003689
[ERROR] flask.app 2018-12-11 21:26:03,359: Exception on /report_view/Tvg0-pHV2QBsYpJxE2KW-/html [GET]
Traceback (most recent call last):
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
    raise value
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/var/lib/deploy/robotreviewer/app.py", line 157, in report_view
    return produce_report(report_uuid, format, download=False)
  File "/var/lib/deploy/robotreviewer/app.py", line 188, in produce_report
    for i, row in enumerate(c.execute("SELECT pdf_uuid, annotations FROM article WHERE report_uuid=?", (report_uuid,))):
sqlite3.DatabaseError: file is not a database
::ffff:172.17.0.1 - - [2018-12-11 21:26:03] "GET /report_view/Tvg0-pHV2QBsYpJxE2KW-/html HTTP/1.1" 500 412 0.023783
[ERROR] flask.app 2018-12-11 21:26:03,361: Exception on /report_view/_fzGUEvWAeRsqYSmNQbBq/html [GET]
Traceback (most recent call last):
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
    raise value
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/var/lib/deploy/robotreviewer/app.py", line 157, in report_view
    return produce_report(report_uuid, format, download=False)
  File "/var/lib/deploy/robotreviewer/app.py", line 188, in produce_report
    for i, row in enumerate(c.execute("SELECT pdf_uuid, annotations FROM article WHERE report_uuid=?", (report_uuid,))):
sqlite3.DatabaseError: file is not a database
::ffff:172.17.0.1 - - [2018-12-11 21:26:03] "GET /report_view/_fzGUEvWAeRsqYSmNQbBq/html HTTP/1.1" 500 412 0.001590
[ERROR] flask.app 2018-12-11 21:26:03,383: Exception on /report_view/HBkzX1I3Uz_kZEQYeqXJf/html [GET]
Traceback (most recent call last):
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
    raise value
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/var/lib/deploy/robotreviewer/app.py", line 157, in report_view
    return produce_report(report_uuid, format, download=False)
  File "/var/lib/deploy/robotreviewer/app.py", line 188, in produce_report
    for i, row in enumerate(c.execute("SELECT pdf_uuid, annotations FROM article WHERE report_uuid=?", (report_uuid,))):
sqlite3.DatabaseError: file is not a database
::ffff:172.17.0.1 - - [2018-12-11 21:26:03] "GET /report_view/HBkzX1I3Uz_kZEQYeqXJf/html HTTP/1.1" 500 412 0.001663
::ffff:172.17.0.1 - - [2018-12-11 21:26:03] "GET /scripts/main.js HTTP/1.1" 200 372669 0.003199
::ffff:172.17.0.1 - - [2018-12-11 21:26:04] "GET /img/infinity.gif HTTP/1.1" 200 53443 0.001551
::ffff:172.17.0.1 - - [2018-12-11 21:26:04] "GET /favicon.ico HTTP/1.1" 404 342 0.002453
[ERROR] flask.app 2018-12-11 21:26:18,111: Exception on /upload_and_annotate [POST]
Traceback (most recent call last):
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
    raise value
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/var/lib/deploy/miniconda3/envs/robotreviewer/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/var/lib/deploy/robotreviewer/app.py", line 126, in upload_and_annotate
    c.execute("INSERT INTO doc_queue (report_uuid, pdf_uuid, pdf_hash, pdf_filename, pdf_file, timestamp) VALUES (?, ?, ?, ?, ?, ?)", (report_uuid, pdf_uuid, pdf_hash, filename, sqlite3.Binary(blob), datetime.now()))
sqlite3.DatabaseError: file is not a database

Refuse to make predictions for non-RCTs (based on model)

We should reject studies that do not seem to be reports of RCTs, based on the model that we have that decides this. Invariably, people seem to like to test RR out on such studies, which of course then provides nonsense results...

unit tests need to be updated

Tried to get this running. Can run it and look at the samples but if trying to upload own research paper it crashes.

File "/Users/y-/Documents/Scripts/RB/robotreviewer/app.py", line 124, in upload_and_annotate
c.execute("INSERT INTO doc_queue (report_uuid, pdf_uuid, pdf_hash, pdf_filename, pdf_file, timestamp) VALUES (?, ?, ?, ?, ?, ?)", (report_uuid, pdf_uuid, pdf_hash, filename, sqlite3.Binary(blob), datetime.now()))
sqlite3.OperationalError: no such table: doc_queue

Is there any more config/setup that I have missed?

Error creating conda env on OSX

I get this error when trying to create the conda env on OSX.

ResolvePackageNotFound:
  - binutils_impl_linux-64 2.31.1 h6176602_1

It seems clear to me that that this is a linux specific package, so I am not surprised by the error. Is the intention to only support linux?

problem in installing

I install anaconda in windows and then i wanted to add this code
conda env create -f robotreviewer_env_local.yml
i got this error
ResolvePackageNotFound

  • spacy=0.101.0
  • ptyprocess=0.5.1
    how can i solve this problem

thank you for helping.

Failed installation (multiple errors)

  1. python -m unitest to test the installation results in:
  • SyntaxError: invalid syntax
  • ImportError: cannot import name '_ccallback_c' from 'scipy.lib' (C:\Program Files\Python37\lib\site-packages\scipy_lib_init.py)
  • ImportError: cannot import name '_ccallback_c' from 'scipy.lib' (C:\Program Files\Python37\lib\site-packages\scipy_lib_init.py)
  • ModuleNotFoundError: No module named 'spacy.gold'
  1. celery -A ml_worker worker just before the above results in:
  • SyntaxError: invalid syntax when using celery to run robot

Relevant: I had difficulty with anaconda virtual environment so am using the latest version of python 3.7 and installed via pip. However there were problems getting the components. I manually downloaded them from https://www.lfd.uci.edu/~gohlke/pythonlibs/ and used pip install from the local machine. Still didn't work so changed the version numbers in the file names from 36 to 37 and that succeeded. I don't know much about command line or anything at all about python which is why it took 15-20h to get through the instructions, that is probably the primary issue of why this isn't working. I think I was able to complete the other steps.

cd C:\Users\Admin\.1\robotreviewer3
python -m unitest

C:\Users\Admin\.1\robotreviewer3>python -m unittest
[INFO] robotreviewer.app 2017-11-19 13:15:51,270: Welcome to RobotReviewer server :)
[DEBUG] robotreviewer.textprocessing.tokenizer 2017-11-19 13:15:51,477: Loading spacy.io data for tokenization
[DEBUG] pip.vcs 2017-11-19 13:15:51,758: Registered VCS backend: git
[DEBUG] pip.vcs 2017-11-19 13:15:51,779: Registered VCS backend: hg
[DEBUG] pip.pep425tags 2017-11-19 13:15:51,784: Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
[DEBUG] pip.pep425tags 2017-11-19 13:15:51,785: Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
[DEBUG] pip.pep425tags 2017-11-19 13:15:51,785: Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
[DEBUG] pip.pep425tags 2017-11-19 13:15:51,789: Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
[DEBUG] pip.vcs 2017-11-19 13:15:51,816: Registered VCS backend: svn
[DEBUG] pip.vcs 2017-11-19 13:15:51,817: Registered VCS backend: bzr
EEEE
======================================================================
ERROR: robotreviewer.tests.test_app (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: robotreviewer.tests.test_app
Traceback (most recent call last):
  File "C:\Program Files\Python37\lib\unittest\loader.py", line 428, in _find_test_path
    module = self._get_module_from_name(name)
  File "C:\Program Files\Python37\lib\unittest\loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "C:\Users\Admin\.1\robotreviewer3\robotreviewer\tests\test_app.py", line 3, in <module>
    from robotreviewer.app import get_study_name
  File "C:\Users\Admin\.1\robotreviewer3\robotreviewer\app.py", line 33, in <module>
    from celery import Celery
  File "<frozen importlib._bootstrap>", line 1014, in _handle_fromlist
  File "C:\Program Files\Python37\lib\site-packages\celery\local.py", line 509, in __getattr__
    module = __import__(self._object_origins[name], None, None, [name])
  File "C:\Program Files\Python37\lib\site-packages\celery\app\__init__.py", line 5, in <module>
    from celery import _state
  File "C:\Program Files\Python37\lib\site-packages\celery\_state.py", line 15, in <module>
    from celery.utils.threads import LocalStack
  File "C:\Program Files\Python37\lib\site-packages\celery\utils\__init__.py", line 10, in <module>
    from .nodenames import worker_direct, nodename, nodesplit
  File "C:\Program Files\Python37\lib\site-packages\celery\utils\nodenames.py", line 7, in <module>
    from kombu.entity import Exchange, Queue
  File "C:\Program Files\Python37\lib\site-packages\kombu\entity.py", line 6, in <module>
    from .abstract import MaybeChannelBound, Object
  File "C:\Program Files\Python37\lib\site-packages\kombu\abstract.py", line 6, in <module>
    from .connection import maybe_channel
  File "C:\Program Files\Python37\lib\site-packages\kombu\connection.py", line 893
    return self.transport.implements.async
                                         ^
SyntaxError: invalid syntax


======================================================================
ERROR: robotreviewer.tests.test_ml (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: robotreviewer.tests.test_ml
Traceback (most recent call last):
  File "C:\Program Files\Python37\lib\unittest\loader.py", line 428, in _find_test_path
    module = self._get_module_from_name(name)
  File "C:\Program Files\Python37\lib\unittest\loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "C:\Users\Admin\.1\robotreviewer3\robotreviewer\tests\test_ml.py", line 6, in <module>
    from scipy.sparse import csr_matrix
  File "C:\Program Files\Python37\lib\site-packages\scipy\__init__.py", line 118, in <module>
    from scipy._lib._ccallback import LowLevelCallable
  File "C:\Program Files\Python37\lib\site-packages\scipy\_lib\_ccallback.py", line 1, in <module>
    from . import _ccallback_c
ImportError: cannot import name '_ccallback_c' from 'scipy._lib' (C:\Program Files\Python37\lib\site-packages\scipy\_lib\__init__.py)


======================================================================
ERROR: robotreviewer.tests.test_robots (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: robotreviewer.tests.test_robots
Traceback (most recent call last):
  File "C:\Program Files\Python37\lib\unittest\loader.py", line 428, in _find_test_path
    module = self._get_module_from_name(name)
  File "C:\Program Files\Python37\lib\unittest\loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "C:\Users\Admin\.1\robotreviewer3\robotreviewer\tests\test_robots.py", line 8, in <module>
    from robotreviewer.robots.pico_robot import PICORobot
  File "C:\Users\Admin\.1\robotreviewer3\robotreviewer\robots\pico_robot.py", line 33, in <module>
    from scipy.sparse import diags, lil_matrix, csc_matrix
  File "C:\Program Files\Python37\lib\site-packages\scipy\__init__.py", line 118, in <module>
    from scipy._lib._ccallback import LowLevelCallable
  File "C:\Program Files\Python37\lib\site-packages\scipy\_lib\_ccallback.py", line 1, in <module>
    from . import _ccallback_c
ImportError: cannot import name '_ccallback_c' from 'scipy._lib' (C:\Program Files\Python37\lib\site-packages\scipy\_lib\__init__.py)


======================================================================
ERROR: robotreviewer.tests.test_textprocessing (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: robotreviewer.tests.test_textprocessing
Traceback (most recent call last):
  File "C:\Program Files\Python37\lib\unittest\loader.py", line 428, in _find_test_path
    module = self._get_module_from_name(name)
  File "C:\Program Files\Python37\lib\unittest\loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "C:\Users\Admin\.1\robotreviewer3\robotreviewer\tests\test_textprocessing.py", line 5, in <module>
    import robotreviewer.textprocessing.tokenizer as t
  File "C:\Users\Admin\.1\robotreviewer3\robotreviewer\textprocessing\tokenizer.py", line 8, in <module>
    from spacy.en import English
  File "C:\Program Files\Python37\lib\site-packages\spacy\__init__.py", line 5, in <module>
    from .deprecated import resolve_model_name
  File "C:\Program Files\Python37\lib\site-packages\spacy\deprecated.py", line 8, in <module>
    from .cli import download
  File "C:\Program Files\Python37\lib\site-packages\spacy\cli\__init__.py", line 5, in <module>
    from .train import train, train_config
  File "C:\Program Files\Python37\lib\site-packages\spacy\cli\train.py", line 8, in <module>
    from ..scorer import Sco2rer
  File "C:\Program Files\Python37\lib\site-packages\spacy\scorer.py", line 4, in <module>
    from .gold import tags_to_entities
ModuleNotFoundError: No module named 'spacy.gold'


----------------------------------------------------------------------
Ran 4 tests in 0.002s

FAILED (errors=4)

Second error:

cd C:\Users\Admin\.1\robotreviewer3\robotreviewer
celery -A ml_worker worker --loglevel=info

Traceback (most recent call last):
  File "c:\program files\python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\program files\python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Program Files\Python37\Scripts\celery.exe\__main__.py", line 9, in <module>
  File "c:\program files\python37\lib\site-packages\celery\__main__.py", line 13, in main
    from celery.bin.celery import main as _main
  File "c:\program files\python37\lib\site-packages\celery\bin\__init__.py", line 2, in <module>
    from .base import Option
  File "c:\program files\python37\lib\site-packages\celery\bin\base.py", line 17, in <module>
    from celery import VERSION_BANNER, Celery, maybe_patch_concurrency
  File "<frozen importlib._bootstrap>", line 1014, in _handle_fromlist
  File "c:\program files\python37\lib\site-packages\celery\local.py", line 509, in __getattr__
    module = __import__(self._object_origins[name], None, None, [name])
  File "c:\program files\python37\lib\site-packages\celery\app\__init__.py", line 5, in <module>
    from celery import _state
  File "c:\program files\python37\lib\site-packages\celery\_state.py", line 15, in <module>
    from celery.utils.threads import LocalStack
  File "c:\program files\python37\lib\site-packages\celery\utils\__init__.py", line 10, in <module>
    from .nodenames import worker_direct, nodename, nodesplit
  File "c:\program files\python37\lib\site-packages\celery\utils\nodenames.py", line 7, in <module>
    from kombu.entity import Exchange, Queue
  File "c:\program files\python37\lib\site-packages\kombu\entity.py", line 6, in <module>
    from .abstract import MaybeChannelBound, Object
  File "c:\program files\python37\lib\site-packages\kombu\abstract.py", line 6, in <module>
    from .connection import maybe_channel
  File "c:\program files\python37\lib\site-packages\kombu\connection.py", line 893
    return self.transport.implements.async
                                         ^
SyntaxError: invalid syntax

Robotreviewer website down

Hello,

Have you guys stopped supporting the web app for robotreviewer? (the link provided doesn't work), or is working somewhere else?

Regards

Patricio

Regenerate demo reports so that they feature sample size predictions

Currently, the demo projects do not include sample size (n) predictions because they were generated before these models were added; we should add back in. (Aside/related: also might consider relaxing confidence threshold associated with sample size model so that it doesn't refuse to make predictions so often...)

docker build failed at step 41

Step 33/45 : USER root
---> Running in 7823882bd3a4
Removing intermediate container 7823882bd3a4
---> 596ac2336787
Step 34/45 : RUN mkdir -p /var/lib/deploy/robotreviewer/data
---> Running in 5a7edc6d85de
Removing intermediate container 5a7edc6d85de
---> da724724a4d5
Step 35/45 : ADD server.py /var/lib/deploy/
---> 664ea4834eb2
Step 36/45 : ADD run /var/lib/deploy/
---> 7fae45ce5ab8
Step 37/45 : ADD robotreviewer /var/lib/deploy/robotreviewer
---> 882f12643e64
Step 38/45 : RUN chown -R deploy.deploy /var/lib/deploy/robotreviewer
---> Running in f517507c9d13
Removing intermediate container f517507c9d13
---> bfee772d72d9
Step 39/45 : USER deploy
---> Running in 57ca5b5c1d0c
Removing intermediate container 57ca5b5c1d0c
---> 5a7b422f7dae
Step 40/45 : VOLUME /var/lib/deploy/src/robotreviewer/data
---> Running in 3c4cacf4524f
Removing intermediate container 3c4cacf4524f
---> f74e3345385e
Step 41/45 : RUN cd /var/lib/deploy/robotreviewer/ && r.js -o static/build.js && mv static static.bak && mv build static && rm -rf static.bak
---> Running in a54797dc970f
Error: Error: /var/lib/deploy/robotreviewer/static/scripts/main.js does not exist.
at /usr/local/lib/node_modules/requirejs/bin/r.js:29302:27

The command '/bin/sh -c cd /var/lib/deploy/robotreviewer/ && r.js -o static/build.js && mv static static.bak && mv build static && rm -rf static.bak' returned a non-zero code: 1

docker-compose build with some unexpected errors

Hello Roboviewer-team! checking out this tool and trying to install it locally on a mac.

sudo docker-compose build command runs pretty well, but gives following ERRORS.

What is your advice?

=> CACHED [build-stage 2/6] WORKDIR /app 0.0s
=> CACHED [build-stage 3/6] RUN npm update 0.0s
=> CACHED [build-stage 4/6] RUN npm install -g requirejs 0.0s
=> ERROR [build-stage 5/6] COPY ./robotreviewer/static/ static/ 0.0s
=> CACHED [production-stage 2/25] RUN useradd --create-home --home /var/lib/deploy deploy 0.0s
=> CACHED [production-stage 3/25] ADD apt-requirements.txt /tmp/apt-requirements.txt 0.0s
=> CACHED [production-stage 4/25] RUN apt-get -qq update -y 0.0s
=> CACHED [production-stage 5/25] RUN xargs -a /tmp/apt-requirements.txt apt-get install -y --no-install 0.0s
=> CACHED [production-stage 6/25] RUN mkdir -p /etc/pki/tls/certs && ln -s /etc/ssl/certs/ca-certifi 0.0s
=> CACHED [production-stage 7/25] RUN chown -R deploy.deploy /var/lib/deploy/ 0.0s
=> CACHED [production-stage 8/25] RUN aria2c -s 16 -x 16 -k 30M https://repo.continuum.io/miniconda/Mini 0.0s
=> CACHED [production-stage 9/25] RUN cd /var/lib/deploy && bash Anaconda.sh -b && rm -rf Anaconda.sh 0.0s
=> ERROR [production-stage 10/25] ADD robotreviewer_env.yml tmp/robotreviewer_env.yml 0.0s
=> CACHED [production-stage 11/25] RUN conda env create -f tmp/robotreviewer_env.yml 0.0s
=> CACHED [production-stage 12/25] RUN python -m nltk.downloader punkt stopwords 0.0s
=> CACHED [production-stage 13/25] RUN python -m spacy download en 0.0s
=> CACHED [production-stage 14/25] RUN pip install tensorflow==1.12.0 0.0s
=> CACHED [production-stage 15/25] RUN mkdir -p /var/lib/deploy/robotreviewer/data 0.0s
=> ERROR [production-stage 16/25] ADD server.py /var/lib/deploy/ 0.0s
=> ERROR [production-stage 17/25] ADD server_api.py /var/lib/deploy/ 0.0s

trouble in downloading

I tried to clone and fetch. Either of them worked for me. The error is same.

Error downloading object: robotreviewer/data/bias/bias_doc_level.npz (233e706): Smudge error: Error downloading robotreviewer/data/bias/bias_doc_level.npz (233e706a323aefec21ca17de531514cc401b5a45e0f690ecb03278fa6f2ea8d7): batch response: Post https://github.com/ijmarshall/robotreviewer3.git/info/lfs/objects/batch: proxyconnect tcp: dial tcp: lookup socks5: no such host

Errors logged to /robotreviewer3/.git/lfs/logs/20190719T112116.708944.log
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: robotreviewer/data/bias/bias_doc_level.npz: smudge filter lfs failed
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'

I reviewed large issues related to installation. One mentioned that the whole file is more than 4 GB. Therefore, I am wondering if there are any other methods for downloading the folder /data. like cloud storage.

Improper config format error

Whenever I try to start the ml worker, I get the following error:

Traceback (most recent call last):
  File "/anaconda3/bin/celery", line 11, in <module>
    sys.exit(main())
  File "/anaconda3/lib/python3.6/site-packages/celery/__main__.py", line 14, in main
    _main()
  File "/anaconda3/lib/python3.6/site-packages/celery/bin/celery.py", line 326, in main
    cmd.execute_from_commandline(argv)
  File "/anaconda3/lib/python3.6/site-packages/celery/bin/celery.py", line 488, in execute_from_commandline
    super(CeleryCommand, self).execute_from_commandline(argv)))
  File "/anaconda3/lib/python3.6/site-packages/celery/bin/base.py", line 279, in execute_from_commandline
    argv = self.setup_app_from_commandline(argv)
  File "/anaconda3/lib/python3.6/site-packages/celery/bin/base.py", line 481, in setup_app_from_commandline
    self.app = self.find_app(app)
  File "/anaconda3/lib/python3.6/site-packages/celery/bin/base.py", line 503, in find_app
    return find_app(app, symbol_by_name=self.symbol_by_name)
  File "/anaconda3/lib/python3.6/site-packages/celery/app/utils.py", line 358, in find_app
    sym = imp(app)
  File "/anaconda3/lib/python3.6/site-packages/celery/utils/imports.py", line 101, in import_from_cwd
    return imp(module, package=package)
  File "/anaconda3/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 978, in _gcd_import
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load
  File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
  File "/Users/.../robotreviewer3/robotreviewer/ml_worker.py", line 64, in <module>
    bots = {"bias_bot": BiasRobot(top_k=3),
  File "/Users/.../robotreviewer3/robotreviewer/robots/rationale_robot.py", line 90, in __init__
    document_model_weights_path=weight_loc)
  File "/Users/.../robotreviewer3/robotreviewer/ml/rationale_CNN.py", line 90, in __init__
    self.doc_model = model_from_json(doc_arch_str)
  File "/anaconda3/lib/python3.6/site-packages/keras/models.py", line 345, in model_from_json
    return layer_module.deserialize(config, custom_objects=custom_objects)
  File "/anaconda3/lib/python3.6/site-packages/keras/layers/__init__.py", line 54, in deserialize
    printable_module_name='layer')
  File "/anaconda3/lib/python3.6/site-packages/keras/utils/generic_utils.py", line 139, in deserialize_keras_object
    list(custom_objects.items())))
  File "/anaconda3/lib/python3.6/site-packages/keras/engine/topology.py", line 2487, in from_config
    process_layer(layer_data)
  File "/anaconda3/lib/python3.6/site-packages/keras/engine/topology.py", line 2473, in process_layer
    custom_objects=custom_objects)
  File "/anaconda3/lib/python3.6/site-packages/keras/layers/__init__.py", line 54, in deserialize
    printable_module_name='layer')
  File "/anaconda3/lib/python3.6/site-packages/keras/utils/generic_utils.py", line 139, in deserialize_keras_object
    list(custom_objects.items())))
  File "/anaconda3/lib/python3.6/site-packages/keras/layers/wrappers.py", line 100, in from_config
    custom_objects=custom_objects)
  File "/anaconda3/lib/python3.6/site-packages/keras/layers/__init__.py", line 54, in deserialize
    printable_module_name='layer')
  File "/anaconda3/lib/python3.6/site-packages/keras/utils/generic_utils.py", line 141, in deserialize_keras_object
    return cls.from_config(config['config'])
  File "/anaconda3/lib/python3.6/site-packages/keras/engine/topology.py", line 1252, in from_config
    return cls(**config)
  File "/anaconda3/lib/python3.6/site-packages/keras/legacy/interfaces.py", line 87, in wrapper
    return func(*args, **kwargs)
  File "/anaconda3/lib/python3.6/site-packages/keras/layers/core.py", line 812, in __init__
    self.kernel_regularizer = regularizers.get(kernel_regularizer)
  File "/anaconda3/lib/python3.6/site-packages/keras/regularizers.py", line 75, in get
    return deserialize(identifier)
  File "/anaconda3/lib/python3.6/site-packages/keras/regularizers.py", line 68, in deserialize
    printable_module_name='regularizer')
  File "/anaconda3/lib/python3.6/site-packages/keras/utils/generic_utils.py", line 122, in deserialize_keras_object
    raise ValueError('Improper config format: ' + str(config))
ValueError: Improper config format: {'name': 'WeightRegularizer', 'l2': 0.10000000149011612, 'l1': 0.0}

'pattern' package not found; tag filters are not available for English

I recently have been trying to set up the latest version of the software locally.

The processing seems to continue indefinitely which I think is more the issue. I got the same results running in Docker and natively on Mac OS 12.0.1.

When looking in the log.txt file I can see that the processing appears to circle indefinitely. The only error I can spot is 'pattern' package not found; tag filters are not available for English. More can be read on my issue.

I have looked everywhere on the web and I cannot seem to find a solution to the problem. I also can't seem to find the package 'pattern ' initialization in the code. This may be because pattern is a common name and when doing a search for a generic word a lot of options appear.

This issue pops up running the code as standard with no changes.

If you have any pointers or supplementary documentation for fixing this issue your help would be greatly appreciated.

Need some help

I was wondering what the bert serving server is used for specifically planning on improving the pico extraction and knowing this would help alot

_pickle.UnpicklingError: invalid load key, 'v'.

I have installed this in anaconda env. with . ./setup.sh. I also pip installed the other dependencies (fuzzywuzzy etc) needed, added grobid to config.json path etc, setting Keras to theano.

This is what I get stuck on when trying to start ml_worker:

bash-3.2$ celery -A robotreviewer.ml_worker worker --loglevel=info
[INFO] robotreviewer.ml_worker 2017-10-22 10:46:44,997: RobotReviewer machine learning tasks starting
[INFO] robotreviewer.textprocessing.pdfreader 2017-10-22 10:46:45,094: Attempting to start Grobid sever...
[INFO] robotreviewer.textprocessing.pdfreader 2017-10-22 10:46:45,094: Launching Grobid process... (from /Users/y-/Documents/Scripts/grobid)
[INFO] robotreviewer.textprocessing.pdfreader 2017-10-22 10:46:45,096: Success! :)
[DEBUG] robotreviewer.textprocessing.tokenizer 2017-10-22 10:46:45,097: Loading spacy.io data for tokenization
[DEBUG] pip.vcs 2017-10-22 10:46:45,308: Registered VCS backend: git
[DEBUG] pip.vcs 2017-10-22 10:46:45,320: Registered VCS backend: hg
[DEBUG] pip.vcs 2017-10-22 10:46:45,354: Registered VCS backend: svn
[DEBUG] pip.vcs 2017-10-22 10:46:45,354: Registered VCS backend: bzr
Using Theano backend.
[DEBUG] gensim.models.doc2vec 2017-10-22 10:46:50,526: Fast version of gensim.models.doc2vec is being used
[INFO] summa.preprocessing.cleaner 2017-10-22 10:46:50,533: 'pattern' package not found; tag filters are not available for English
[INFO] robotreviewer.ml_worker 2017-10-22 10:46:50,535: Loading the robots...
Traceback (most recent call last):
File "/Users/y-/anaconda/bin/celery", line 11, in
sys.exit(main())
File "/Users/y-/anaconda/lib/python3.6/site-packages/celery/main.py", line 14, in main
_main()
File "/Users/y-/anaconda/lib/python3.6/site-packages/celery/bin/celery.py", line 326, in main
cmd.execute_from_commandline(argv)
File "/Users/y-/anaconda/lib/python3.6/site-packages/celery/bin/celery.py", line 488, in execute_from_commandline
super(CeleryCommand, self).execute_from_commandline(argv)))
File "/Users/y-/anaconda/lib/python3.6/site-packages/celery/bin/base.py", line 279, in execute_from_commandline
argv = self.setup_app_from_commandline(argv)
File "/Users/y-/anaconda/lib/python3.6/site-packages/celery/bin/base.py", line 481, in setup_app_from_commandline
self.app = self.find_app(app)
File "/Users/y-/anaconda/lib/python3.6/site-packages/celery/bin/base.py", line 503, in find_app
return find_app(app, symbol_by_name=self.symbol_by_name)
File "/Users/y-/anaconda/lib/python3.6/site-packages/celery/app/utils.py", line 358, in find_app
sym = imp(app)
File "/Users/y-/anaconda/lib/python3.6/site-packages/celery/utils/imports.py", line 101, in import_from_cwd
return imp(module, package=package)
File "/Users/y-/anaconda/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 978, in _gcd_import
File "", line 961, in _find_and_load
File "", line 950, in _find_and_load_unlocked
File "", line 655, in _load_unlocked
File "", line 678, in exec_module
File "", line 205, in _call_with_frames_removed
File "/Users/y-/Documents/Scripts/RB/robotreviewer/ml_worker.py", line 64, in
bots = {"bias_bot": BiasRobot(top_k=3),
File "/Users/y-/Documents/Scripts/RB/robotreviewer/robots/rationale_robot.py", line 88, in init
preprocessor = pickle.load(open(vectorizer_loc, 'rb'))
_pickle.UnpicklingError: invalid load key, 'v'.

Any ideas

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.