The code is based on Huggingface transformer examples: question-answering
# From the repository root:
python preprocess/reconstruct.py
python preprocess/genqa_joint.py
python preprocess/entailment.py
This subproject uses PDM to manage dependencies and virtual environments. To install PDM, run: check their website.
Python 3.10+ is required. I recommend using pyenv to manage Python versions.
After that, run the following commands to install dependencies and create a virtual environment:
pdm install
source .venv/bin/activate
Train joint extraction and classification model:
python self_critique/minimal/seq2seq.py --config config/extraction.json
Train reconstruction model:
python self_critique/minimal/seq2seq.py --config config/reconstruct.json
Train text entailment model:
python self_critique/minimal/entailment.py --config config/entailment_deberta.json
Train Reinforcement Learning model:
cd self_critique/rl
python train.py --config config.json