Skip to content

Alab-NII/PhraseRL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PhraseRL

Introduction

This repository contains implementation of PhraseRL, which is introduced in the following paper:

Preparation

Use poetry to download dependencies.

# Install dependencies
poetry install
# Download MultiWOZ data
sh bin/fetch_data.sh

Run

Supervised Learning

The model first needs to be trained with supervised learning with the following commands:

# Train DISC model
poetry shell
python bin/train.py -c configs/disc.toml -s 0 -o outputs/disc
# Test
python bin/test.py -o outputs/disc -m best_model.pt
# Displaying outputs
python bin/display_model.py -o outputs/disc -n 10 -m best_model.pt

Reinforcement Learning

To run additional training with reinforcement learning, execute the following commands:

# Train DISC model
poetry shell
python bin/policy.py -c outputs/disc/config.toml configs/rl.toml -s 0 -o outputs/disc-rl -m outputs/disc/best_model.pt
# Test
python bin/test.py -o outputs/disc-rl -m best_model.pt
# Displaying outputs
python bin/display_model.py -o outputs/disc-rl -n 10 -m best_model.pt

About

Phrase-Level Reinforcement Learning

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published