Fixed README formatting issues

main
Pavan Mandava 3 years ago
parent 287ec9164d
commit f2255db776

@ -31,6 +31,7 @@ Create an environment for baseline training with a specific python version (Pyth
```shell
conda create -n <baseline-env-name> python=3.6
```
### Create conda environment (for prompt learning)
Create an environment for prompt-based methods (Python 3.10 is **required**)
```shell
@ -48,6 +49,7 @@ To deactivate the conda environment, run: (Only after running all the experiment
```shell
conda deactivate
```
#### Download and extract SOLOIST pre-trained model
Download and unzip the pretrained model, this is used for fine-tuning 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).
@ -66,10 +68,12 @@ 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
@ -121,6 +125,7 @@ Train a separate model for each data split. Edit the [train_baseline.sh](baselin
```shell
sh train_baseline.sh -d <data-split-name>
```
Pass the data split name to `-d` flag. Possible values are: `5-dpd`, `10-dpd`, `50-dpd`, `100-dpd`, `125-dpd`, `250-dpd`
Example training command: `sh train_baseline.sh -d 50-dpd`
@ -132,12 +137,14 @@ Set the `MODEL_CHECKPOINT` environment variable with the path to the chosen mode
```shell
export MODEL_CHECKPOINT=<experiment-folder>/<data-split-name>/<checkpoint-folder>
```
Example: `export MODEL_CHECKPOINT=experiment-20220831/100-dpd/checkpoint-90000`
Generate belief states by running decode script
```shell
sh decode_baseline.sh
```
The generated predictions are saved under `OUTPUTS_DIR_BASELINE` folder. Some of the generated belief state predictions are uploaded to this repository and can be found under [outputs](outputs) folder.
### Baseline Evaluation
@ -148,6 +155,7 @@ Edit the [evaluate.py](baseline/evaluate.py) to set the predictions output file
```shell
python evaluate.py
```
### Results from baseline experiments
|data-split| JGA |
|--|:--:|
@ -172,20 +180,26 @@ Change directory to `prompt-learning` and install the requirements. Make sure th
cd prompt-learning
pip install requirements.txt
```
### Train the prompt model
Train a separate model for each data split. Edit the [train_prompting.sh](prompt-learning/train_prompting.sh) file to modify the default hyperparameters for training (learning rate, epochs).
```shell
sh train_prompting.sh -d <data-split-name>
```
Pass the data split name to `-d` flag.
Possible values are: `5-dpd`, `10-dpd`, `50-dpd`, `100-dpd`, `125-dpd`, `250-dpd`
Example training command: `sh train_baseline.sh -d 50-dpd`
**Some `train_prompting.sh` flags**:
`--num_epochs 10` - Number of epochs
`--learning_rate 5e-5` - Initial learning rate for Optimizer
`--with_inverse_prompt` - Use Inverse Prompt while training
`--inverse_prompt_weight 0.1` - Weight of the inverse prompt for loss function
**Note:** The defaults in `train_prompting.sh` are the best performing values.
@ -197,6 +211,7 @@ Generate belief states by running the below script:
```shell
sh test_prompting.sh -m <tuned-prompt-model-path>
```
The argument `-m` takes the relative path of saved model from `SAVED_MODELS_PROMPT` env variable. It takes the following structure `-m <data-split-name>/<experiment-folder>/<epoch-folder>`
Example: `sh test_prompting.sh -m 50-dpd/experiment-20221003T172424/epoch-09`
@ -210,6 +225,7 @@ Edit the [evaluate.py](prompt-learning/evaluate.py) to set the predictions outpu
```shell
python evaluate.py
```
### Results from prompt-based belief state generations
|data-split| JGA* |
|--|:--:|
@ -241,4 +257,5 @@ Generate belief states by running the below script:
```shell
sh test_prompting.sh -m <tuned-prompt-model-path>
```
// TODO :: Add results

Loading…
Cancel
Save