Transformer Embedding Dialogue (TED) Policy.
The model architecture is described in detail in https://arxiv.org/abs/1910.00486. In summary, the architecture comprises of the following steps:
Declares instance variables with default values.
Gets the class of the model architecture to be used by the policy.
Feeds the featurized training data to the model.
model_data- Featurized training data.
label_ids- Label ids corresponding to the data points in
model_data. These may or may not be used by the function depending on how the policy is trained.
Trains the policy on given training trackers.
training_trackers- List of training trackers to be used for training the model.
domain- Domain of the assistant.
interpreter- NLU Interpreter to be used for featurizing the states.
**kwargs- Any other argument.
Predicts the next action the bot should take after seeing the tracker.
tracker- the :class:
domain- the :class:
interpreter- Interpreter which may be used by the policies to create additional features.
The policy's prediction (e.g. the probabilities for the actions).
Persists the policy to a storage.
Persists model's utility attributes like model weights, etc.
model_path- Path where model is to be persisted
Loads a policy from the storage.
path- Path on disk where policy is persisted.
should_finetune- Whether to load the policy for finetuning.
epoch_override- Override the number of epochs in persisted configuration for further finetuning.
**kwargs- Any other arguments
PolicyModelNotFound if the model is not found in the supplied