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

don't persist changed entities + autofill slots for policy entities #7553

Merged
merged 8 commits into from
Dec 16, 2020

Conversation

wochinge
Copy link
Contributor

@wochinge wochinge commented Dec 15, 2020

Proposed changes:

  • don't persist UserUttered attribute which were changed by further events
  • The tracker we return in the API / send to the action server now contains the combined UserUttered.parse_data in its field latest_message.Combined means that it contains the entities of NLU predictions and entities predicted by the policies. This allows users to access the entities as usual.
  • support autofilling slots with entities predicted by policies
  • rename DefinePrevUserUtteredEntities to EntitiesAdded

Status (please check what you already did):

  • added some tests for the functionality
  • updated the documentation
  • updated the changelog (please check changelog for instructions)
  • reformat files using black (please check Readme for instructions)

@wochinge wochinge requested review from a team, kalkbrennerei, tmbo and Ghostvv and removed request for a team and kalkbrennerei December 15, 2020 11:37
@Ghostvv
Copy link
Contributor

Ghostvv commented Dec 15, 2020

I'm not sure I can understand. So entities will be added every time in applied events? So that users will see "normal" UserUttered in custom actions?

@Ghostvv
Copy link
Contributor

Ghostvv commented Dec 15, 2020

if this is the case, I believe the if on line 728 in events.py should be removed

@wochinge
Copy link
Contributor Author

wochinge commented Dec 15, 2020

I'm not sure I can understand. So entities will be added every time in applied events? So that users will see "normal" UserUttered in custom actions?

Entities are added via apply_to as you implemented it. However, any changes to UserUttered.entities won't affect the serialized version of the event. This gives you the updated entities for the featurization while preserving the original event.
A user would only see the original UserUttered in a custom action (without entities added by policies).

@Ghostvv
Copy link
Contributor

Ghostvv commented Dec 15, 2020

A user would only see the original UserUttered in a custom action (without entities added by policies).}

then it's not very useful, this was the reason for updating UserUttered event, so that these entities are perceived by users exactly the same as extracted by TED

This gives you the updated entities for the featurization while preserving the original event.

we actually don't use e2e entities as features

@wochinge
Copy link
Contributor Author

we actually don't use e2e entities as features

So only entities / roles / groups from the NLU classification are considered as features?

then it's not very useful, this was the reason for updating UserUttered event, so that these entities are perceived by users exactly the same as extracted by TED

This needs to be done in a different place then. We can't mutate the event. What specific locations are you thinking of when you mean they should be perceived the same as extracted by TED? It should work out of the box for everything except for custom actions.

We could use applied_events instead combined with a copy.deepcopy but then we'd need to make sure we'd call that whenever exposing the tracker to the user. Currently we're e.g. not calling applied_events before sending them to the action server.

@Ghostvv
Copy link
Contributor

Ghostvv commented Dec 15, 2020

So only entities / roles / groups from the NLU classification are considered as features?

yes

@wochinge wochinge requested a review from joejuzl December 16, 2020 09:09
@wochinge
Copy link
Contributor Author

@Ghostvv @joejuzl Updated according to what we discussed. How you can test this:

  1. Use the e2e example bot
  2. train it
  3. Send the message Hello
  4. GET <host>:<port>:/conversations/<conversation ID>/tracker will return a tracker where latest_message contains the entities from the TEDPolicy while the actual events are untouched.

@wochinge
Copy link
Contributor Author

@Ghostvv We should in my opinion also updated this check to work for the new event as well, shouldn't we?

@joejuzl
Copy link
Contributor

joejuzl commented Dec 16, 2020

@wochinge

GET ::/conversations//tracker will return a tracker where latest_message contains the entities from the TEDPolicy while the actual events are untouched.

So the DefinePrevUserUttered... events now only exist in the tracker within the ensemble?

@wochinge
Copy link
Contributor Author

So the DefinePrevUserUttered... events now only exist in the tracker within the ensemble?

Nope, it's a regular event as the others as well. We just changed that it does not longer affect the persisted version of UserUttered. In addition we changed the latest_message property of the tracker to make it easier for the users to access the combined entities (e.g. in custom actions)

Copy link
Contributor

@joejuzl joejuzl left a comment

Choose a reason for hiding this comment

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

I've tested it an the entities show as expected.

@wochinge wochinge changed the title don't persist changed entities don't persist changed entities + autofill slots for policy entities Dec 16, 2020
@wochinge wochinge force-pushed the fix-events-persistence branch from 2f24495 to c52afdd Compare December 16, 2020 11:11
@wochinge wochinge requested a review from joejuzl December 16, 2020 11:11
@wochinge
Copy link
Contributor Author

@joejuzl @Ghostvv Added support for autofilling slots based on entities predicted by polices. Please(re-)review

Copy link
Contributor

@Ghostvv Ghostvv left a comment

Choose a reason for hiding this comment

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

This solution seems to me very convoluted. Why do we update previous UserUttered with entities? Then we use a lot of different .copy() to mitigate that. Isn't it simpler to store e2e_entities separate on the tracker and add them to latest_message data directly?

