This repository contains code for the paper Variational Learning for Unsupervised Knowledge Grounded Dialogs.
Flags used to run the code:
--params_file
Path to params file--eval_only
If passed, models only generate responses (no training is done)--checkpoint
Checkpoint name to load from--knowledge_file
Path to knowledge.jsonl--labels_file
File to evaluate (only to be used when --eval_only is used)--output_file
Path to dump generated outputs (only to be used when --eval_only is used)--model_path
Path to save/load the model from--prior_path
Path to load the prior from (only use if model_path is not specified)--posterior_path
Path to load the posterior from (only use if model_path is not specified)--decoder_path
Path to load the decoder from (only use if model_path is not specified)--build_index
Builds index and exits (needs to be run before training)--n_gpus
Number of GPUs to use (defaults to 1) (May not work)--dialog
To be passed if dataset is a dialog dataset--save_every
Save every nth step (Never tested this argument so don't use. By default saves on each epoch)--multitask
Pass to use a classifier loss with decoder to classify CANNOTANSWER instances--weight
Weight for CANNOTANSWER instances (only use if --weigh_cannot_answer is passed)--weigh_cannot_answer
Weigh CANNOTANSWER instances--skip_cannot_answer
Skips CANNOTANSWER instances--fix_DPR
Fix both prior and posterior during training--fix_prior
Fix only prior during training--fix_posterior
Fix only posterior during training--fix_decoder
Fix only decoder during training
run prepare_data.sh to uncompress the data. Look at train.sh and val.sh for how to train and evaluate the models respectively.