convlab2.policy.mle package

Submodules

convlab2.policy.mle.loader module

class convlab2.policy.mle.loader.ActMLEPolicyDataLoader

Bases: object

create_dataset(part, batchsz)

convlab2.policy.mle.mle module

class convlab2.policy.mle.mle.MLEAbstract(archive_file, model_file)

Bases: convlab2.policy.policy.Policy

init_session()

Restore after one session

load(filename)
load_from_pretrained(archive_file, model_file, filename)
predict(state)

Predict an system action given state. Args:

state (dict): Dialog state. Please refer to util/state.py

Returns:

action : System act, with the form of (act_type, {slot_name_1: value_1, slot_name_2, value_2, …})

convlab2.policy.mle.train module

class convlab2.policy.mle.train.MLE_Trainer_Abstract(manager, cfg)

Bases: object

imit_test(epoch, best)

provide an unbiased evaluation of the policy fit on the training dataset

imitating(epoch)

pretrain the policy by simple imitation learning (behavioral cloning)

policy_loop(data)
save(directory, epoch)
test()

Module contents