@wochinge
Copy link
Contributor Author

Then we use a lot of different .copy() to mitigate that.

actually just one 😆

Isn't it simpler to store e2e_entities separate on the tracker and add them to latest_message data directly?

The nice thing about having it in entities is that story printing would work as usual. It allows to interact with the event as it'd be one thing.

Copy link
Contributor

@Ghostvv Ghostvv left a comment

Choose a reason for hiding this comment

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

ok, if you think it is better 🚀

what about renaming? also left one refactoring comment

rasa/shared/core/trackers.py Outdated Show resolved Hide resolved
Comment on lines 627 to 634
if domain and isinstance(event, (UserUttered, DefinePrevUserUtteredEntities)):
entities = event.entities
if isinstance(event, UserUttered):
# Rather get entities from `parse_data` as
# `DefinePrevUserUtteredEntities` might have already affected the
# `UserUttered.entities` attribute
entities = event.parse_data["entities"]
entities = event.parse_data[ENTITIES]
else:
entities = event.entities
Copy link
Contributor

Choose a reason for hiding this comment

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

what about:

if domain:
   if isinstance(event, UserUttered):
   if isinstance(event, DefinePrevUserUtteredEntities):

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that's style dependent and should be optional to address.

Copy link
Contributor

Choose a reason for hiding this comment

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

I mean... this is colossal if domain and isinstance(event, (UserUttered, DefinePrevUserUtteredEntities)): and then the solitary else is confusing

Copy link
Contributor

Choose a reason for hiding this comment

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

it takes more than a second to understand this if for someone else

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it is style dependent, we should make sure that the code is as simple as possible to grasp by looking at it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I still think it's clear. Happy to hear @joejuzl 's opinion on it.

rasa/shared/core/events.py Outdated Show resolved Hide resolved
@@ -345,6 +345,18 @@ def __eq__(self, other: Any) -> bool:
return True


class SkipEventInMDStoryMixin(Event, ABC):
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need that? let's just add as_story_string to all the methods

Copy link
Contributor

Choose a reason for hiding this comment

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

@joejuzl what do you think. this method seems to me redundant but also increases cognitive complexity of events

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's fine. It means you can easily identify events which won't be in the story rather than having to look at the implementation of the method in each event.

Copy link
Contributor

Choose a reason for hiding this comment

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

to me it contradicts Occam’s razor principle, but after all it's your part of code

Copy link
Contributor

Choose a reason for hiding this comment

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

for me personally, it makes it harder to understand, I see the method - I know how it is represented, looking at superclass requires more cognitive function

Copy link
Contributor

Choose a reason for hiding this comment

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

