Giter Site home page Giter Site logo

paragraphranker's People

Contributors

donghyeonk avatar jhyuklee 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

Watchers

 avatar  avatar  avatar  avatar

paragraphranker's Issues

when evaluation, it shows no module named 'drqa'

Below is the error output, even though I have developed the according to the DrQA. I think the reason is pytorch version? Right now I am using pytorch=0.4.1, while DrQA is not compatible with this version.
Hope someone can help me thanks.
By the way, can i do the interactive retriever with the help of Paragraph Ranker?

12/13/2018 05:26:03 PM: [ COMMAND: entityqa/pipeline/predict.py --query-type SQuAD --ranker-type default --reader-type default ]
12/13/2018 05:26:03 PM: [ ---------------------------------------------------------------------------------------------------- ]
12/13/2018 05:26:03 PM: [ CONFIG:
{
    "candidate_file": null,
    "cuda": true,
    "data_workers": 5,
    "db_path": "/home/jiangkunhaha/ParagraphRanker/data/wikipedia/docs.db",
    "embed_dir": "/home/jiangkunhaha/datasets",
    "embedding_dim": 300,
    "embedding_file": "/home/jiangkunhaha/datasets/glove/glove.840B.300d.txt",
    "fasttext": false,
    "gpu": -1,
    "log_file": "/home/jiangkunhaha/ParagraphRanker/entityqa/pipeline/results/20181213-d59542b8.txt",
    "match": "string",
    "model_dir": "/home/jiangkunhaha/ParagraphRanker/entityqa/pipeline/results",
    "model_name": "20181213-d59542b8",
    "module_batch_size": 64,
    "module_max_loaders": 5,
    "n_docs": 20,
    "n_pars": 200,
    "no_cuda": false,
    "parallel": false,
    "pred_file": "/home/jiangkunhaha/ParagraphRanker/entityqa/pipeline/results/pred_20181213-d59542b8.json",
    "predict_batch_size": 100,
    "query_data": "/home/jiangkunhaha/ParagraphRanker/data/datasets/SQuAD-v1.1-dev.txt",
    "query_split": "dev",
    "query_type": "SQuAD",
    "random_seed": 1013,
    "ranker_file": "/home/jiangkunhaha/ParagraphRanker/entityqa/pipeline/results/20181213-d59542b8.ranker",
    "ranker_path": "/home/jiangkunhaha/ParagraphRanker/entityqa/ranker/results/20181212-a0db0070.mdl",
    "ranker_type": "default",
    "reader_path": "/home/jiangkunhaha/ParagraphRanker/entityqa/reader/results/single.mdl",
    "reader_type": "default",
    "retriever_path": "/home/jiangkunhaha/ParagraphRanker/data/wikipedia/docs-tfidf-ngram=2-hash=16777216-tokenizer=simple.npz",
    "tokenizer": "regexp",
    "train": false,
    "train_epoch": 30
} ]
12/13/2018 05:26:03 PM: [ Reading query data /home/jiangkunhaha/ParagraphRanker/data/datasets/SQuAD-v1.1-dev.txt ]
12/13/2018 05:26:03 PM: [ Initializing pipeline... ]
12/13/2018 05:26:03 PM: [ Loading retriever /home/jiangkunhaha/ParagraphRanker/data/wikipedia/docs-tfidf-ngram=2-hash=16777216-tokenizer=simple.npz ]
12/13/2018 05:26:35 PM: [ Loading ranker /home/jiangkunhaha/ParagraphRanker/entityqa/ranker/results/20181212-a0db0070.mdl ]
12/13/2018 05:26:37 PM: [ Loading reader /home/jiangkunhaha/ParagraphRanker/entityqa/reader/results/single.mdl ]
Traceback (most recent call last):
  File "entityqa/pipeline/predict.py", line 367, in <module>
    main(args)
  File "entityqa/pipeline/predict.py", line 257, in main
    fixed_candidates=candidates)
  File "/home/jiangkunhaha/ParagraphRanker/entityqa/pipeline/root/pipeline/pipeline.py", line 74, in __init__
    self.reader = DocReader.load(reader_path, normalize=False)
  File "/home/jiangkunhaha/ParagraphRanker/entityqa/pipeline/root/reader/model.py", line 438, in load
    filename, map_location=lambda storage, loc: storage
  File "/home/jiangkunhaha/anaconda3/envs/ranker/lib/python3.6/site-packages/torch/serialization.py", line 358, in load
    return _load(f, map_location, pickle_module)
  File "/home/jiangkunhaha/anaconda3/envs/ranker/lib/python3.6/site-packages/torch/serialization.py", line 542, in _load
    result = unpickler.load()
ModuleNotFoundError: No module named 'drqa'

Lack of details about tdidf ranker

Need more information on these lines in entityqa/pipeline/predict.py,

RET_PATH = os.path.join(PATHS['WIKI'],
'docs-tfidf-ngram=2-hash=16777216-tokenizer=simple.npz')
DOC_DB_PATH = os.path.join(PATHS['WIKI'], 'docs.db')

Modification required in download.sh

In line 17 in download.sh,

wget -O "$DOWNLOAD_PATH_TAR" "https://s3.amazonaws.com/fair-data/drqa/data.tar.gz"

has to be replaced with,

wget -O "$DOWNLOAD_PATH_TAR" "https://dl.fbaipublicfiles.com/drqa/data.tar.gz"

Since the file location has been changed. :)

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.