From 8fef49d43cb81dd4e98945363f57f1a09767a924 Mon Sep 17 00:00:00 2001 From: Pavan Mandava Date: Thu, 8 Sep 2022 17:03:07 +0530 Subject: [PATCH] Added Environment setup section to README.md notes --- README.md | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 73 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5af29dd..4f570a5 100644 --- a/README.md +++ b/README.md @@ -16,4 +16,76 @@ MultiWOZ 2.1 [dataset](https://github.com/budzianowski/multiwoz/blob/master/data | valid | 190 | 900 | | test | 193 | 894 | -In the above table, term "*dpd*" refers to "*dialogues per domain*". For example, *50-dpd* means *50 dialogues per each domain*. \ No newline at end of file +In the above table, term "*dpd*" refers to "*dialogues per domain*". For example, *50-dpd* means *50 dialogues per each domain*. + +All the training and testing data can be found under [/data/baseline/](data/baseline/) folder. + +## Environment Setup +### Baseline (SOLOIST) Environment Setup +Python 3.6 is required for training the baseline model. `conda` is used for creating environments. + +#### Create conda environment +Create an environment with specific python version (Python 3.6). +```shell +conda create -n python=3.6 +``` + +#### Activate the conda environment +Activate the conda environment for installing the requirements. +```shell +conda activate +``` + +#### Deactivating the conda evironment +Deactivate the conda environment by running the following command: +(After running all the experiments) +```shell +conda deactivate +``` +#### Download and extract SOLOIST pre-trained model +Download and unzip the pretrained model, this is used for finetuning the baseline and prompt-based methods. For more details about the pre-trained SOLOIST model, refer to the GitHub [repo](https://github.com/pengbaolin/soloist). + +Download the zip file, replace the `/path/to/folder` from the below command to a folder of your choice. +```shell +wget https://bapengstorage.blob.core.windows.net/soloist/gtg_pretrained.tar.gz \ + -P /path/to/folder/ +``` + +Extract the downloaded pretrained model zip file. +```shell +tar -xvf /path/to/folder/gtg_pretrained.tar.gz +``` + +#### Clone the repository +Clone the repository for source code +```shell +git clone https://git.pavanmandava.com/pavan/master-thesis.git +``` +Pull the changes from remote (if local is behind the remote) +```shell +git pull +``` +Change directory +```shell +cd master-thesis +``` + +#### Set Environment variables +Next step is to set environment variables that contains path to pre-trained model, saved models and output dirs. + +Edit the [set_env.sh](set_env.sh) file and set the paths for: (`nano` or `vim` can be used) +`PRE_TRAINED_SOLOIST` - Path to the extracted pre-trained SOLOIST model +`SAVED_MODELS_BASELINE` - Path for saving the trained models at checkpoints +`OUTPUTS_DIR_BASELINE` - Path for storing the outputs of belief state predictions. + +```shell +nano set_env.sh +``` +Save the edited file and `source` it +```shell +source set_env.sh +``` +Run the below line to unset the environment variables +```shell +sh unset_env.sh +```