I see arguments for both ways - but in the interest of speed (and since it's already done like this) - I think we should keep it as is.

@Ghostvv Ghostvv merged commit 3f47282 into e2e Dec 16, 2020
@Ghostvv Ghostvv deleted the fix-events-persistence branch December 16, 2020 12:40
tmbo pushed a commit that referenced this pull request Dec 16, 2020
* fix a test

* action texts in importer added to action_text in domain

* a little end-to-end bot example

* implement hacky e2e prediction

* fix warnings

* fix user uttered featurization

* fix useruttered featurization

* 100 epochs

* fix writin bot action text to file

* store action text in wrong text

* add the comment to bot end-to-end utterance

* update printing e2e utterances

* fix single type input

* fix e2e prediction after action

* implement comparison between e2e policies

* reduce e2e confidence threshold

* fix rule policy

* fix non e2e prediction

* fix cleaning of working data

* fix in regex featurizer processing

* RasaModelData can handle 4D Tensors (#6833)

* handle 4d dense features

* padding for dense and sparse works

* update RasaModelData

* update RasaModelData tests

* update shape of sparse tensors

* update is_in_4d_format

* set eager back to False

* fix code quality issues

* formatting

* fix type issues

* refactoring

* update types

* formatting

* fix type issue

* subclass numpy array

* explicit specify number_of_dimensions

* clean up

* training is working again

* rename feature_dimension to units

* reset default eager values

* update comments

* refactoring

* fix type issue

* fix types

* review comments

* formatting

* Fix tests on e2e branch (#6984)

* fix tests in test_policies

* set use_text_for_featurization in example dialogues

* fix test for NLU training & test_rule_policy

* add missing import

* formatting

* fix more tests

* use intent for featurization by default

* fix test_processor

* fix test_trackers

* fix test_importer

* fix test_dialogues and test_policies

Co-authored-by: Vova Vv <mr.voov@gmail.com>

* Refactor creation of RasaModelData (#7010)

* fix tests in test_policies

* set use_text_for_featurization in example dialogues

* fix test for NLU training & test_rule_policy

* add missing import

* formatting

* fix more tests

* update doc strings

* refactor create_model_data in DIETClassifier

* create sub-methods

* make sure response selector trains

* reset default value of eager

* reset epoch of e2e example

* fix entity key

* fix tests, testing model is failing

* clean up

* fix import

* Fix issues in DIETClassifier

* remove zero features from DIETClassifier again

* add test

* remove whitespace in blank line

* clean up

* clean up model data utils

* fix type issue

* make sure only entity recognition works in diet

* Add tests for state and tracker featurizers (#7086)

* split test_featurizer.py into two files

* code style

* add test for prepare_from_domain

* add tracker featurizer tests

* add test

* fix imports in tests

* add more tests

* Add option "featurizers" to TEDPolicy (#7079)

* add FEATURIZERS to TEDPolicy parameters

* update tests

* fix import

* fix merging master

* Bring DIET into TED (#7131)

* add diet to ted

* reshape 4d tensors into 3d and back

* fix shapes in non eager mode

* make shape indices more general

* fix add_length

* add todo

* sentence features are now also 4D

* sequence length is 4D

* convert 4d to 3 during padding

* mask is 4d now

* bring mask in correct shape before transformer

* keep also the orginial dialogue length

* update doc strings

* use tf.scatter_nd to tranform 3d back to 4d

* move tensor transformation to _encode_features_per_attribute

* fix issues in _encode_features_per_attribute

* use correct dialogue length

* add comments

* clean up

* update constants

* Update rasa/utils/tensorflow/model_data.py

Co-authored-by: Vladimir Vlasov <vladimir@rasa.com>

* review comment

* fix tests

* use correct attribute mask

* use 4d attribute mask

* set eager back to default

* fix test

* update _convert_to_original_shape

* add indices to model data

* fix tf.scatter_nd

* fix TED train and predict

* remove not needed constants

* fix failing tests

* update docstrings

* fix docstring issues

* review comments

* fix shape mismatches

Co-authored-by: Vova Vv <mr.voov@gmail.com>
Co-authored-by: Vladimir Vlasov <vladimir@rasa.com>

* fix entities features

* resolve merge conflict in yaml_story_writer

* use story string when writing user uttered event

* create empty fakes (#7198)

* substitute fake features with empty arrays and use attribute mask to rebuild input

* remove unused import, remove comment

* refactor, add comments, add types

* support empty features

* add prepare_for_predict to precalculate self.all_labels_embed

* return to default config

* add error

* add prepare_for_predict to diet

* fix test_model_data_utils

* fix test gen_batch

* Update rasa/core/policies/ted_policy.py

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

* rename to filter fakes and create dial len beforehand

* add dtype=

* fix comment

* add comments about fake features

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

* Monster ted (#7262)

* add diet to ted

* reshape 4d tensors into 3d and back

* fix shapes in non eager mode

* make shape indices more general

* fix add_length

* add todo

* sentence features are now also 4D

* sequence length is 4D

* convert 4d to 3 during padding

* mask is 4d now

* bring mask in correct shape before transformer

* keep also the orginial dialogue length

* update doc strings

* use tf.scatter_nd to tranform 3d back to 4d

* move tensor transformation to _encode_features_per_attribute

* fix issues in _encode_features_per_attribute

* use correct dialogue length

* add comments

* clean up

* update constants

* review comment

* keep entity dict

* create tag_ids for TED

* clean up after merge

* add batch_loss_entities (not working)

* concatenate text and dialogue transformer output

* get last dialogue before CRF

* add predicting entities

* clean up

* differentiate between max history tracker featurizer used or not

* add todo

* add comments

* use correct tag id mapping

* check if text exists

* fix frozenset issues

* ignore actual entity value in MemoizationPolicy

* fix import

* fix some tests

* update after merge

* use python if instead of tf.cond

* we need to return a tensor in tf.cond instead of None

* create entity tags for all texts

* update batch loss entities (not yet working)

* input to entity loss

* update entity prediction

* fix randomness and shapes

* fix ffnn encoding layer name

* add todo

* Update rasa/core/policies/ted_policy.py

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

* Update rasa/core/featurizers/single_state_featurizer.py

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

* rename to entity_tag_id_mapping

* add comment to last dial mask

* add comments to tf.cond

* add docstrings

* refactor number of dims check

* rename zero features to fake features

* pre compute dialogue_indices

* create helper methods

* calculate number of units for text_transformer_output

* add todo

* fix tests

* use indices constant

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

* refactor e2e ted choice (#7285)

* refactor e2e ted choice

* add comment why prediction batch of size 2

* fix test policies

* fix test ensemble

* fix e2e prediction

* utter end-to-end bot responses

* add docstring

* deprecate unused method

* add changelog for deprecation

* log end-to-end action with text

* pass flag instead of determining end-to-end utterance on the fly.

* Revert "pass flag instead of determining end-to-end utterance on the fly."

This reverts commit 868a715.

* remove `events_for_prediction`

* remove unused import

* fix e2e training edge cases

* use special action for end-to-end responses

* rename to `from_action_name_or_text`

* clarify in comment

* rename to `ActionEndToEndResponse`

* fix form tests

* add docstrings

* remove useless test

* remove user text if intent is present

* remove story read check for user and intent message

* ignore entities in text if intent is present

* Update rasa/shared/nlu/training_data/message.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* Update rasa/shared/nlu/training_data/training_data.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* PR comments

* black

* rename var

* remove unused `_action_event_for_prediction`

* improve phrasing / typing / code structure

* add test to ensure action text with `utter_` as start works

* rename `Domain.action_names` to `Domain.action_names_or_texts`

* fix docstrings

* remove unused imports

* test and fix writing YAML stories

* move `MarkdownStoryWriter` tests to separate file

* use `tmp_path`

* consider end-to-end stories correctly

* fix story reading for retrieval intents

* fix missing renames for `prepare_from_domain`

* fixup for last merge in from `master`

* dump story not as test story

* fix docstring errors

* remove unused method (not used in Rasa X either)

* raise if printing end-to-end things in Markdown

* add todos

* fix error with entity formatting

* move to `rasa.shared`

* remove CoreDataImporter

* change fingerprinting to use yaml writer

* fix tests failing due to new default story file

* adapt remaining parts to `as_story_string` failing if end-to-end event

* remove `as_story_string` from story validator

* don't add e2e entities as features (#7435)

* don't add e2e entities as features

* remove entities as input features for text

* simply don't add entities for e2e user utterances

* remove non existent import

* fix test

* add comment

* only train NLU model if data or end to end

* fix filter units

* fix import

* read and write in test

* fix displaying of end-to-end actions in rasa interactive

* skip warning for end-to-end user messages in training data

* add docs link

* remove trailing whitespace

* return `NotImplemented` if other class

* remove `md_` as it's not related to md

* add docstrings to entire module

* add more docstrings

* increase timeout due to failing windows tests

* improve string representation of `UserUttered`

* fix hashing of `UserUttered`

* Add entities to UserUttered event if they are predicted via a policy (#7443)

* remove unused import

* remove unused import

* fix problematic docstrings

* specify yaml content-type

* fix docstrings in featurearray

* fix docstrings

* Update rasa/core/policies/rule_policy.py

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

* Update rasa/core/policies/rule_policy.py

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

* Update rasa/core/policies/rule_policy.py

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

* Update rasa/utils/tensorflow/model_data_utils.py

Co-authored-by: Daksh Varshneya <d.varshneya@rasa.com>

* Update rasa/utils/tensorflow/model_data_utils.py

Co-authored-by: Daksh Varshneya <d.varshneya@rasa.com>

* add tests for define featurization in ensemble

* update docstrings

* add tests for e2e rules

* Update rasa/core/policies/ted_policy.py

Co-authored-by: Daksh Varshneya <d.varshneya@rasa.com>

* Update rasa/core/featurizers/tracker_featurizers.py

Co-authored-by: Daksh Varshneya <d.varshneya@rasa.com>

* Update rasa/core/featurizers/tracker_featurizers.py

Co-authored-by: Daksh Varshneya <d.varshneya@rasa.com>

* Update rasa/core/policies/sklearn_policy.py

Co-authored-by: Daksh Varshneya <d.varshneya@rasa.com>

* Update rasa/core/policies/ted_policy.py

Co-authored-by: Daksh Varshneya <d.varshneya@rasa.com>

* Update rasa/core/policies/ted_policy.py

Co-authored-by: Daksh Varshneya <d.varshneya@rasa.com>

* Add experimental warning to e2e training (#7524)

* Add experimental warning to e2e training

* re-order imports

* update user messages in apply_to of define events (#7503)

* update user messages in apply_to of define events

* fix e2e entity prediction in ted

* rename method

* fix entity featurization for text input

* fix entity prediction in ted

* remove safeguard

* fix actionexecuted string

* fix comments

* keep __str__ inconsistent for actionexecuted

* increase number of epochs for ted

* add Define events in applied events

* clean states during prediction

* review comments

* add _prediction_with_unhappy_path

* review comments

* remove unneeded variable

* review comments in DIET

* renamed empty_features to absent_features

* remove unused imports

* update docstrings

* refactor entity data creation into a separate method

* Update rasa/shared/core/domain.py

Co-authored-by: Joe Juzl <joejuzl@gmail.com>

* Update rasa/shared/core/domain.py

Co-authored-by: Joe Juzl <joejuzl@gmail.com>

* Update rasa/shared/core/domain.py

Co-authored-by: Joe Juzl <joejuzl@gmail.com>

* shorten the long comment

* create separate constant for prediction features

* Update rasa/core/policies/ted_policy.py

Co-authored-by: Daksh Varshneya <d.varshneya@rasa.com>

* add comment why we add 1 to sequence features

* rephrase last dial comment

* rephrase comments

* Add description to RasaModelData.

* explain choice of warning

* fix e2e train tests (#7540)

* remove prints

* use precise len in tests

* remove blank line

* type annotations

* fix dry run test

* fix test_surface_attributes

* fix typo in test

* Use tokens for story structure validation (#7436)

* Add tests

* Draft first implementation

* Fix random sorting before hash

* Update doc strings

* Add doc strings

* Fix minor issues

* Add config file loading

* Fix some docstrings

* Make test stories part of the test

* Update tests

* Fix minor issues

* Fix config param argument

* Add TrainingType to tests to avoid config change

* Delete hash again

* Update docs

* Update rasa/core/training/story_conflict.py

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

* Update rasa/shared/nlu/training_data/features.py

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

* Fix minor issues

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

* move constant to red

* do not enumerate

* fix domain test conflicts

* add example showing e2e functionality (#7535)

* add basic files

* add NLU examples

* increase epochs and remove memoization policy

* Update examples/e2ebot/config.yml

Co-authored-by: Vladimir Vlasov <vladimir@rasa.com>

* Update examples/e2ebot/domain.yml

Co-authored-by: Vladimir Vlasov <vladimir@rasa.com>

* Update examples/e2ebot/data/stories.yml

Co-authored-by: Vladimir Vlasov <vladimir@rasa.com>

* added a story with a bot utterance instead of an action label

* remove bot utterance again

Co-authored-by: Vladimir Vlasov <vladimir@rasa.com>

* code quality check

* Update tests/test_server.py

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

* Update rasa/shared/core/training_data/story_reader/yaml_story_reader.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* add types

* Update tests/test_train.py

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

* fix tests

* add types

* add types

* Update tests/test_train.py

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

* add types

* Update tests/test_train.py

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

* Update rasa/shared/nlu/training_data/features.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* Update rasa/shared/nlu/training_data/message.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* Update rasa/shared/nlu/training_data/message.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* Update rasa/shared/nlu/training_data/message.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* Update rasa/shared/nlu/training_data/training_data.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* Update rasa/shared/nlu/training_data/training_data.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* Update rasa/shared/nlu/training_data/training_data.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* Update rasa/shared/nlu/training_data/message.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* Update rasa/shared/nlu/training_data/message.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* Update rasa/shared/nlu/training_data/message.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* Update rasa/shared/nlu/training_data/message.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* Update rasa/shared/nlu/training_data/message.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* Update rasa/shared/nlu/training_data/message.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* Update rasa/shared/nlu/training_data/training_data.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* remove unused parameter

* assert return value

* use proper objects

* use dedent

* PR review comments

* use function scoped fixture

* create new domain to avoid interacting with session one

* use safer default for __eq__

* remove not required ignore comment

* fix docstrings

* mark `Event` class as abtract

* use correct docstring

* rename to `AlwaysEqualEventMixin`

* mark methods as abstract

* add docstring

* move comment out of docstring

* don't persist changed entities + autofill slots for policy entities (#7553)

* don't persist changed entities

* make tracker state return combined `UserUttered` event

* autofill slots for policy entities

* made if more explicit

* use constants

* rename `DefinePrevUserUtteredEntities` to `EntitiesAdded`

* rename and make `DefinePrevUserUttered` more general

* fix docstrings

* add e2e docs (#7512)

* 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>

* correctly use mixin class + filter out abstract classes

* add clarification comment

* make entities a list

* remove space

* fix assigning variables

* fix assigning variables

* Update docs/docs/components.mdx

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

* add empty line add end

* fix breaking hash function (list is not hashable)

Co-authored-by: Zhenya Razumovskaia <evgeniar@yahoo.com>
Co-authored-by: Tanja Bergmann <tabergma@gmail.com>
Co-authored-by: Tobias Wochinger <t.wochinger@rasa.com>
Co-authored-by: Joseph Juzl <joejuzl@gmail.com>
Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>
Co-authored-by: Daksh Varshneya <d.varshneya@rasa.com>
Co-authored-by: Johannes E. M. Mosig <j.mosig@rasa.com>
Co-authored-by: Alan Nichol <alan@rasa.com>
Co-authored-by: Roberto <43567378+rasabot@users.noreply.github.com>
Co-authored-by: Ella Rohm-Ensing <erohmensing@gmail.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>
indam23 pushed a commit that referenced this pull request Jul 27, 2022
* fix a test

* action texts in importer added to action_text in domain

* a little end-to-end bot example

* implement hacky e2e prediction

* fix warnings

* fix user uttered featurization

* fix useruttered featurization

* 100 epochs

* fix writin bot action text to file

* store action text in wrong text

* add the comment to bot end-to-end utterance

* update printing e2e utterances

* fix single type input

* fix e2e prediction after action

* implement comparison between e2e policies

* reduce e2e confidence threshold

* fix rule policy

* fix non e2e prediction

* fix cleaning of working data

* fix in regex featurizer processing

* RasaModelData can handle 4D Tensors (#6833)

* handle 4d dense features

* padding for dense and sparse works

* update RasaModelData

* update RasaModelData tests

* update shape of sparse tensors

* update is_in_4d_format

* set eager back to False

* fix code quality issues

* formatting

* fix type issues

* refactoring

* update types

* formatting

* fix type issue

* subclass numpy array

* explicit specify number_of_dimensions

* clean up

* training is working again

* rename feature_dimension to units

* reset default eager values

* update comments

* refactoring

* fix type issue

* fix types

* review comments

* formatting

* Fix tests on e2e branch (#6984)

* fix tests in test_policies

* set use_text_for_featurization in example dialogues

* fix test for NLU training & test_rule_policy

* add missing import

* formatting

* fix more tests

* use intent for featurization by default

* fix test_processor

* fix test_trackers

* fix test_importer

* fix test_dialogues and test_policies

Co-authored-by: Vova Vv <mr.voov@gmail.com>

* Refactor creation of RasaModelData (#7010)

* fix tests in test_policies

* set use_text_for_featurization in example dialogues

* fix test for NLU training & test_rule_policy

* add missing import

* formatting

* fix more tests

* update doc strings

* refactor create_model_data in DIETClassifier

* create sub-methods

* make sure response selector trains

* reset default value of eager

* reset epoch of e2e example

* fix entity key

* fix tests, testing model is failing

* clean up

* fix import

* Fix issues in DIETClassifier

* remove zero features from DIETClassifier again

* add test

* remove whitespace in blank line

* clean up

* clean up model data utils

* fix type issue

* make sure only entity recognition works in diet

* Add tests for state and tracker featurizers (#7086)

* split test_featurizer.py into two files

* code style

* add test for prepare_from_domain

* add tracker featurizer tests

* add test

* fix imports in tests

* add more tests

* Add option "featurizers" to TEDPolicy (#7079)

* add FEATURIZERS to TEDPolicy parameters

* update tests

* fix import

* fix merging master

* Bring DIET into TED (#7131)

* add diet to ted

* reshape 4d tensors into 3d and back

* fix shapes in non eager mode

* make shape indices more general

* fix add_length

* add todo

* sentence features are now also 4D

* sequence length is 4D

* convert 4d to 3 during padding

* mask is 4d now

* bring mask in correct shape before transformer

* keep also the orginial dialogue length

* update doc strings

* use tf.scatter_nd to tranform 3d back to 4d

* move tensor transformation to _encode_features_per_attribute

* fix issues in _encode_features_per_attribute

* use correct dialogue length

* add comments

* clean up

* update constants

* Update rasa/utils/tensorflow/model_data.py

Co-authored-by: Vladimir Vlasov <vladimir@rasa.com>

* review comment

* fix tests

* use correct attribute mask

* use 4d attribute mask

* set eager back to default

* fix test

* update _convert_to_original_shape

* add indices to model data

* fix tf.scatter_nd

* fix TED train and predict

* remove not needed constants

* fix failing tests

* update docstrings

* fix docstring issues

* review comments

* fix shape mismatches

Co-authored-by: Vova Vv <mr.voov@gmail.com>
Co-authored-by: Vladimir Vlasov <vladimir@rasa.com>

* fix entities features

* resolve merge conflict in yaml_story_writer

* use story string when writing user uttered event

* create empty fakes (#7198)

* substitute fake features with empty arrays and use attribute mask to rebuild input

* remove unused import, remove comment

* refactor, add comments, add types

* support empty features

* add prepare_for_predict to precalculate self.all_labels_embed

* return to default config

* add error

* add prepare_for_predict to diet

* fix test_model_data_utils

* fix test gen_batch

* Update rasa/core/policies/ted_policy.py

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

* rename to filter fakes and create dial len beforehand

* add dtype=

* fix comment

* add comments about fake features

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

* Monster ted (#7262)

* add diet to ted

* reshape 4d tensors into 3d and back

* fix shapes in non eager mode

* make shape indices more general

* fix add_length

* add todo

* sentence features are now also 4D

* sequence length is 4D

* convert 4d to 3 during padding

* mask is 4d now

* bring mask in correct shape before transformer

* keep also the orginial dialogue length

* update doc strings

* use tf.scatter_nd to tranform 3d back to 4d

* move tensor transformation to _encode_features_per_attribute

* fix issues in _encode_features_per_attribute

* use correct dialogue length

* add comments

* clean up

* update constants

* review comment

* keep entity dict

* create tag_ids for TED

* clean up after merge

* add batch_loss_entities (not working)

* concatenate text and dialogue transformer output

* get last dialogue before CRF

* add predicting entities

* clean up

* differentiate between max history tracker featurizer used or not

* add todo

* add comments

* use correct tag id mapping

* check if text exists

* fix frozenset issues

* ignore actual entity value in MemoizationPolicy

* fix import

* fix some tests

* update after merge

* use python if instead of tf.cond

* we need to return a tensor in tf.cond instead of None

* create entity tags for all texts

* update batch loss entities (not yet working)

* input to entity loss

* update entity prediction

* fix randomness and shapes

* fix ffnn encoding layer name

* add todo

* Update rasa/core/policies/ted_policy.py

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

* Update rasa/core/featurizers/single_state_featurizer.py

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

* rename to entity_tag_id_mapping

* add comment to last dial mask

* add comments to tf.cond

* add docstrings

* refactor number of dims check

* rename zero features to fake features

* pre compute dialogue_indices

* create helper methods

* calculate number of units for text_transformer_output

* add todo

* fix tests

* use indices constant

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

* refactor e2e ted choice (#7285)

* refactor e2e ted choice

* add comment why prediction batch of size 2

* fix test policies

* fix test ensemble

* fix e2e prediction

* utter end-to-end bot responses

* add docstring

* deprecate unused method

* add changelog for deprecation

* log end-to-end action with text

* pass flag instead of determining end-to-end utterance on the fly.

* Revert "pass flag instead of determining end-to-end utterance on the fly."

This reverts commit 868a715.

* remove `events_for_prediction`

* remove unused import

* fix e2e training edge cases

* use special action for end-to-end responses

* rename to `from_action_name_or_text`

* clarify in comment

* rename to `ActionEndToEndResponse`

* fix form tests

* add docstrings

* remove useless test

* remove user text if intent is present

* remove story read check for user and intent message

* ignore entities in text if intent is present

* Update rasa/shared/nlu/training_data/message.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* Update rasa/shared/nlu/training_data/training_data.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* PR comments

* black

* rename var

* remove unused `_action_event_for_prediction`

* improve phrasing / typing / code structure

* add test to ensure action text with `utter_` as start works

* rename `Domain.action_names` to `Domain.action_names_or_texts`

* fix docstrings

* remove unused imports

* test and fix writing YAML stories

* move `MarkdownStoryWriter` tests to separate file

* use `tmp_path`

* consider end-to-end stories correctly

* fix story reading for retrieval intents

* fix missing renames for `prepare_from_domain`

* fixup for last merge in from `master`

* dump story not as test story

* fix docstring errors

* remove unused method (not used in Rasa X either)

* raise if printing end-to-end things in Markdown

* add todos

* fix error with entity formatting

* move to `rasa.shared`

* remove CoreDataImporter

* change fingerprinting to use yaml writer

* fix tests failing due to new default story file

* adapt remaining parts to `as_story_string` failing if end-to-end event

* remove `as_story_string` from story validator

* don't add e2e entities as features (#7435)

* don't add e2e entities as features

* remove entities as input features for text

* simply don't add entities for e2e user utterances

* remove non existent import

* fix test

* add comment

* only train NLU model if data or end to end

* fix filter units

* fix import

* read and write in test

* fix displaying of end-to-end actions in rasa interactive

* skip warning for end-to-end user messages in training data

* add docs link

* remove trailing whitespace

* return `NotImplemented` if other class

* remove `md_` as it's not related to md

* add docstrings to entire module

* add more docstrings

* increase timeout due to failing windows tests

* improve string representation of `UserUttered`

* fix hashing of `UserUttered`

* Add entities to UserUttered event if they are predicted via a policy (#7443)

* remove unused import

* remove unused import

* fix problematic docstrings

* specify yaml content-type

* fix docstrings in featurearray

* fix docstrings

* Update rasa/core/policies/rule_policy.py

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

* Update rasa/core/policies/rule_policy.py

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

* Update rasa/core/policies/rule_policy.py

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

* Update rasa/utils/tensorflow/model_data_utils.py

Co-authored-by: Daksh Varshneya <d.varshneya@rasa.com>

* Update rasa/utils/tensorflow/model_data_utils.py

Co-authored-by: Daksh Varshneya <d.varshneya@rasa.com>

* add tests for define featurization in ensemble

* update docstrings

* add tests for e2e rules

* Update rasa/core/policies/ted_policy.py

Co-authored-by: Daksh Varshneya <d.varshneya@rasa.com>

* Update rasa/core/featurizers/tracker_featurizers.py

Co-authored-by: Daksh Varshneya <d.varshneya@rasa.com>

* Update rasa/core/featurizers/tracker_featurizers.py

Co-authored-by: Daksh Varshneya <d.varshneya@rasa.com>

* Update rasa/core/policies/sklearn_policy.py

Co-authored-by: Daksh Varshneya <d.varshneya@rasa.com>

* Update rasa/core/policies/ted_policy.py

Co-authored-by: Daksh Varshneya <d.varshneya@rasa.com>

* Update rasa/core/policies/ted_policy.py

Co-authored-by: Daksh Varshneya <d.varshneya@rasa.com>

* Add experimental warning to e2e training (#7524)

* Add experimental warning to e2e training

* re-order imports

* update user messages in apply_to of define events (#7503)

* update user messages in apply_to of define events

* fix e2e entity prediction in ted

* rename method

* fix entity featurization for text input

* fix entity prediction in ted

* remove safeguard

* fix actionexecuted string

* fix comments

* keep __str__ inconsistent for actionexecuted

* increase number of epochs for ted

* add Define events in applied events

* clean states during prediction

* review comments

* add _prediction_with_unhappy_path

* review comments

* remove unneeded variable

* review comments in DIET

* renamed empty_features to absent_features

* remove unused imports

* update docstrings

* refactor entity data creation into a separate method

* Update rasa/shared/core/domain.py

Co-authored-by: Joe Juzl <joejuzl@gmail.com>

* Update rasa/shared/core/domain.py

Co-authored-by: Joe Juzl <joejuzl@gmail.com>

* Update rasa/shared/core/domain.py

Co-authored-by: Joe Juzl <joejuzl@gmail.com>

* shorten the long comment

* create separate constant for prediction features

* Update rasa/core/policies/ted_policy.py

Co-authored-by: Daksh Varshneya <d.varshneya@rasa.com>

* add comment why we add 1 to sequence features

* rephrase last dial comment

* rephrase comments

* Add description to RasaModelData.

* explain choice of warning

* fix e2e train tests (#7540)

* remove prints

* use precise len in tests

* remove blank line

* type annotations

* fix dry run test

* fix test_surface_attributes

* fix typo in test

* Use tokens for story structure validation (#7436)

* Add tests

* Draft first implementation

* Fix random sorting before hash

* Update doc strings

* Add doc strings

* Fix minor issues

* Add config file loading

* Fix some docstrings

* Make test stories part of the test

* Update tests

* Fix minor issues

* Fix config param argument

* Add TrainingType to tests to avoid config change

* Delete hash again

* Update docs

* Update rasa/core/training/story_conflict.py

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

* Update rasa/shared/nlu/training_data/features.py

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

* Fix minor issues

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

* move constant to red

* do not enumerate

* fix domain test conflicts

* add example showing e2e functionality (#7535)

* add basic files

* add NLU examples

* increase epochs and remove memoization policy

* Update examples/e2ebot/config.yml

Co-authored-by: Vladimir Vlasov <vladimir@rasa.com>

* Update examples/e2ebot/domain.yml

Co-authored-by: Vladimir Vlasov <vladimir@rasa.com>

* Update examples/e2ebot/data/stories.yml

Co-authored-by: Vladimir Vlasov <vladimir@rasa.com>

* added a story with a bot utterance instead of an action label

* remove bot utterance again

Co-authored-by: Vladimir Vlasov <vladimir@rasa.com>

* code quality check

* Update tests/test_server.py

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

* Update rasa/shared/core/training_data/story_reader/yaml_story_reader.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* add types

* Update tests/test_train.py

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

* fix tests

* add types

* add types

* Update tests/test_train.py

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

* add types

* Update tests/test_train.py

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

* Update rasa/shared/nlu/training_data/features.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* Update rasa/shared/nlu/training_data/message.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* Update rasa/shared/nlu/training_data/message.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* Update rasa/shared/nlu/training_data/message.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* Update rasa/shared/nlu/training_data/training_data.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* Update rasa/shared/nlu/training_data/training_data.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* Update rasa/shared/nlu/training_data/training_data.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* Update rasa/shared/nlu/training_data/message.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* Update rasa/shared/nlu/training_data/message.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* Update rasa/shared/nlu/training_data/message.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* Update rasa/shared/nlu/training_data/message.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* Update rasa/shared/nlu/training_data/message.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* Update rasa/shared/nlu/training_data/message.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* Update rasa/shared/nlu/training_data/training_data.py

Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>

* remove unused parameter

* assert return value

* use proper objects

* use dedent

* PR review comments

* use function scoped fixture

* create new domain to avoid interacting with session one

* use safer default for __eq__

* remove not required ignore comment

* fix docstrings

* mark `Event` class as abtract

* use correct docstring

* rename to `AlwaysEqualEventMixin`

* mark methods as abstract

* add docstring

* move comment out of docstring

* don't persist changed entities + autofill slots for policy entities (#7553)

* don't persist changed entities

* make tracker state return combined `UserUttered` event

* autofill slots for policy entities

* made if more explicit

* use constants

* rename `DefinePrevUserUtteredEntities` to `EntitiesAdded`

* rename and make `DefinePrevUserUttered` more general

* fix docstrings

* add e2e docs (#7512)

* 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>

* correctly use mixin class + filter out abstract classes

* add clarification comment

* make entities a list

* remove space

* fix assigning variables

* fix assigning variables

* Update docs/docs/components.mdx

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

* add empty line add end

* fix breaking hash function (list is not hashable)

Co-authored-by: Zhenya Razumovskaia <evgeniar@yahoo.com>
Co-authored-by: Tanja Bergmann <tabergma@gmail.com>
Co-authored-by: Tobias Wochinger <t.wochinger@rasa.com>
Co-authored-by: Joseph Juzl <joejuzl@gmail.com>
Co-authored-by: Alexander Khizov <degiz@users.noreply.github.com>
Co-authored-by: Daksh Varshneya <d.varshneya@rasa.com>
Co-authored-by: Johannes E. M. Mosig <j.mosig@rasa.com>
Co-authored-by: Alan Nichol <alan@rasa.com>
Co-authored-by: Roberto <43567378+rasabot@users.noreply.github.com>
Co-authored-by: Ella Rohm-Ensing <erohmensing@gmail.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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants