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