Three ways have been provided to run this program: (each is explained separatley.)
- Using the codes directly from GitHub repository.
- Using Docker container.
- Using Singularity Hub for HPC systems.
For this method the following packages should be installed (using pip) :(you can use the setup environment provided)
- Python (version 3.6)
- PyTorch (0.4.0)
- spaCy (2.0.12)
- pandas==0.22.0
- tqm
- colorlog
- allennlp
In addition you have to have following packages (install using apt-get and be sure your apt-get is uptodate : apt-get update ):
- wget
- unzip
- python3.6
- Clone the GitHub repository:
- install all requirements:
pip install -r requirements.txt
- download all the data/word2vec
sh download.sh
If you wan't to use the docker containers, you can download the docker containers from here.
-
Pull the docker file:
docker pull sinaehsani/sansrc_new:1st
-
Run the docker image:
docker run -it sinaehsani/sansrc_new:1st
-
Then you need to download the data/word2vec:
sh download.sh
For an easier run on HPC systems (HPC systems do not support Docker containers), a singularity hub is established for an easier use, to run the singularity hub, use the following codes (it is likley that you may face some issues running the program this way. To solve this problem you sould use the singularity hub to trigger a container first, please look at https://github.com/sinaehsani6/dockertosing to see a singularity recepie example):
-
Pull the singularity file:
singularity pull shub://sinaehsani6/dockertosing
-
Run the singularity image:
singularity shell sinaehsani6-dockertosing-master-latest.simg
-
Clone the GitHub repository:
-
Then you need to download the data/word2vec:
sh download.sh
- preprocess data
python prepro.py
- train a Model
python train.py
train a Model with ELMo
python train.py --elmo_on
- preprocess data
python prepro2.py
- train a Model
python train2.py
Most defentions were imported from: https://github.com/kevinduh/san_mrc
Some of code are adapted from: https://github.com/hitvoice/DrQA
ELMo is from: https://allennlp.org