From ca15e4c2b0045dbc9a35bd08bbc26d5fdce2d114 Mon Sep 17 00:00:00 2001 From: Tobias Wochinger Date: Tue, 17 Nov 2020 13:35:01 +0100 Subject: [PATCH 1/5] wrap up deprecations with 2.1 as target --- rasa/core/tracker_store.py | 14 ++------------ rasa/nlu/config.py | 8 -------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/rasa/core/tracker_store.py b/rasa/core/tracker_store.py index 81a4fa670a8b..3a46c6891348 100644 --- a/rasa/core/tracker_store.py +++ b/rasa/core/tracker_store.py @@ -97,7 +97,7 @@ def _set_deprecated_kwargs_and_emit_warning(self, kwargs: Dict[Text, Any]) -> No f"Specifying the `retrieve_events_from_previous_conversation_sessions` " f"kwarg for the `{self.__class__.__name__}` class is deprecated and " f"will be removed in Rasa Open Source 3.0. " - f"Please use the `retrieve_full_tracker()` method instead.", + f"Please use the `retrieve_full_tracker()` method instead." ) self.retrieve_events_from_previous_conversation_sessions = ( retrieve_events_from_previous_conversation_sessions @@ -1190,19 +1190,9 @@ def _load_from_module_name_in_endpoint_config( tracker_store_class = rasa.shared.utils.common.class_from_module_path( store.type ) - init_args = rasa.shared.utils.common.arguments_of(tracker_store_class.__init__) - if "url" in init_args and "host" not in init_args: - # DEPRECATION EXCEPTION - remove in 2.1 - raise Exception( - "The `url` initialization argument for custom tracker stores has " - "been removed. Your custom tracker store should take a `host` " - "argument in its `__init__()` instead." - ) - else: - store.kwargs["host"] = store.url return tracker_store_class( - domain=domain, event_broker=event_broker, **store.kwargs + host=store.url, domain=domain, event_broker=event_broker, **store.kwargs ) except (AttributeError, ImportError): rasa.shared.utils.io.raise_warning( diff --git a/rasa/nlu/config.py b/rasa/nlu/config.py index 7f1b3fc32f3e..00678ced09e7 100644 --- a/rasa/nlu/config.py +++ b/rasa/nlu/config.py @@ -106,14 +106,6 @@ def __init__(self, configuration_values: Optional[Dict[Text, Any]] = None) -> No if self.__dict__["pipeline"] is None: # replaces None with empty list self.__dict__["pipeline"] = [] - elif isinstance(self.__dict__["pipeline"], str): - # DEPRECATION EXCEPTION - remove in 2.1 - raise RasaException( - f"You are using a pipeline template. All pipelines templates " - f"have been removed in 2.0. Please add " - f"the components you want to use directly to your configuration " - f"file. {DOCS_URL_MIGRATION_GUIDE}" - ) for key, value in self.items(): setattr(self, key, value) From e15aa981b267ff364ea3dac4f443cbab5ea7a674 Mon Sep 17 00:00:00 2001 From: Tobias Wochinger Date: Tue, 17 Nov 2020 13:38:50 +0100 Subject: [PATCH 2/5] update SDK to 2.1 --- poetry.lock | 33 ++++++++++++++------------------- pyproject.toml | 2 +- 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/poetry.lock b/poetry.lock index e56adf1147a9..d45af63da5d1 100644 --- a/poetry.lock +++ b/poetry.lock @@ -278,10 +278,10 @@ description = "The AWS SDK for Python" name = "boto3" optional = false python-versions = "*" -version = "1.16.18" +version = "1.16.19" [package.dependencies] -botocore = ">=1.19.18,<1.20.0" +botocore = ">=1.19.19,<1.20.0" jmespath = ">=0.7.1,<1.0.0" s3transfer = ">=0.3.0,<0.4.0" @@ -291,7 +291,7 @@ description = "Low-level, data-driven core of boto 3." name = "botocore" optional = false python-versions = "*" -version = "1.19.18" +version = "1.19.19" [package.dependencies] jmespath = ">=0.7.1,<1.0.0" @@ -813,8 +813,8 @@ category = "dev" description = "Google Cloud Storage API client library" name = "google-cloud-storage" optional = false -python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*" -version = "1.32.0" +python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*" +version = "1.33.0" [package.dependencies] google-auth = ">=1.11.0,<2.0dev" @@ -2231,7 +2231,7 @@ description = "Open source machine learning framework to automate text- and voic name = "rasa-sdk" optional = false python-versions = ">=3.6,<3.9" -version = "2.0.0" +version = "2.1.0" [package.dependencies] coloredlogs = ">=10,<15" @@ -2326,11 +2326,6 @@ optional = false python-versions = "*" version = "1.4.0" -[package.dependencies] -[package.dependencies.idna] -optional = true -version = "*" - [package.extras] idna2008 = ["idna"] @@ -3301,12 +3296,12 @@ boto = [ {file = "boto-2.49.0.tar.gz", hash = "sha256:ea0d3b40a2d852767be77ca343b58a9e3a4b00d9db440efb8da74b4e58025e5a"}, ] boto3 = [ - {file = "boto3-1.16.18-py2.py3-none-any.whl", hash = "sha256:d70d21ea137d786e84124639a62be42f92f4b09472ebfb761156057c92dc5366"}, - {file = "boto3-1.16.18.tar.gz", hash = "sha256:51c419d890ae216b9b031be31f3182739dc3deb5b64351f286bffca2818ddb35"}, + {file = "boto3-1.16.19-py2.py3-none-any.whl", hash = "sha256:56e4776527dfd86477edf79cfaba87ad53ecac13b7537d08ca211f7dfb10a19d"}, + {file = "boto3-1.16.19.tar.gz", hash = "sha256:70d4b15b71b8ae489fb2a265d33030657f373c28e63763d9018008501b0ef507"}, ] botocore = [ - {file = "botocore-1.19.18-py2.py3-none-any.whl", hash = "sha256:bba18b5c4eef3eb2dc39b1b1f8959ba01ac27e7e12e413e281b0fb242990c0f5"}, - {file = "botocore-1.19.18.tar.gz", hash = "sha256:288d43e85f12e3c1d6a0535a585a182ca04e8c6e742ebaaf15357a0e3b37ca7a"}, + {file = "botocore-1.19.19-py2.py3-none-any.whl", hash = "sha256:3b31275fc6788bcae1088a3da01dc5bea14493a17bc3964868f968acf7e9122e"}, + {file = "botocore-1.19.19.tar.gz", hash = "sha256:8c06e3a4d6472e46cd2d31976df3e7fb1cd158f96d7f4c38116abf3e818692a1"}, ] cachetools = [ {file = "cachetools-4.1.1-py3-none-any.whl", hash = "sha256:513d4ff98dd27f85743a8dc0e92f55ddb1b49e060c2d5961512855cda2c01a98"}, @@ -3580,8 +3575,8 @@ google-cloud-core = [ {file = "google_cloud_core-1.4.3-py2.py3-none-any.whl", hash = "sha256:75abff9056977809937127418323faa3917f32df68490704d39a4f0d492ebc2b"}, ] google-cloud-storage = [ - {file = "google-cloud-storage-1.32.0.tar.gz", hash = "sha256:da12b7bd79bbe978a7945a44b600604fbc10ece2935d31f243e751f99135e34f"}, - {file = "google_cloud_storage-1.32.0-py2.py3-none-any.whl", hash = "sha256:063bd12b5ceb4045e8681dc5cce8c3ceeb1203f7c5c3e59f5c9b75bb79a5f59b"}, + {file = "google-cloud-storage-1.33.0.tar.gz", hash = "sha256:900ba027bdee6b97f21cd22d1db3d1a6233ede5de2db4754db860438bdad72d2"}, + {file = "google_cloud_storage-1.33.0-py2.py3-none-any.whl", hash = "sha256:a63b280a225e385fe0f9b606523e5812f37715614cdc646c51dac75cac880d95"}, ] google-crc32c = [ {file = "google-crc32c-1.0.0.tar.gz", hash = "sha256:9439b960b6ecd847557675d130fc3626d762bf535da595c20a6949a705fb3eae"}, @@ -4484,8 +4479,8 @@ questionary = [ {file = "questionary-1.5.2.tar.gz", hash = "sha256:f6e41e36b6c86fe0c3ff12a30c6c6a4e80129efba5ad0a115d71fd5df119c726"}, ] rasa-sdk = [ - {file = "rasa-sdk-2.0.0.tar.gz", hash = "sha256:aef19c1f60be6f5155abdd2cb6266437987f571a85f744bb165807a811de66f6"}, - {file = "rasa_sdk-2.0.0-py3-none-any.whl", hash = "sha256:8f3e0e94b5eb2dc58f68bfac923b2b0c9fd93bc6faa1ffa5cd3cabed973714a8"}, + {file = "rasa-sdk-2.1.0.tar.gz", hash = "sha256:c219a6574172b85a95986ab888665d90212d97285832fc06998c5932223393fd"}, + {file = "rasa_sdk-2.1.0-py3-none-any.whl", hash = "sha256:605607814139e38547c1f868207dae1cca07c3577f2b2c3590a801709c9f80d2"}, ] redis = [ {file = "redis-3.5.3-py2.py3-none-any.whl", hash = "sha256:432b788c4530cfe16d8d943a09d40ca6c16149727e4afe8c2c9d5580c59d9f24"}, diff --git a/pyproject.toml b/pyproject.toml index 84bfe87c4330..5bfb22df1528 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -94,7 +94,7 @@ colorhash = "~1.0.2" jsonschema = "~3.2" packaging = ">=20.0,<21.0" pytz = ">=2019.1,<2021.0" -rasa-sdk = "^2.0.0" +rasa-sdk = "^2.1.0" colorclass = "~2.2" terminaltables = "~3.1.0" sanic = ">=19.12.2,<21.0.0" From 88b857d20fcb01163d4573dabb82eb85fa20f436 Mon Sep 17 00:00:00 2001 From: Tobias Wochinger Date: Tue, 17 Nov 2020 13:39:09 +0100 Subject: [PATCH 3/5] prepared release of version 2.1.0 --- CHANGELOG.mdx | 257 ++++++++++++++++++++++++++++++++++ changelog/4341.improvement.md | 1 - changelog/5715.improvement.md | 21 --- changelog/5974.bugfix.md | 1 - changelog/6285.improvement.md | 5 - changelog/6470.misc.md | 2 - changelog/6474.improvement.md | 4 - changelog/6498.improvement.md | 2 - changelog/6571.improvement.md | 1 - changelog/6582.bugfix.md | 3 - changelog/6721.bugfix.md | 4 - changelog/6760.bugfix.md | 3 - changelog/6852.improvement.md | 25 ---- changelog/6860.improvement.md | 19 --- changelog/6865.improvement.md | 2 - changelog/6966.improvement.md | 1 - changelog/6973.bugfix.md | 1 - changelog/6973.doc.md | 1 - changelog/6977.improvement.md | 11 -- changelog/6986.bugfix.md | 1 - changelog/7001.bugfix.md | 1 - changelog/7002.bugfix.md | 2 - changelog/7015.misc.md | 1 - changelog/7027.improvement.md | 6 - changelog/7031.bugfix.md | 1 - changelog/7034.bugfix.md | 2 - changelog/7061.improvement.md | 1 - changelog/7068.improvement.md | 16 --- changelog/7090.misc.md | 1 - changelog/7102.improvement.md | 5 - changelog/7122.improvement.md | 2 - changelog/7132.improvement.md | 6 - changelog/7136.feature.md | 3 - changelog/7136.removal.md | 26 ---- changelog/7160.improvement.md | 3 - changelog/7204.bugfix.md | 3 - changelog/7246.bugfix.md | 1 - changelog/7253.bugfix.md | 22 --- changelog/7263.improvement.md | 3 - changelog/7263.removal.md | 29 ---- changelog/7278.improvement.md | 2 - pyproject.toml | 2 +- rasa/version.py | 2 +- 43 files changed, 259 insertions(+), 246 deletions(-) delete mode 100644 changelog/4341.improvement.md delete mode 100644 changelog/5715.improvement.md delete mode 100644 changelog/5974.bugfix.md delete mode 100644 changelog/6285.improvement.md delete mode 100644 changelog/6470.misc.md delete mode 100644 changelog/6474.improvement.md delete mode 100644 changelog/6498.improvement.md delete mode 100644 changelog/6571.improvement.md delete mode 100644 changelog/6582.bugfix.md delete mode 100644 changelog/6721.bugfix.md delete mode 100644 changelog/6760.bugfix.md delete mode 100644 changelog/6852.improvement.md delete mode 100644 changelog/6860.improvement.md delete mode 100644 changelog/6865.improvement.md delete mode 100644 changelog/6966.improvement.md delete mode 100644 changelog/6973.bugfix.md delete mode 100644 changelog/6973.doc.md delete mode 100644 changelog/6977.improvement.md delete mode 100644 changelog/6986.bugfix.md delete mode 100644 changelog/7001.bugfix.md delete mode 100644 changelog/7002.bugfix.md delete mode 100644 changelog/7015.misc.md delete mode 100644 changelog/7027.improvement.md delete mode 100644 changelog/7031.bugfix.md delete mode 100644 changelog/7034.bugfix.md delete mode 100644 changelog/7061.improvement.md delete mode 100644 changelog/7068.improvement.md delete mode 100644 changelog/7090.misc.md delete mode 100644 changelog/7102.improvement.md delete mode 100644 changelog/7122.improvement.md delete mode 100644 changelog/7132.improvement.md delete mode 100644 changelog/7136.feature.md delete mode 100644 changelog/7136.removal.md delete mode 100644 changelog/7160.improvement.md delete mode 100644 changelog/7204.bugfix.md delete mode 100644 changelog/7246.bugfix.md delete mode 100644 changelog/7253.bugfix.md delete mode 100644 changelog/7263.improvement.md delete mode 100644 changelog/7263.removal.md delete mode 100644 changelog/7278.improvement.md diff --git a/CHANGELOG.mdx b/CHANGELOG.mdx index 003199a23cf2..8b937722da3f 100644 --- a/CHANGELOG.mdx +++ b/CHANGELOG.mdx @@ -16,6 +16,263 @@ https://github.com/RasaHQ/rasa/tree/master/changelog/ . --> +## [2.1.0] - 2020-11-17 + + +### Deprecations and Removals +- [#7136](https://github.com/rasahq/rasa/issues/7136): The [`Policy`](policies.mdx) interface was changed to return a `PolicyPrediction` object when + `predict_action_probabilities` is called. Returning a list of probabilities directly + is deprecated and support for this will be removed in Rasa Open Source 3.0. + + You can adapt your custom policy by wrapping your probabilities in a `PolicyPrediction` + object: + + ```python + from rasa.core.policies.policy import Policy, PolicyPrediction + # ... other imports + + def predict_action_probabilities( + self, + tracker: DialogueStateTracker, + domain: Domain, + interpreter: NaturalLanguageInterpreter, + **kwargs: Any, + ) -> PolicyPrediction: + probabilities = ... # an action prediction of your policy + return PolicyPrediction(probabilities, "policy_name", policy_priority=self.priority) + ``` + + The same change was applied to the `PolicyEnsemble` interface. Instead of returning + a tuple of action probabilities and policy name, it is now returning a + `PolicyPrediction` object. Support for the old `PolicyEnsemble` interface will be + removed in Rasa Open Source 3.0. +- [#7263](https://github.com/rasahq/rasa/issues/7263): The [Pika Event Broker](event-brokers.mdx#pika-event-broker) no longer supports + the environment variables `RABBITMQ_SSL_CA_FILE` and `RABBITMQ_SSL_KEY_PASSWORD`. + You can alternatively specify `RABBITMQ_SSL_CA_FILE` in the RabbitMQ connection URL as + described in the + [RabbitMQ documentation](https://www.rabbitmq.com/uri-query-parameters.html). + + ```yaml-rasa title="endpoints.yml + event_broker: + type: pika + url: "amqps://user:password@host?cacertfile=path_to_ca_cert&password=private_key_password" + queues: + - my_queue + + ``` + + Support for `RABBITMQ_SSL_KEY_PASSWORD` was removed entirely. + + The method [`Event Broker.close`](event-brokers.mdx) was changed to be asynchronous. + Support for synchronous implementations will be removed in Rasa Open Source 2.2.0. + To adapt your implementation add the `async` keyword: + + ```python + from rasa.core.brokers.broker import EventBroker + + class MyEventBroker(EventBroker): + + async def close(self) -> None: + # clean up event broker resources + ``` + +### Features +- [#7136](https://github.com/rasahq/rasa/issues/7136): [Policies](policies.mdx) can now return obligatory and optional events as part of their + prediction. Obligatory events are always applied to the current conversation tracker. + Optional events are only applied to the conversation tracker in case the policy wins. + +### Improvements +- [#4341](https://github.com/rasahq/rasa/issues/4341): Changed `Agent.load` method to support `pathlib` paths. +- [#5715](https://github.com/rasahq/rasa/issues/5715): If you are using the feature [Entity Roles and Groups](nlu-training-data.mdx#entities-roles-and-groups), you should now also list the roles and groups + in your domain file if you want roles and groups to influence your conversations. For example: + ```yaml-rasa + entities: + - city: + roles: + - from + - to + - name + - topping: + groups: + - 1 + - 2 + - size: + groups: + - 1 + - 2 + ``` + + Entity roles and groups can now influence dialogue predictions. For more information see the section + [Entity Roles and Groups influencing dialogue predictions](nlu-training-data.mdx#entity-roles-and-groups-influencing-dialogue-predictions). +- [#6285](https://github.com/rasahq/rasa/issues/6285): Predictions of the [`FallbackClassifier`](components.mdx#fallbackclassifier) are + ignored when + [evaluating the NLU model](testing-your-assistant.mdx#evaluating-an-nlu-model) + Note that the `FallbackClassifier` predictions still apply to + [test stories](testing-your-assistant.mdx#writing-test-stories). +- [#6474](https://github.com/rasahq/rasa/issues/6474): Adapt the training data reader and emulator for wit.ai to their latest format. + Update the instructions in the + [migrate from wit.ai documentation](migrate-from/facebook-wit-ai-to-rasa.mdx) + to run Rasa Open Source in wit.ai emulation mode. +- [#6498](https://github.com/rasahq/rasa/issues/6498): Adding configurable prefixes to Redis [Tracker](./tracker-stores.mdx) and [Lock Stores](./lock-stores.mdx) so that a single Redis instance (and logical DB) can support multiple conversation trackers and locks. + By default, conversations will be prefixed with `tracker:...` and all locks prefixed with `lock:...`. Additionally, you can add an alphanumeric-only `prefix: value` in `endpoints.yml` such that keys in redis will take the form `value:tracker:...` and `value:lock:...` respectively. +- [#6571](https://github.com/rasahq/rasa/issues/6571): Log the model's relative path when using CLI commands. +- [#6852](https://github.com/rasahq/rasa/issues/6852): Adds the option to configure whether extracted entities should be split by comma (`","`) or not. The default behaviour is `True` - i.e. split any list of extracted entities by comma. This makes sense for a list of ingredients in a recipie, for example `"avocado, tofu, cauliflower"`, however doesn't make sense for an address such as `"Schönhauser Allee 175, 10119 Berlin, Germany"`. + + In the latter case, add a new option to your config, e.g. if you are using the `DIETClassifier` this becomes: + + ```yaml + ... + - name: DIETClassifier + split_entities_by_comma: False + ... + ``` + + in which case, none of the extracted entities will be split by comma. To switch it on/off for specific entity types you can use: + + ```yaml + ... + - name: DIETClassifier + split_entities_by_comma: + address: True + ingredient: False + ... + ``` + + where both `address` and `ingredient` are two entity types. + + This feature is also available for `CRFEntityExtractor`. +- [#6860](https://github.com/rasahq/rasa/issues/6860): Fetching test stories from the HTTP API endpoint + `GET /conversations//story` no longer triggers an update + of the + [conversation session](./domain.mdx#session-configuration). + + Added a new boolean query parameter `all_sessions` (default: `false`) to the + [HTTP API](./http-api.mdx) endpoint for fetching test stories + (`GET /conversations//story`). + + When setting `?all_sessions=true`, the endpoint returns test stories for all + conversation sessions for `conversation_id`. + When setting `?all_sessions=all_sessions`, or when omitting the `all_sessions` + parameter, a single test story is returned for `conversation_id`. In cases where + multiple conversation sessions exist, only the last story is returned. + + Specifying the `retrieve_events_from_previous_conversation_sessions` + kwarg for the [Tracker Store](./tracker-stores.mdx) class is deprecated and will be + removed in Rasa Open Source 3.0. Please use the `retrieve_full_tracker()` method + instead. +- [#6865](https://github.com/rasahq/rasa/issues/6865): Improve the `rasa data convert nlg` command and introduce the `rasa data convert responses` command + to simplify the migration from pre-2.0 response selector format to the new format. +- [#6966](https://github.com/rasahq/rasa/issues/6966): Added warning for when an option is provided for a [component](components.mdx) that is not listed as a key in the defaults for that component. +- [#6977](https://github.com/rasahq/rasa/issues/6977): [Forms](forms.mdx) no longer reject their execution before a potential custom + action for validating / extracting slots was executed. + Forms continue to reject in two cases automatically: + - A slot was requested to be filled, but no slot mapping applied to the latest user + message and there was no custom action for potentially extracting other slots. + - A slot was requested to be filled, but the custom action for validating / extracting + slots didn't return any slot event. + + Additionally you can also reject the form execution manually by returning a + `ActionExecutionRejected` event within your custom action for validating / extracting + slots. +- [#7027](https://github.com/rasahq/rasa/issues/7027): Remove dependency between `ConveRTTokenizer` and `ConveRTFeaturizer`. The `ConveRTTokenizer` is now deprecated, and the + `ConveRTFeaturizer` can be used with any other `Tokenizer`. + + Remove dependency between `HFTransformersNLP`, `LanguageModelTokenizer`, and `LanguageModelFeaturizer`. Both + `HFTransformersNLP` and `LanguageModelTokenizer` are now deprecated. `LanguageModelFeaturizer` implements the behavior + of the stack and can be used with any other `Tokenizer`. +- [#7061](https://github.com/rasahq/rasa/issues/7061): Gray out "Download" button in Rasa Playground when the project is not yet ready to be downloaded. +- [#7068](https://github.com/rasahq/rasa/issues/7068): Slot mappings for [Forms](forms.mdx) in the domain are now optional. If you do not + provide any slot mappings as part of the domain, you need to provide + [custom slot mappings](forms.mdx#custom-slot-mappings) through a custom action. + A form without slot mappings is specified as follows: + + ```rasa-yaml + forms: + my_form: + # no mappings + ``` + + The action for [forms](forms.mdx) can now be overridden by defining a custom action + with the same name as the form. This can be used to keep using the deprecated + Rasa Open Source `FormAction` which is implemented within the Rasa SDK. Note that it is + **not** recommended to override the form action for anything else than using the + deprecated Rasa SDK `FormAction`. +- [#7102](https://github.com/rasahq/rasa/issues/7102): Changed the default model weights loaded for `HFTransformersNLP` component. + + Use a [language agnostic sentence embedding model](https://tfhub.dev/google/LaBSE/1) + as the default model. These model weights should help improve performance on + intent classification and response selection. +- [#7122](https://github.com/rasahq/rasa/issues/7122): Add validations for [slot mappings](forms.mdx#slot-mappings). + If a slot mapping is not valid, an `InvalidDomain` error is raised. +- [#7132](https://github.com/rasahq/rasa/issues/7132): Adapt the training data reader and emulator for LUIS to + [their latest format](https://westcentralus.dev.cognitive.microsoft.com/docs/services/luis-endpoint-api-v3-0/) + and add support for roles. + Update the instructions in the + ["Migrate from LUIS" documentation page](migrate-from/microsoft-luis-to-rasa.mdx) + to reflect the recent changes made to the UI of LUIS. +- [#7160](https://github.com/rasahq/rasa/issues/7160): Adapt the [training data reader and emulator for DialogFlow](migrate-from/google-dialogflow-to-rasa.mdx) to + [their latest format](https://cloud.google.com/dialogflow/es/docs/reference/rest/v2/DetectIntentResponse) + and add support for regex entities. +- [#7263](https://github.com/rasahq/rasa/issues/7263): The [Pika Event Broker](event-brokers.mdx#pika-event-broker) was reimplemented with + the `[aio-pika` library[(https://aio-pika.readthedocs.io/en/latest/). Messages will + now be published to RabbitMQ asynchronously which improves the prediction performance. +- [#7278](https://github.com/rasahq/rasa/issues/7278): The confidence of the [`FallbackClassifier`](components.mdx#fallbackclassifier) + predictions is set to `1 - top intent confidence`. + +### Bugfixes +- [#5974](https://github.com/rasahq/rasa/issues/5974): `ActionRestart` will now trigger `ActionSessionStart` as a followup action. +- [#6582](https://github.com/rasahq/rasa/issues/6582): Fixed a bug with `rasa data split nlu` which caused the resulting train / test ratio to sometimes differ from the ratio specified by the user or by default. + + The splitting algorithm ensures that every intent and response class appears in both the training and the test set. This means that each split must contain at least as many examples as there are classes, which for small datasets can contradict the requested training fraction. When this happens, the command issues a warning to the user that the requested training fraction can't be satisfied. +- [#6721](https://github.com/rasahq/rasa/issues/6721): Fixed bug where slots with `influence_conversation=false` affected the action + prediction if they were set manually using the + `POST /conversations//story` no longer triggers an update -of the -[conversation session](./domain.mdx#session-configuration). - -Added a new boolean query parameter `all_sessions` (default: `false`) to the -[HTTP API](./http-api.mdx) endpoint for fetching test stories -(`GET /conversations//story`). - -When setting `?all_sessions=true`, the endpoint returns test stories for all -conversation sessions for `conversation_id`. -When setting `?all_sessions=all_sessions`, or when omitting the `all_sessions` -parameter, a single test story is returned for `conversation_id`. In cases where -multiple conversation sessions exist, only the last story is returned. - -Specifying the `retrieve_events_from_previous_conversation_sessions` -kwarg for the [Tracker Store](./tracker-stores.mdx) class is deprecated and will be -removed in Rasa Open Source 3.0. Please use the `retrieve_full_tracker()` method -instead. diff --git a/changelog/6865.improvement.md b/changelog/6865.improvement.md deleted file mode 100644 index ed71dfff3fa1..000000000000 --- a/changelog/6865.improvement.md +++ /dev/null @@ -1,2 +0,0 @@ -Improve the `rasa data convert nlg` command and introduce the `rasa data convert responses` command -to simplify the migration from pre-2.0 response selector format to the new format. diff --git a/changelog/6966.improvement.md b/changelog/6966.improvement.md deleted file mode 100644 index 6f3a38eb70d8..000000000000 --- a/changelog/6966.improvement.md +++ /dev/null @@ -1 +0,0 @@ -Added warning for when an option is provided for a [component](components.mdx) that is not listed as a key in the defaults for that component. diff --git a/changelog/6973.bugfix.md b/changelog/6973.bugfix.md deleted file mode 100644 index ba5e428336b9..000000000000 --- a/changelog/6973.bugfix.md +++ /dev/null @@ -1 +0,0 @@ -Ignore rules when validating stories \ No newline at end of file diff --git a/changelog/6973.doc.md b/changelog/6973.doc.md deleted file mode 100644 index cfa664467e35..000000000000 --- a/changelog/6973.doc.md +++ /dev/null @@ -1 +0,0 @@ -Correct data validation docs diff --git a/changelog/6977.improvement.md b/changelog/6977.improvement.md deleted file mode 100644 index 833e4b5e4da8..000000000000 --- a/changelog/6977.improvement.md +++ /dev/null @@ -1,11 +0,0 @@ -[Forms](forms.mdx) no longer reject their execution before a potential custom -action for validating / extracting slots was executed. -Forms continue to reject in two cases automatically: -- A slot was requested to be filled, but no slot mapping applied to the latest user - message and there was no custom action for potentially extracting other slots. -- A slot was requested to be filled, but the custom action for validating / extracting - slots didn't return any slot event. - -Additionally you can also reject the form execution manually by returning a -`ActionExecutionRejected` event within your custom action for validating / extracting -slots. diff --git a/changelog/6986.bugfix.md b/changelog/6986.bugfix.md deleted file mode 100644 index dbea6c7417ba..000000000000 --- a/changelog/6986.bugfix.md +++ /dev/null @@ -1 +0,0 @@ -- Updated Slack Connector for new Slack Events API diff --git a/changelog/7001.bugfix.md b/changelog/7001.bugfix.md deleted file mode 100644 index 9994c3276af4..000000000000 --- a/changelog/7001.bugfix.md +++ /dev/null @@ -1 +0,0 @@ -Update Rasa Playground "Download" button to work correctly depending on the current chat state. \ No newline at end of file diff --git a/changelog/7002.bugfix.md b/changelog/7002.bugfix.md deleted file mode 100644 index c1c52aa5171e..000000000000 --- a/changelog/7002.bugfix.md +++ /dev/null @@ -1,2 +0,0 @@ -Test stories can now contain both: normal intents and retrieval intents. The `failed_test_stories.yml`, generated by `rasa test`, also specifies the full retrieval intent now. -Previously `rasa test` would fail on test stories that specified retrieval intents. \ No newline at end of file diff --git a/changelog/7015.misc.md b/changelog/7015.misc.md deleted file mode 100644 index 7ac151296002..000000000000 --- a/changelog/7015.misc.md +++ /dev/null @@ -1 +0,0 @@ -Remove duplicate import of ``ActionExecuted`` from ``shared.importers.importer`` diff --git a/changelog/7027.improvement.md b/changelog/7027.improvement.md deleted file mode 100644 index baaa4813790e..000000000000 --- a/changelog/7027.improvement.md +++ /dev/null @@ -1,6 +0,0 @@ -Remove dependency between `ConveRTTokenizer` and `ConveRTFeaturizer`. The `ConveRTTokenizer` is now deprecated, and the -`ConveRTFeaturizer` can be used with any other `Tokenizer`. - -Remove dependency between `HFTransformersNLP`, `LanguageModelTokenizer`, and `LanguageModelFeaturizer`. Both -`HFTransformersNLP` and `LanguageModelTokenizer` are now deprecated. `LanguageModelFeaturizer` implements the behavior -of the stack and can be used with any other `Tokenizer`. diff --git a/changelog/7031.bugfix.md b/changelog/7031.bugfix.md deleted file mode 100644 index b5d051e55880..000000000000 --- a/changelog/7031.bugfix.md +++ /dev/null @@ -1 +0,0 @@ -The converter tool is now able to convert test stories that contain a number as entity type. \ No newline at end of file diff --git a/changelog/7034.bugfix.md b/changelog/7034.bugfix.md deleted file mode 100644 index 9227df2b436c..000000000000 --- a/changelog/7034.bugfix.md +++ /dev/null @@ -1,2 +0,0 @@ -The converter tool now converts test stories and stories that contain full retrieval intents correctly. -Previously the response keys were deleted during conversion to YAML. \ No newline at end of file diff --git a/changelog/7061.improvement.md b/changelog/7061.improvement.md deleted file mode 100644 index 87b1735351bf..000000000000 --- a/changelog/7061.improvement.md +++ /dev/null @@ -1 +0,0 @@ -Gray out "Download" button in Rasa Playground when the project is not yet ready to be downloaded. \ No newline at end of file diff --git a/changelog/7068.improvement.md b/changelog/7068.improvement.md deleted file mode 100644 index f3a918715272..000000000000 --- a/changelog/7068.improvement.md +++ /dev/null @@ -1,16 +0,0 @@ -Slot mappings for [Forms](forms.mdx) in the domain are now optional. If you do not -provide any slot mappings as part of the domain, you need to provide -[custom slot mappings](forms.mdx#custom-slot-mappings) through a custom action. -A form without slot mappings is specified as follows: - -```rasa-yaml -forms: - my_form: - # no mappings -``` - -The action for [forms](forms.mdx) can now be overridden by defining a custom action -with the same name as the form. This can be used to keep using the deprecated -Rasa Open Source `FormAction` which is implemented within the Rasa SDK. Note that it is -**not** recommended to override the form action for anything else than using the -deprecated Rasa SDK `FormAction`. diff --git a/changelog/7090.misc.md b/changelog/7090.misc.md deleted file mode 100644 index a54a30600028..000000000000 --- a/changelog/7090.misc.md +++ /dev/null @@ -1 +0,0 @@ -Amended the YAML schema for rules to allow for a metadata key. Previously only stories were allowed to have metadata. diff --git a/changelog/7102.improvement.md b/changelog/7102.improvement.md deleted file mode 100644 index 6b8c393e6691..000000000000 --- a/changelog/7102.improvement.md +++ /dev/null @@ -1,5 +0,0 @@ -Changed the default model weights loaded for `HFTransformersNLP` component. - -Use a [language agnostic sentence embedding model](https://tfhub.dev/google/LaBSE/1) -as the default model. These model weights should help improve performance on -intent classification and response selection. \ No newline at end of file diff --git a/changelog/7122.improvement.md b/changelog/7122.improvement.md deleted file mode 100644 index c089d16c068e..000000000000 --- a/changelog/7122.improvement.md +++ /dev/null @@ -1,2 +0,0 @@ -Add validations for [slot mappings](forms.mdx#slot-mappings). -If a slot mapping is not valid, an `InvalidDomain` error is raised. diff --git a/changelog/7132.improvement.md b/changelog/7132.improvement.md deleted file mode 100644 index db40f12b34f9..000000000000 --- a/changelog/7132.improvement.md +++ /dev/null @@ -1,6 +0,0 @@ -Adapt the training data reader and emulator for LUIS to -[their latest format](https://westcentralus.dev.cognitive.microsoft.com/docs/services/luis-endpoint-api-v3-0/) -and add support for roles. -Update the instructions in the -["Migrate from LUIS" documentation page](migrate-from/microsoft-luis-to-rasa.mdx) -to reflect the recent changes made to the UI of LUIS. \ No newline at end of file diff --git a/changelog/7136.feature.md b/changelog/7136.feature.md deleted file mode 100644 index c8b393ccee6f..000000000000 --- a/changelog/7136.feature.md +++ /dev/null @@ -1,3 +0,0 @@ -[Policies](policies.mdx) can now return obligatory and optional events as part of their -prediction. Obligatory events are always applied to the current conversation tracker. -Optional events are only applied to the conversation tracker in case the policy wins. diff --git a/changelog/7136.removal.md b/changelog/7136.removal.md deleted file mode 100644 index 8767947bccb6..000000000000 --- a/changelog/7136.removal.md +++ /dev/null @@ -1,26 +0,0 @@ -The [`Policy`](policies.mdx) interface was changed to return a `PolicyPrediction` object when -`predict_action_probabilities` is called. Returning a list of probabilities directly -is deprecated and support for this will be removed in Rasa Open Source 3.0. - -You can adapt your custom policy by wrapping your probabilities in a `PolicyPrediction` -object: - -```python -from rasa.core.policies.policy import Policy, PolicyPrediction -# ... other imports - -def predict_action_probabilities( - self, - tracker: DialogueStateTracker, - domain: Domain, - interpreter: NaturalLanguageInterpreter, - **kwargs: Any, - ) -> PolicyPrediction: - probabilities = ... # an action prediction of your policy - return PolicyPrediction(probabilities, "policy_name", policy_priority=self.priority) -``` - -The same change was applied to the `PolicyEnsemble` interface. Instead of returning -a tuple of action probabilities and policy name, it is now returning a -`PolicyPrediction` object. Support for the old `PolicyEnsemble` interface will be -removed in Rasa Open Source 3.0. diff --git a/changelog/7160.improvement.md b/changelog/7160.improvement.md deleted file mode 100644 index 9cff70906737..000000000000 --- a/changelog/7160.improvement.md +++ /dev/null @@ -1,3 +0,0 @@ -Adapt the [training data reader and emulator for DialogFlow](migrate-from/google-dialogflow-to-rasa.mdx) to -[their latest format](https://cloud.google.com/dialogflow/es/docs/reference/rest/v2/DetectIntentResponse) -and add support for regex entities. \ No newline at end of file diff --git a/changelog/7204.bugfix.md b/changelog/7204.bugfix.md deleted file mode 100644 index 468df9ef9050..000000000000 --- a/changelog/7204.bugfix.md +++ /dev/null @@ -1,3 +0,0 @@ -The slack connector requires a configuration for `slack_signing_secret` to make -the connector more secure. The configuration value needs to be added to your -`credentials.yml` if you are using the slack connector. diff --git a/changelog/7246.bugfix.md b/changelog/7246.bugfix.md deleted file mode 100644 index 13ae329d66cf..000000000000 --- a/changelog/7246.bugfix.md +++ /dev/null @@ -1 +0,0 @@ -Fixed model fingerprinting - it should avoid some more unecessary retrainings now. diff --git a/changelog/7253.bugfix.md b/changelog/7253.bugfix.md deleted file mode 100644 index 54f81586d367..000000000000 --- a/changelog/7253.bugfix.md +++ /dev/null @@ -1,22 +0,0 @@ -Fixed a problem when slots of type `text` or `list` were referenced by name only in -the training data and this was treated as an empty value. This means that the two -following stories are equivalent in case the slot type is `text`: - -```yaml -stories: -- story: Story referencing slot by name - steps: - - intent: greet - - slot_was_set: - - name - -- story: Story referencing slot with name and value - steps: - - intent: greet - - slot_was_set: - - name: "some name" - -``` - -Note that you still need to specify values for all other slot types as only `text` -and `list` slots are featurized in a binary fashion. diff --git a/changelog/7263.improvement.md b/changelog/7263.improvement.md deleted file mode 100644 index 8febef143995..000000000000 --- a/changelog/7263.improvement.md +++ /dev/null @@ -1,3 +0,0 @@ -The [Pika Event Broker](event-brokers.mdx#pika-event-broker) was reimplemented with -the `[aio-pika` library[(https://aio-pika.readthedocs.io/en/latest/). Messages will -now be published to RabbitMQ asynchronously which improves the prediction performance. diff --git a/changelog/7263.removal.md b/changelog/7263.removal.md deleted file mode 100644 index 82d9f8e680d2..000000000000 --- a/changelog/7263.removal.md +++ /dev/null @@ -1,29 +0,0 @@ -The [Pika Event Broker](event-brokers.mdx#pika-event-broker) no longer supports -the environment variables `RABBITMQ_SSL_CA_FILE` and `RABBITMQ_SSL_KEY_PASSWORD`. -You can alternatively specify `RABBITMQ_SSL_CA_FILE` in the RabbitMQ connection URL as -described in the -[RabbitMQ documentation](https://www.rabbitmq.com/uri-query-parameters.html). - -```yaml-rasa title="endpoints.yml -event_broker: - type: pika - url: "amqps://user:password@host?cacertfile=path_to_ca_cert&password=private_key_password" - queues: - - my_queue - -``` - -Support for `RABBITMQ_SSL_KEY_PASSWORD` was removed entirely. - -The method [`Event Broker.close`](event-brokers.mdx) was changed to be asynchronous. -Support for synchronous implementations will be removed in Rasa Open Source 2.2.0. -To adapt your implementation add the `async` keyword: - -```python -from rasa.core.brokers.broker import EventBroker - -class MyEventBroker(EventBroker): - - async def close(self) -> None: - # clean up event broker resources -``` \ No newline at end of file diff --git a/changelog/7278.improvement.md b/changelog/7278.improvement.md deleted file mode 100644 index 87a38541f921..000000000000 --- a/changelog/7278.improvement.md +++ /dev/null @@ -1,2 +0,0 @@ -The confidence of the [`FallbackClassifier`](components.mdx#fallbackclassifier) -predictions is set to `1 - top intent confidence`. diff --git a/pyproject.toml b/pyproject.toml index 5bfb22df1528..c8b022df0222 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ exclude = "((.eggs | .git | .pytest_cache | build | dist))" [tool.poetry] name = "rasa" -version = "2.0.6" +version = "2.1.0" description = "Open source machine learning framework to automate text- and voice-based conversations: NLU, dialogue management, connect to Slack, Facebook, and more - Create chatbots and voice assistants" authors = [ "Rasa Technologies GmbH ",] maintainers = [ "Tom Bocklisch ",] diff --git a/rasa/version.py b/rasa/version.py index 8f9a3c980039..d9203cbc723e 100644 --- a/rasa/version.py +++ b/rasa/version.py @@ -1,3 +1,3 @@ # this file will automatically be changed, # do not add anything but the version number here! -__version__ = "2.0.6" +__version__ = "2.1.0" From 66f89316c347d3024f7cff3340f987b87aa1a3ef Mon Sep 17 00:00:00 2001 From: Tobias Wochinger Date: Tue, 17 Nov 2020 13:41:46 +0100 Subject: [PATCH 4/5] bump minimal required model version --- rasa/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rasa/constants.py b/rasa/constants.py index e4f2697bbcf0..1661d0096a82 100644 --- a/rasa/constants.py +++ b/rasa/constants.py @@ -24,7 +24,7 @@ CONFIG_TELEMETRY_ENABLED = "enabled" CONFIG_TELEMETRY_DATE = "date" -MINIMUM_COMPATIBLE_VERSION = "2.0.0" +MINIMUM_COMPATIBLE_VERSION = "2.1.0" GLOBAL_USER_CONFIG_PATH = os.path.expanduser("~/.config/rasa/global.yml") From 9326e4e25f2c689777a8071e6d38088607c5238a Mon Sep 17 00:00:00 2001 From: Tobias Wochinger Date: Tue, 17 Nov 2020 15:09:39 +0100 Subject: [PATCH 5/5] add information that they have to re-train models --- CHANGELOG.mdx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.mdx b/CHANGELOG.mdx index 8b937722da3f..aa21d1665312 100644 --- a/CHANGELOG.mdx +++ b/CHANGELOG.mdx @@ -46,6 +46,11 @@ https://github.com/RasaHQ/rasa/tree/master/changelog/ . --> a tuple of action probabilities and policy name, it is now returning a `PolicyPrediction` object. Support for the old `PolicyEnsemble` interface will be removed in Rasa Open Source 3.0. + + :::caution + This change is model-breaking. Please retrain your models. + + ::: - [#7263](https://github.com/rasahq/rasa/issues/7263): The [Pika Event Broker](event-brokers.mdx#pika-event-broker) no longer supports the environment variables `RABBITMQ_SSL_CA_FILE` and `RABBITMQ_SSL_KEY_PASSWORD`. You can alternatively specify `RABBITMQ_SSL_CA_FILE` in the RabbitMQ connection URL as