Giter VIP home page Giter VIP logo

qa_explaination's Introduction

qa_explaination

Official Github repo for the paper "Explaining Question Answering Models through Text Generation".

This repo is basically an allennlp package, so allennlp installation is required, as well as some adjustments to its trainer.py file if you want to allow gradient accumulation.

The current configuration is set to reproduce the TOP-K=3 model results on a V100 GPU, with the similarity and LM-based classifiers trained jointly on CommonsenseQA.

To train the model, update the paths in the configs/config.jsonnet file.

If you want to use gradient accumulation, you can use the changes I added in my trainer.py file (allennlp version 0.9.0) and incorporate them in your respective /allennlp/training/trainer.py file.

In any case, delete the trainer.py file from the current package afterwards.

Then run: allennlp train ./qa_explanation/configs/config.jsonnet -s YOUR_OUTPUT_LOCATION --include-package qa_explanation

qa_explaination's People

Contributors

nika2312 avatar

Stargazers

 avatar  avatar Yichuan LI avatar Jonathan Zhang avatar  avatar Ana Marasovic avatar MyungHoon Jin avatar Yejin Cho avatar Roman Hossain Shaon avatar TAO avatar Dongfang Li avatar  avatar Sotaro Takeshita / 竹下 颯太郎 avatar

Watchers

Edward Kamau avatar  avatar

Forkers

veralily carusyte

qa_explaination's Issues

TypeError: 'type' object is not subscriptable

system
python version 3.7.0
allennlp version 1.1.0

Traceback (most recent call last):
File "c:\users\dasd\anaconda3\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "c:\users\dasd\anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\DASD\Anaconda3\Scripts\allennlp.exe_main
.py", line 7, in
File "c:\users\dasd\anaconda3\lib\site-packages\allennlp_main
.py", line 34, in run
main(prog="allennlp")
File "c:\users\dasd\anaconda3\lib\site-packages\allennlp\commands_init_.py", line 91, in main
import_module_and_submodules(package_name)
File "c:\users\dasd\anaconda3\lib\site-packages\allennlp\common\util.py", line 340, in import_module_and_submodules
module = importlib.import_module(package_name)
File "c:\users\dasd\anaconda3\lib\importlib_init_.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in load_unlocked
File "", line 728, in exec_module
File "", line 219, in call_with_frames_removed
File "E:\code\git\qa_explanation_init
.py", line 3, in
from qa_explanation.indexers import *
File "E:\code\git\qa_explanation\indexers_init
.py", line 1, in
from qa_explanation.indexers.pretrained_transformer_indexer import PretrainedTransformerIndexerLocal
File "E:\code\git\qa_explanation\indexers\pretrained_transformer_indexer.py", line 18, in
class PretrainedTransformerIndexerLocal(TokenIndexer[int]):
TypeError: 'type' object is not subscriptable

can you tell me what's wrong with me ?

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.