Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introduce end-to-end processing into rasa #7496

Merged
merged 257 commits into from
Dec 16, 2020
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
257 commits
Select commit Hold shift + click to select a range
a7b68ac
fix a test
evgeniiaraz Sep 16, 2020
e1874fc
Merge pull request #6690 from RasaHQ/getting_rid_of_intent_name
evgeniiaraz Sep 16, 2020
5c52ef3
action texts in importer added to action_text in domain
evgeniiaraz Sep 16, 2020
e1bb74f
a little end-to-end bot example
evgeniiaraz Sep 16, 2020
f7ac57b
implement hacky e2e prediction
Ghostvv Sep 17, 2020
9346f4d
fix warnings
evgeniiaraz Sep 17, 2020
98207d3
fix user uttered featurization
Ghostvv Sep 17, 2020
66c0e6a
Merge branch 'e2e' of https://github.com/RasaHQ/rasa into e2e
Ghostvv Sep 17, 2020
03c1652
fix useruttered featurization
Ghostvv Sep 17, 2020
17b64fd
100 epochs
evgeniiaraz Sep 17, 2020
b39b29f
fix writin bot action text to file
evgeniiaraz Sep 17, 2020
cefa720
store action text in wrong text
evgeniiaraz Sep 17, 2020
857ff4a
add the comment to bot end-to-end utterance
evgeniiaraz Sep 17, 2020
224aab4
update printing e2e utterances
Ghostvv Sep 17, 2020
c604f09
fix single type input
Ghostvv Sep 18, 2020
df06efe
fix e2e prediction after action
Ghostvv Sep 18, 2020
84bde12
implement comparison between e2e policies
Ghostvv Sep 21, 2020
9a8e55a
reduce e2e confidence threshold
Ghostvv Sep 21, 2020
0a670e1
Merge branch 'master' into e2e
Ghostvv Sep 22, 2020
49c350f
fix rule policy
Ghostvv Sep 22, 2020
a30b4ce
fix non e2e prediction
Ghostvv Sep 22, 2020
298d88a
fix cleaning of working data
evgeniiaraz Sep 24, 2020
0c41b07
fix in regex featurizer processing
evgeniiaraz Sep 24, 2020
80ced2e
Merge branch 'master' into e2e
tabergma Sep 29, 2020
da51ee5
Merge branch 'master' into e2e
tabergma Sep 30, 2020
b976c27
Merge branch 'master' into e2e
tabergma Oct 6, 2020
afa7741
RasaModelData can handle 4D Tensors (#6833)
tabergma Oct 6, 2020
1803fe3
Merge branch 'master' into e2e
tabergma Oct 9, 2020
0453a2d
Merge branch 'master' into e2e
tabergma Oct 12, 2020
9bc25bf
Fix tests on e2e branch (#6984)
tabergma Oct 16, 2020
9c29d4b
merge master
Ghostvv Oct 16, 2020
f3a1780
Refactor creation of RasaModelData (#7010)
tabergma Oct 21, 2020
9c913fc
Add tests for state and tracker featurizers (#7086)
tabergma Oct 23, 2020
c4a7a2d
Add option "featurizers" to TEDPolicy (#7079)
tabergma Oct 28, 2020
3ed6d04
Merge branch 'master' into e2e
tabergma Oct 28, 2020
e532fcb
fix merging master
Ghostvv Nov 2, 2020
9e1d1a7
Bring DIET into TED (#7131)
tabergma Nov 3, 2020
8ba50d4
Merge branch 'master' into e2e
tabergma Nov 3, 2020
600841a
fix entities features
tabergma Nov 4, 2020
d971ca7
resolve merge conflict in yaml_story_writer
tabergma Nov 4, 2020
4014b93
use story string when writing user uttered event
tabergma Nov 4, 2020
17cbac6
Merge branch 'master' into e2e
tabergma Nov 5, 2020
1e6fa3f
create empty fakes (#7198)
Ghostvv Nov 9, 2020
fe9b0e7
Merge branch 'master' into e2e
tabergma Nov 9, 2020
e0bec49
Monster ted (#7262)
Ghostvv Nov 13, 2020
4ca578f
merge master
Ghostvv Nov 16, 2020
b01e39e
refactor e2e ted choice (#7285)
Ghostvv Nov 16, 2020
e870fe6
fix e2e prediction
Ghostvv Nov 17, 2020
49bac01
utter end-to-end bot responses
wochinge Nov 20, 2020
c8bc59d
add docstring
wochinge Nov 20, 2020
d70c5d8
deprecate unused method
wochinge Nov 20, 2020
a7d39e8
add changelog for deprecation
wochinge Nov 20, 2020
9c59a56
log end-to-end action with text
wochinge Nov 23, 2020
868a715
pass flag instead of determining end-to-end utterance on the fly.
wochinge Nov 23, 2020
8f60f83
Revert "pass flag instead of determining end-to-end utterance on the …
wochinge Nov 24, 2020
d433646
remove `events_for_prediction`
wochinge Nov 24, 2020
f737d8f
remove unused import
wochinge Nov 25, 2020
c77eb04
fix e2e training edge cases
joejuzl Nov 25, 2020
6b9421a
use special action for end-to-end responses
wochinge Nov 26, 2020
61e60fa
rename to `from_action_name_or_text`
wochinge Nov 26, 2020
0a8c7e8
clarify in comment
wochinge Nov 26, 2020
eb736f0
rename to `ActionEndToEndResponse`
wochinge Nov 26, 2020
f828ccb
fix form tests
wochinge Nov 26, 2020
92a6cec
add docstrings
wochinge Nov 26, 2020
4350806
remove useless test
wochinge Nov 26, 2020
361271e
remove user text if intent is present
Ghostvv Nov 27, 2020
aeeab95
remove story read check for user and intent message
joejuzl Nov 27, 2020
ab96c4a
ignore entities in text if intent is present
Ghostvv Nov 27, 2020
cf1b895
merge master
Ghostvv Nov 27, 2020
6d21dd5
Merge remote-tracking branch 'origin/e2e' into 7129/gracefully_handle…
joejuzl Nov 27, 2020
b9fb01c
Update rasa/shared/nlu/training_data/message.py
joejuzl Nov 27, 2020
9a14259
Update rasa/shared/nlu/training_data/training_data.py
joejuzl Nov 27, 2020
28b79db
PR comments
joejuzl Nov 27, 2020
a370707
black
joejuzl Nov 30, 2020
999c2fe
rename var
joejuzl Nov 30, 2020
7932a65
remove unused `_action_event_for_prediction`
wochinge Dec 1, 2020
f1f1343
improve phrasing / typing / code structure
wochinge Dec 1, 2020
fcddd94
add test to ensure action text with `utter_` as start works
wochinge Dec 1, 2020
537d50b
rename `Domain.action_names` to `Domain.action_names_or_texts`
wochinge Dec 1, 2020
fda7f8b
fix docstrings
wochinge Dec 1, 2020
e062ecf
Merge pull request #7325 from RasaHQ/e2e-utterances2
wochinge Dec 1, 2020
321e937
remove unused imports
wochinge Nov 26, 2020
a8d8e04
test and fix writing YAML stories
wochinge Nov 26, 2020
4d1ba87
move `MarkdownStoryWriter` tests to separate file
wochinge Dec 1, 2020
dae731d
use `tmp_path`
wochinge Dec 1, 2020
810bc3e
consider end-to-end stories correctly
wochinge Dec 1, 2020
4eb2a43
fix story reading for retrieval intents
wochinge Dec 1, 2020
32537d7
fix missing renames for `prepare_from_domain`
wochinge Dec 1, 2020
ecb3355
fixup for last merge in from `master`
wochinge Dec 2, 2020
1493ad7
dump story not as test story
wochinge Dec 2, 2020
12912fb
fix docstring errors
wochinge Dec 2, 2020
cbce93d
remove unused method (not used in Rasa X either)
wochinge Dec 2, 2020
1109185
raise if printing end-to-end things in Markdown
wochinge Dec 2, 2020
60b2dca
add todos
wochinge Dec 2, 2020
3143532
Merge pull request #7382 from RasaHQ/7129/gracefully_handle_e2e_train…
joejuzl Dec 2, 2020
330286f
Merge branch 'e2e' into e2e-story-printing
wochinge Dec 2, 2020
d7f2a89
fix error with entity formatting
wochinge Dec 2, 2020
1bfaafd
move to `rasa.shared`
wochinge Dec 2, 2020
76424f5
remove CoreDataImporter
wochinge Dec 2, 2020
4f967b3
change fingerprinting to use yaml writer
wochinge Dec 2, 2020
040dad5
fix tests failing due to new default story file
wochinge Dec 2, 2020
8fe7306
adapt remaining parts to `as_story_string` failing if end-to-end event
wochinge Dec 2, 2020
cdc5ff6
remove `as_story_string` from story validator
wochinge Dec 2, 2020
2355d34
don't add e2e entities as features (#7435)
Ghostvv Dec 3, 2020
a382eb6
only train NLU model if data or end to end
wochinge Dec 2, 2020
a1f0a39
fix filter units
Ghostvv Dec 3, 2020
bec8926
fix import
wochinge Dec 3, 2020
d415218
read and write in test
wochinge Dec 3, 2020
c6a245c
fix displaying of end-to-end actions in rasa interactive
wochinge Dec 3, 2020
c8971c9
skip warning for end-to-end user messages in training data
wochinge Dec 3, 2020
311684b
add docs link
wochinge Dec 3, 2020
d01f4ab
remove trailing whitespace
wochinge Dec 3, 2020
6d239d8
return `NotImplemented` if other class
wochinge Dec 4, 2020
7a34057
remove `md_` as it's not related to md
wochinge Dec 4, 2020
dcbdac1
add docstrings to entire module
wochinge Dec 4, 2020
59c7cc0
add more docstrings
wochinge Dec 7, 2020
97e1860
increase timeout due to failing windows tests
wochinge Dec 7, 2020
8ba989c
improve string representation of `UserUttered`
wochinge Dec 7, 2020
a1e2bee
fix hashing of `UserUttered`
wochinge Dec 7, 2020
de9e17a
Merge pull request #7388 from RasaHQ/e2e-story-printing
wochinge Dec 7, 2020
f2c8174
Add entities to UserUttered event if they are predicted via a policy …
tabergma Dec 8, 2020
6112017
merge master
Ghostvv Dec 9, 2020
b689df1
remove unused import
Ghostvv Dec 9, 2020
5d81eb5
remove unused import
Ghostvv Dec 9, 2020
172aad3
fix problematic docstrings
Ghostvv Dec 9, 2020
929376d
specify yaml content-type
wochinge Dec 9, 2020
4fb1f57
fix docstrings in featurearray
tabergma Dec 9, 2020
9a5e663
fix docstrings
Ghostvv Dec 9, 2020
c02d953
Merge branch 'master' into e2e
Ghostvv Dec 9, 2020
5941759
Merge branch 'master' into e2e
Ghostvv Dec 10, 2020
0bc4ced
Update rasa/core/policies/rule_policy.py
Ghostvv Dec 10, 2020
8d5829c
Update rasa/core/policies/rule_policy.py
Ghostvv Dec 10, 2020
7702348
Update rasa/core/policies/rule_policy.py
Ghostvv Dec 10, 2020
06d2d7d
Update rasa/utils/tensorflow/model_data_utils.py
Ghostvv Dec 10, 2020
6015752
Update rasa/utils/tensorflow/model_data_utils.py
Ghostvv Dec 10, 2020
c7a6fef
add tests for define featurization in ensemble
Ghostvv Dec 10, 2020
c063850
update docstrings
Ghostvv Dec 10, 2020
b6bc1f5
add tests for e2e rules
Ghostvv Dec 10, 2020
9fe46d1
Update rasa/core/policies/ted_policy.py
Ghostvv Dec 10, 2020
e82c572
Update rasa/core/featurizers/tracker_featurizers.py
Ghostvv Dec 10, 2020
b1e3444
Update rasa/core/featurizers/tracker_featurizers.py
Ghostvv Dec 10, 2020
893b17a
Update rasa/core/policies/sklearn_policy.py
Ghostvv Dec 10, 2020
fd576cb
Update rasa/core/policies/ted_policy.py
Ghostvv Dec 10, 2020
7705ee1
Update rasa/core/policies/ted_policy.py
Ghostvv Dec 10, 2020
a39f1fb
Merge branch 'master' into e2e
Ghostvv Dec 10, 2020
d00acaf
Add experimental warning to e2e training (#7524)
joejuzl Dec 11, 2020
a8cf89a
update user messages in apply_to of define events (#7503)
Ghostvv Dec 11, 2020
cb38764
Merge branch 'master' into e2e
wochinge Dec 11, 2020
1d49957
review comments
tabergma Dec 11, 2020
9a0835a
add _prediction_with_unhappy_path
Ghostvv Dec 11, 2020
cc07775
review comments
tabergma Dec 11, 2020
191d856
Merge branch 'e2e' of https://github.com/RasaHQ/rasa into e2e
Ghostvv Dec 11, 2020
b235878
remove unneeded variable
Ghostvv Dec 11, 2020
35b77d1
review comments in DIET
tabergma Dec 11, 2020
aa56a70
renamed empty_features to absent_features
Ghostvv Dec 11, 2020
5ba7e99
remove unused imports
Ghostvv Dec 11, 2020
013c7f5
update docstrings
Ghostvv Dec 11, 2020
69ea041
refactor entity data creation into a separate method
Ghostvv Dec 14, 2020
06fd938
Update rasa/shared/core/domain.py
Ghostvv Dec 14, 2020
4fbb351
Update rasa/shared/core/domain.py
Ghostvv Dec 14, 2020
d7dd001
Update rasa/shared/core/domain.py
Ghostvv Dec 14, 2020
9372cf3
shorten the long comment
Ghostvv Dec 14, 2020
37a3cbf
create separate constant for prediction features
Ghostvv Dec 14, 2020
37c7abc
Update rasa/core/policies/ted_policy.py
Ghostvv Dec 14, 2020
33ce7e6
add comment why we add 1 to sequence features
Ghostvv Dec 14, 2020
bb1903e
Merge branch 'e2e' of https://github.com/RasaHQ/rasa into e2e
Ghostvv Dec 14, 2020
b4fa0f1
rephrase last dial comment
Ghostvv Dec 14, 2020
d6100d5
rephrase comments
Ghostvv Dec 14, 2020
d2722ec
Merge branch 'master' into e2e
Ghostvv Dec 14, 2020
bc171c1
Add description to RasaModelData.
tabergma Dec 14, 2020
2d6d69a
explain choice of warning
wochinge Dec 14, 2020
2021e7d
fix e2e train tests (#7540)
joejuzl Dec 14, 2020
09a52f0
Merge remote-tracking branch 'origin/master' into e2e
joejuzl Dec 14, 2020
842d38f
remove prints
Ghostvv Dec 14, 2020
2467fd5
use precise len in tests
Ghostvv Dec 14, 2020
ce04f29
Merge branch 'master' into e2e
Ghostvv Dec 14, 2020
e8f6ba4
remove blank line
Ghostvv Dec 14, 2020
7086267
Merge branch 'e2e' of https://github.com/RasaHQ/rasa into e2e
Ghostvv Dec 14, 2020
3cf31dc
type annotations
joejuzl Dec 14, 2020
a8d604b
Merge branch 'e2e' of github.com:RasaHQ/rasa into e2e
joejuzl Dec 14, 2020
bfbdfb3
fix dry run test
joejuzl Dec 14, 2020
9bfdc8c
fix test_surface_attributes
tabergma Dec 14, 2020
6e958e5
fix typo in test
Ghostvv Dec 14, 2020
f81b6c3
Use tokens for story structure validation (#7436)
Dec 14, 2020
dbe848a
move constant to red
Ghostvv Dec 14, 2020
f90bcbb
do not enumerate
Ghostvv Dec 14, 2020
82b047c
resolve conflicts except tests for domain
dakshvar22 Dec 15, 2020
0724562
fix domain test conflicts
joejuzl Dec 15, 2020
24647b9
add example showing e2e functionality (#7535)
amn41 Dec 15, 2020
f398ff4
code quality check
dakshvar22 Dec 15, 2020
27803ce
Update tests/test_server.py
Ghostvv Dec 15, 2020
930f5ba
Update rasa/shared/core/training_data/story_reader/yaml_story_reader.py
Ghostvv Dec 15, 2020
edd7f83
add types
Ghostvv Dec 15, 2020
fe74e6b
Update tests/test_train.py
Ghostvv Dec 15, 2020
68b3175
merge e2e
dakshvar22 Dec 15, 2020
9c0b359
fix tests
dakshvar22 Dec 15, 2020
f7ed227
add types
Ghostvv Dec 15, 2020
1246ec3
Merge branch 'e2e' of https://github.com/RasaHQ/rasa into e2e
Ghostvv Dec 15, 2020
028a10a
add types
Ghostvv Dec 15, 2020
d031b78
Update tests/test_train.py
Ghostvv Dec 15, 2020
c401f3c
add types
Ghostvv Dec 15, 2020
3d283c4
Update tests/test_train.py
Ghostvv Dec 15, 2020
9cd6bdf
Update rasa/shared/nlu/training_data/features.py
Ghostvv Dec 15, 2020
68cebbc
Update rasa/shared/nlu/training_data/message.py
Ghostvv Dec 15, 2020
af1c7a9
Update rasa/shared/nlu/training_data/message.py
Ghostvv Dec 15, 2020
a737755
Update rasa/shared/nlu/training_data/message.py
Ghostvv Dec 15, 2020
780b63b
Update rasa/shared/nlu/training_data/training_data.py
Ghostvv Dec 15, 2020
c4b178f
Update rasa/shared/nlu/training_data/training_data.py
Ghostvv Dec 15, 2020
58ebd5c
Update rasa/shared/nlu/training_data/training_data.py
Ghostvv Dec 15, 2020
8f56510
Update rasa/shared/nlu/training_data/message.py
Ghostvv Dec 15, 2020
c343029
Update rasa/shared/nlu/training_data/message.py
Ghostvv Dec 15, 2020
96e85ee
Update rasa/shared/nlu/training_data/message.py
Ghostvv Dec 15, 2020
255d48e
Update rasa/shared/nlu/training_data/message.py
Ghostvv Dec 15, 2020
0f5a171
Update rasa/shared/nlu/training_data/message.py
Ghostvv Dec 15, 2020
25aabed
Update rasa/shared/nlu/training_data/message.py
Ghostvv Dec 15, 2020
58e6a39
Update rasa/shared/nlu/training_data/training_data.py
Ghostvv Dec 15, 2020
971370d
Merge branch 'e2e' of https://github.com/RasaHQ/rasa into e2e
Ghostvv Dec 15, 2020
2920f62
remove unused parameter
wochinge Dec 15, 2020
73ca442
assert return value
wochinge Dec 15, 2020
0ab91a1
use proper objects
wochinge Dec 15, 2020
1cbd302
use dedent
wochinge Dec 15, 2020
2273b2f
PR review comments
joejuzl Dec 15, 2020
379362c
use function scoped fixture
wochinge Dec 15, 2020
4235922
create new domain to avoid interacting with session one
wochinge Dec 15, 2020
409b60f
Merge pull request #7555 from RasaHQ/review-comments-tom
wochinge Dec 15, 2020
76fb69d
Merge pull request #7554 from RasaHQ/merge-master
dakshvar22 Dec 15, 2020
100e304
use safer default for __eq__
wochinge Dec 15, 2020
1083670
remove not required ignore comment
wochinge Dec 15, 2020
5b51173
fix docstrings
wochinge Dec 16, 2020
fe7802e
mark `Event` class as abtract
wochinge Dec 16, 2020
8768632
use correct docstring
wochinge Dec 16, 2020
2d0f48f
rename to `AlwaysEqualEventMixin`
wochinge Dec 16, 2020
a61bfd7
mark methods as abstract
wochinge Dec 16, 2020
4dee6d6
Merge pull request #7558 from RasaHQ/review-comments2
rasabot Dec 16, 2020
8ccf71c
add docstring
Ghostvv Dec 16, 2020
c9793d3
move comment out of docstring
Ghostvv Dec 16, 2020
3f47282
don't persist changed entities + autofill slots for policy entities (…
wochinge Dec 16, 2020
c40b580
fix docstrings
wochinge Dec 16, 2020
24ea74e
add e2e docs (#7512)
Ghostvv Dec 16, 2020
586a953
correctly use mixin class + filter out abstract classes
wochinge Dec 16, 2020
52aa846
add clarification comment
wochinge Dec 16, 2020
dfd6238
make entities a list
wochinge Dec 16, 2020
52101e5
remove space
wochinge Dec 16, 2020
6b73368
fix assigning variables
Ghostvv Dec 16, 2020
167ca75
fix assigning variables
Ghostvv Dec 16, 2020
d462e92
Update docs/docs/components.mdx
Ghostvv Dec 16, 2020
50145cf
add empty line add end
wochinge Dec 16, 2020
dbb650a
fix breaking hash function (list is not hashable)
wochinge Dec 16, 2020
e4b66f0
Merge branch 'master' into e2e
rasabot Dec 16, 2020
f565875
Merge branch 'master' into e2e
rasabot Dec 16, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelog/6410.removal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
`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.
4 changes: 4 additions & 0 deletions changelog/7436.improvement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Make `rasa data validate stories` work for end-to-end.

The `rasa data validate stories` function now considers the tokenized user text instead of the plain text that is part of a state.
This is closer to what Rasa Core actually uses to distinguish states and thus captures more story structure problems.
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” |
3 changes: 2 additions & 1 deletion data/test_dialogues/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
"text": "Hi my name is Peter"
},
"text": "Hi my name is Peter",
"timestamp": 1551953035.076376
"timestamp": 1551953035.076376,
"use_text_for_featurization": false
},
{
"py/object": "rasa.shared.core.events.SlotSet",
Expand Down
17 changes: 14 additions & 3 deletions data/test_dialogues/formbot.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
{
"py/object":"rasa.shared.core.events.ActionExecuted",
"action_name":"action_listen",
"action_text": null,
"confidence":null,
"policy":null,
"timestamp":1551884035.892855,
Expand Down Expand Up @@ -32,11 +33,13 @@
"text":"Hi I'm desperate to talk to you"
},
"text":"Hi I'm desperate to talk to you",
"timestamp":1551884050.259948
"timestamp":1551884050.259948,
"use_text_for_featurization": false
},
{
"py/object":"rasa.shared.core.events.ActionExecuted",
"action_name":"utter_greet",
"action_text": null,
"confidence":1.0,
"policy":"policy_2_MemoizationPolicy",
"timestamp":1551884060.466681,
Expand All @@ -55,6 +58,7 @@
{
"py/object":"rasa.shared.core.events.ActionExecuted",
"action_name":"action_listen",
"action_text": null,
"confidence":1.0,
"policy":"policy_2_MemoizationPolicy",
"timestamp":1551884061.9350882,
Expand Down Expand Up @@ -104,11 +108,13 @@
"text":"I'm looking for an indian restaurant...in Bombay"
},
"text":"I'm looking for an indian restaurant...in Bombay",
"timestamp":1551884090.9653602
"timestamp":1551884090.9653602,
"use_text_for_featurization": false
},
{
"py/object":"rasa.shared.core.events.ActionExecuted",
"action_name":"restaurant_form",
"action_text": null,
"confidence":1.0,
"policy":"policy_2_MemoizationPolicy",
"timestamp":1551884095.542748,
Expand All @@ -117,6 +123,7 @@
{
"py/object":"rasa.shared.core.events.ActionExecuted",
"action_name":"utter_slots_values",
"action_text": null,
"confidence":1.0,
"policy":"policy_2_MemoizationPolicy",
"timestamp":1551884097.570883,
Expand All @@ -135,6 +142,7 @@
{
"py/object":"rasa.shared.core.events.ActionExecuted",
"action_name":"action_listen",
"action_text": null,
"confidence":1.0,
"policy":"policy_2_MemoizationPolicy",
"timestamp":1551884098.8006358,
Expand Down Expand Up @@ -162,11 +170,13 @@
"text":"Let's just pretend everything went correctly"
},
"text":"Let's just pretend everything went correctly",
"timestamp":1551884208.092693
"timestamp":1551884208.092693,
"use_text_for_featurization": false
},
{
"py/object":"rasa.shared.core.events.ActionExecuted",
"action_name":"action_deactivate_loop",
"action_text": null,
"confidence":null,
"policy":null,
"timestamp":1551884214.951055,
Expand All @@ -186,6 +196,7 @@
{
"py/object":"rasa.shared.core.events.ActionExecuted",
"action_name":"action_listen",
"action_text": null,
"confidence":0.7680902069097734,
"policy":"policy_0_TEDPolicy",
"timestamp":1551884216.705635,
Expand Down
9 changes: 6 additions & 3 deletions data/test_dialogues/moodbot.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@
"text":"Hi talk to me"
},
"text":"Hi talk to me",
"timestamp":1551883971.410778
"timestamp":1551883971.410778,
"use_text_for_featurization": false
},
{
"py/object":"rasa.shared.core.events.ActionExecuted",
Expand Down Expand Up @@ -146,7 +147,8 @@
"text":"Super sad"
},
"text":"Super sad",
"timestamp":1551883982.540276
"timestamp":1551883982.540276,
"use_text_for_featurization": false
},
{
"py/object":"rasa.shared.core.events.ActionExecuted",
Expand Down Expand Up @@ -243,7 +245,8 @@
"text":"No"
},
"text":"No",
"timestamp":1551883989.0720608
"timestamp":1551883989.0720608,
"use_text_for_featurization": false
},
{
"py/object":"rasa.shared.core.events.ActionExecuted",
Expand Down
5 changes: 5 additions & 0 deletions data/test_trackers/tracker_moodbot.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"timestamp": 1517821726.211031,
"event": "action",
"name": "action_listen",
"action_text": null,
"policy": null,
"confidence": null
},
Expand Down Expand Up @@ -75,13 +76,15 @@
"timestamp": 1517821726.200373,
"event": "action",
"name": "utter_greet",
"action_text": null,
"policy": null,
"confidence": null
},
{
"timestamp": 1517821726.211038,
"event": "action",
"name": "action_listen",
"action_text": null,
"policy": null,
"confidence": null
},
Expand Down Expand Up @@ -120,13 +123,15 @@
"timestamp": 1517821726.209908,
"event": "action",
"name": "utter_happy",
"action_text": null,
"policy": "policy_1_TEDPolicy",
"confidence": 0.8
},
{
"timestamp": 1517821726.211042,
"event": "action",
"name": "action_listen",
"action_text": null,
"policy": "policy_2_MemoizationPolicy",
"confidence": 1.0
}
Expand Down
30 changes: 30 additions & 0 deletions data/test_yaml_stories/stories_e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
version: "2.0"

stories:
- story: happy path (intent to action)
steps:
- intent: greet
- action: utter_greet
- intent: mood_great
- action: utter_happy

- story: sad path (text to text)
steps:
- user: "[Hello](bla)"
- bot: "Welcome to moodbot. How are you feeling today?"
- user: "Horrible"
- bot: "Oh no! Here is a kitten photo. Did it help?"
- user: "Yes"
- bot: "Perfect"

- story: sad path 2 (mixed)
steps:
- intent: greet
- action: utter_greet
- user: "I'm not happy"
- action: utter_cheer_up
- action: utter_did_that_help
- user: "Not at all"
- bot: "Goodbye!"


15 changes: 15 additions & 0 deletions data/test_yaml_stories/stories_hybrid_e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
stories:
- story: My hybrid End-to-End story
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question - in the previous test file stories_e2e.yml, the Hybrid stories are called mixed. Do we plan to use both terms or me we can agree on one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm, I don't know, for now they are not terms, but rather used in the literal meaning of these words

steps:
# Regular story with labels
- intent: simple
- action: utter_greet
# Actual messages are given instead of labels
- user: "I am looking for a [Kenyan](cuisine) restaurant"
- bot: "good for you"
# Regular labeled events
- intent: goodbye
- action: utter_goodbye
# Actual messages are given instead of labels
- user: One more thing
- bot: What?
8 changes: 8 additions & 0 deletions data/test_yaml_stories/stories_simple.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- story: simple_story
steps:
- intent: greet
- action: utter_greet
- intent: default
- action: utter_default
- intent: goodbye
- action: utter_goodbye
4 changes: 4 additions & 0 deletions docs/docs/command-line-interface.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,10 @@ rasa data validate stories
:::note
Running `rasa data validate` does **not** test if your [rules](./rules.mdx) are consistent with your stories.
However, during training, the `RulePolicy` checks for conflicts between rules and stories. Any such conflict will abort training.

Also, if you use end-to-end stories, then this might not capture all conflicts. Specifically, if two user inputs
result in different tokens yet exactly the same featurization, then conflicting actions after these inputs
may exist but will not be reported by the tool.
:::

To interrupt validation even for minor issues such as unused intents or responses, use the `--fail-on-warnings` flag.
Expand Down
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. |
Ghostvv marked this conversation as resolved.
Show resolved Hide resolved
+---------------------------------+------------------+--------------------------------------------------------------+
| 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