Skip to content
Starter code for Stanford CS224n default final project on SQuAD 2.0
Python
Branch: master
Clone or download
Latest commit 01dc3ad Jul 22, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data . Apr 3, 2019
save . Apr 3, 2019
.gitignore . Apr 3, 2019
LICENSE Add license, README. Jun 11, 2019
README.md Add license, README. Jun 11, 2019
args.py Revert "Add multi-processing in setup.py" Jul 22, 2019
environment.yml . Apr 3, 2019
layers.py . Apr 3, 2019
models.py . Apr 3, 2019
setup.py Revert "Add multi-processing in setup.py" Jul 22, 2019
test.py added f strings Jun 24, 2019
train.py added f strings Jun 24, 2019
util.py fixed f string errors Jul 2, 2019

README.md

Setup

  1. Make sure you have Miniconda installed

    1. Conda is a package manager that sandboxes your project’s dependencies in a virtual environment
    2. Miniconda contains Conda and its dependencies with no extra packages by default (as opposed to Anaconda, which installs some extra packages)
  2. cd into src, run conda env create -f environment.yml

    1. This creates a Conda environment called squad
  3. Run source activate squad

    1. This activates the squad environment
    2. Do this each time you want to write/test your code
  4. Run python setup.py

    1. This downloads SQuAD 2.0 training and dev sets, as well as the GloVe 300-dimensional word vectors (840B)
    2. This also pre-processes the dataset for efficient data loading
    3. For a MacBook Pro on the Stanford network, setup.py takes around 30 minutes total
  5. Browse the code in train.py

    1. The train.py script is the entry point for training a model. It reads command-line arguments, loads the SQuAD dataset, and trains a model.
    2. You may find it helpful to browse the arguments provided by the starter code. Either look directly at the parser.add_argument lines in the source code, or run python train.py -h.
You can’t perform that action at this time.