Skip to content

Commit

Permalink
add e2e docs (#7512)
Browse files Browse the repository at this point in the history
* change TED default params

* Update docs/docs/training-data-format.mdx

Co-authored-by: Tanja <tabergma@gmail.com>

* Update docs/docs/training-data-format.mdx

Co-authored-by: Tanja <tabergma@gmail.com>

* Update docs/docs/training-data-format.mdx

Co-authored-by: Tanja <tabergma@gmail.com>

* update docs phrases

* break long line

* add changelog

* add deprecation config for dense dimension

* fix new config parameters

* add comments for config params

* fix docstrings

* update comments

* update migration guide with new ted parameters

* update changelog

* a lot of bug fixes regarding updating config

* fix updating config dict again

* Update docs/docs/training-data-format.mdx

Co-authored-by: Tanja <tabergma@gmail.com>

* remove new-old config param descriptions

* remove else

* add docstring

* update changelog

* Update docs/docs/stories.mdx

Co-authored-by: Ella Rohm-Ensing <erohmensing@gmail.com>

* Update docs/docs/stories.mdx

Co-authored-by: Ella Rohm-Ensing <erohmensing@gmail.com>

* Update docs/docs/training-data-format.mdx

Co-authored-by: Ella Rohm-Ensing <erohmensing@gmail.com>

* Update docs/docs/training-data-format.mdx

Co-authored-by: Ella Rohm-Ensing <erohmensing@gmail.com>

* update stories.mdx

* update training-data-format.mdx

* substitute we with you

* don't include e2e in the stories example

* make list

* remove required

* add migration guide for domain changes

* mention  explicitly

* fix import

* add link to ted policy

* add docstrings

* fix updating config

* move e2e into separate paragraph

* add blank line back

* add increased train time note

* Update docs/docs/migration-guide.mdx

Co-authored-by: Ben Quachtran <65514514+b-quachtran@users.noreply.github.com>

* Update docs/docs/migration-guide.mdx

Co-authored-by: Ben Quachtran <65514514+b-quachtran@users.noreply.github.com>

* Update docs/docs/training-data-format.mdx

Co-authored-by: Akela Drissner-Schmid <32450038+akelad@users.noreply.github.com>

* remove the link to the training data format page

* remove the line'

* remove the line

* break long line

* Update changelog/7496.improvement.md

Co-authored-by: Tobias Wochinger <t.wochinger@rasa.com>

* Update docs/docs/stories.mdx

Co-authored-by: Tobias Wochinger <t.wochinger@rasa.com>

* Update docs/docs/stories.mdx

Co-authored-by: Tobias Wochinger <t.wochinger@rasa.com>

* Update docs/docs/stories.mdx

Co-authored-by: Tobias Wochinger <t.wochinger@rasa.com>

* Update docs/docs/training-data-format.mdx

Co-authored-by: Tobias Wochinger <t.wochinger@rasa.com>

* Update docs/docs/training-data-format.mdx

Co-authored-by: Tobias Wochinger <t.wochinger@rasa.com>

* Update docs/docs/migration-guide.mdx

Co-authored-by: Sam Sucik <s.sucik@rasa.com>

* Update docs/docs/stories.mdx

Co-authored-by: Tobias Wochinger <t.wochinger@rasa.com>

* Update docs/docs/stories.mdx

Co-authored-by: Tobias Wochinger <t.wochinger@rasa.com>

* Update docs/docs/policies.mdx

Co-authored-by: Sam Sucik <s.sucik@rasa.com>

* Update docs/docs/policies.mdx

Co-authored-by: Sam Sucik <s.sucik@rasa.com>

* Update docs/docs/policies.mdx

Co-authored-by: Sam Sucik <s.sucik@rasa.com>

* Update docs/docs/migration-guide.mdx

Co-authored-by: Sam Sucik <s.sucik@rasa.com>

* Update docs/docs/stories.mdx

Co-authored-by: Tobias Wochinger <t.wochinger@rasa.com>

* Update docs/docs/stories.mdx

Co-authored-by: Tobias Wochinger <t.wochinger@rasa.com>

* Update docs/docs/stories.mdx

Co-authored-by: Tobias Wochinger <t.wochinger@rasa.com>

* Update docs/docs/policies.mdx

Co-authored-by: Sam Sucik <s.sucik@rasa.com>

* Update docs/docs/policies.mdx

Co-authored-by: Sam Sucik <s.sucik@rasa.com>

* Update docs/docs/policies.mdx

Co-authored-by: Sam Sucik <s.sucik@rasa.com>

* Update docs/docs/policies.mdx

Co-authored-by: Sam Sucik <s.sucik@rasa.com>

* Update docs/docs/policies.mdx

Co-authored-by: Sam Sucik <s.sucik@rasa.com>

* Update docs/docs/stories.mdx

Co-authored-by: Sam Sucik <s.sucik@rasa.com>

* Update docs/docs/stories.mdx

Co-authored-by: Sam Sucik <s.sucik@rasa.com>

* Update docs/docs/stories.mdx

Co-authored-by: Sam Sucik <s.sucik@rasa.com>

* Update docs/docs/stories.mdx

Co-authored-by: Sam Sucik <s.sucik@rasa.com>

* Update docs/docs/stories.mdx

Co-authored-by: Sam Sucik <s.sucik@rasa.com>

* Update docs/docs/training-data-format.mdx

Co-authored-by: Sam Sucik <s.sucik@rasa.com>

* Update docs/docs/training-data-format.mdx

Co-authored-by: Sam Sucik <s.sucik@rasa.com>

* Update docs/docs/training-data-format.mdx

Co-authored-by: Sam Sucik <s.sucik@rasa.com>

* Update docs/docs/training-data-format.mdx

Co-authored-by: Sam Sucik <s.sucik@rasa.com>

* Update docs/docs/training-data-format.mdx

Co-authored-by: Sam Sucik <s.sucik@rasa.com>

* Update docs/docs/training-data-format.mdx

Co-authored-by: Sam Sucik <s.sucik@rasa.com>

* Update docs/docs/training-data-format.mdx

Co-authored-by: Sam Sucik <s.sucik@rasa.com>

* Update docs/docs/migration-guide.mdx

Co-authored-by: Sam Sucik <s.sucik@rasa.com>

* add example to migration guide

* remove notes

* rename changelog to feature

* Update docs/docs/stories.mdx

Co-authored-by: Tobias Wochinger <t.wochinger@rasa.com>

* expand explanation

* update examples in docs to have the same topic as e2ebot

* copy ted description from diet

* update parameter description

* fix overriding default config

* Update docs/docs/training-data-format.mdx

Co-authored-by: Tobias Wochinger <t.wochinger@rasa.com>

* Update docs/docs/training-data-format.mdx

Co-authored-by: Tobias Wochinger <t.wochinger@rasa.com>

* add actions to doc stories

* update story

* more details in error message

Co-authored-by: Tanja <tabergma@gmail.com>
Co-authored-by: Ella Rohm-Ensing <erohmensing@gmail.com>
Co-authored-by: Tobias Wochinger <t.wochinger@rasa.com>
Co-authored-by: Ben Quachtran <65514514+b-quachtran@users.noreply.github.com>
Co-authored-by: Akela Drissner-Schmid <32450038+akelad@users.noreply.github.com>
Co-authored-by: Sam Sucik <s.sucik@rasa.com>
Co-authored-by: m-vdb <m.verger@rasa.com>
  • Loading branch information
8 people authored Dec 16, 2020
1 parent c40b580 commit 24ea74e
Show file tree
Hide file tree
Showing 16 changed files with 645 additions and 252 deletions.
36 changes: 36 additions & 0 deletions changelog/7496.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Make [TED Policy](./policies.mdx#ted-policy) an end-to-end policy. Namely, make it possible to train TED on stories that contain
intent and entities or user text and bot actions or bot text.
If you don't have text in your stories, TED will behave the same way as before.
Add possibility to predict entities using TED.

Here's an example of a dialogue in the Rasa story format:

```rasa-yaml
stories:
- story: collect restaurant booking info # name of the story - just for debugging
steps:
- intent: greet # user message with no entities
- action: utter_ask_howcanhelp # action that the bot should execute
- intent: inform # user message with entities
entities:
- location: "rome"
- price: "cheap"
- bot: On it # actual text that bot can output
- action: utter_ask_cuisine
- user: I would like [spanish](cuisine). # actual text that user input
- action: utter_ask_num_people
```

Some model options for `TEDPolicy` got renamed.
Please update your configuration files using the following mapping:

| Old model option | New model option |
|-----------------------------|--------------------------------------------------------|
|transformer_size |dictionary “transformer_size” with keys |
| |“text”, “action_text”, “label_action_text”, “dialogue” |
|number_of_transformer_layers |dictionary “number_of_transformer_layers” with keys |
| |“text”, “action_text”, “label_action_text”, “dialogue” |
|dense_dimension |dictionary “dense_dimension” with keys |
| |“text”, “action_text”, “label_action_text”, “intent”, |
| |“action_name”, “label_action_name”, “entities”, “slots”,|
| |“active_loop” |
6 changes: 3 additions & 3 deletions docs/docs/components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1485,7 +1485,7 @@ However, additional parameters exist that can be adapted.
+=================================+==================+==============================================================+
| hidden_layers_sizes | text: [] | Hidden layer sizes for layers before the embedding layers |
| | label: [] | for user messages and labels. The number of hidden layers is |
| | | equal to the length of the corresponding. |
| | | equal to the length of the corresponding list. |
+---------------------------------+------------------+--------------------------------------------------------------+
| share_hidden_layers | False | Whether to share the hidden layer weights between user |
| | | messages and labels. |
Expand Down Expand Up @@ -1519,8 +1519,8 @@ However, additional parameters exist that can be adapted.
+---------------------------------+------------------+--------------------------------------------------------------+
| embedding_dimension | 20 | Dimension size of embedding vectors. |
+---------------------------------+------------------+--------------------------------------------------------------+
| dense_dimension | text: 128 | Dense dimension for sparse features to use if no dense |
| | label: 20 | features are present. |
| dense_dimension | text: 128 | Dense dimension for sparse features to use. |
| | label: 20 | |
+---------------------------------+------------------+--------------------------------------------------------------+
| concat_dimension | text: 128 | Concat dimension for sequence and sentence features. |
| | label: 20 | |
Expand Down
56 changes: 56 additions & 0 deletions docs/docs/migration-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,54 @@ how you can migrate from one version to another.

## Rasa 2.1 to Rasa 2.2

### General

`TEDPolicy`'s `transformer_size`, `number_of_transformer_layers`,
and `dense_dimensions` parameters have been renamed.
Please update your configuration files using the following mapping:

| Old Model Parameter | New Model Parameter |
|-----------------------------|--------------------------------------------------------|
|`transformer_size` |dictionary `transformer_size` with keys |
| |`text`, `action_text`, `label_action_text`, `dialogue` |
|`number_of_transformer_layers`|dictionary `number_of_transformer_layers` with keys |
| |`text`, `action_text`, `label_action_text`, `dialogue` |
|`dense_dimension` |dictionary `dense_dimension` with keys |
| |`text`, `action_text`, `label_action_text`, `intent`, |
| |`action_name`, `label_action_name`, `entities`, `slots`,|
| |`active_loop` |

For example:

```yaml-rasa title="config.yml"
policies:
- name: TEDPolicy
transformer_size:
text: 128
action_text: 128
label_action_text: 128
dialogue: 128
number_of_transformer_layers:
text: 1
action_text: 1
label_action_text: 1
dialogue: 1
dense_dimension:
text: 128
action_text: 128
label_action_text: 128
intent: 20
action_name: 20
label_action_name: 20
entities: 20
slots: 20
active_loop: 20
```


### Deprecations

#### Markdown Data
Training and test data in Markdown format is now deprecated. This includes:
- reading and writing of story files in Markdown format
- reading and writing of NLU data in Markdown format
Expand All @@ -24,13 +70,23 @@ Support for Markdown data will be removed entirely in Rasa Open Source 3.0.0.
Please convert your existing Markdown data by using the commands
described [here](./migration-guide.mdx#training-data-files).


### Policies

[Policies](./policies.mdx) now require a `**kwargs` argument in their constructor and `load` method.
Policies without `**kwargs` will be supported until Rasa version `3.0.0`.
However when using [incremental training](./command-line-interface.mdx#incremental-training)
`**kwargs` **must** be included.


#### Other

* `Domain.random_template_for` is deprecated and will be removed in Rasa Open Source
3.0.0. You can alternatively use the `TemplatedNaturalLanguageGenerator`.
* `Domain.action_names` is deprecated and will be removed in Rasa Open Source
3.0.0. Please use `Domain.action_names_or_texts` instead.


## Rasa 2.0 to Rasa 2.1

### Deprecations
Expand Down
Loading

0 comments on commit 24ea74e

Please sign in to comment.