Releases: RasaHQ/rasa
2.3.0
Improvements
-
#5673: Expose diagnostic data for action and NLU predictions.
Add
diagnostic_data
field to the Message
and Prediction objects, which contain
information about attention weights and other intermediate results of the inference computation.
This information can be used for debugging and fine-tuning, e.g. with RasaLit.For examples of how to access the diagnostic data, see here.
-
#5986: Using the
TrainingDataImporter
interface to load the data inrasa test core
.Failed test stories are now referenced by their absolute path instead of the relative path.
-
#7292: Improve error handling and Sentry tracking:
- Raise
MarkdownException
when training data in Markdown format cannot be read. - Raise
InvalidEntityFormatException
error instead ofjson.JSONDecodeError
when entity format is in valid
in training data. - Gracefully handle empty sections in endpoint config files.
- Introduce
ConnectionException
error and raise it whenTrackerStore
andEventBroker
cannot connect to 3rd party services, instead of raising exceptions from 3rd party libraries. - Improve
rasa.shared.utils.common.class_from_module_path
function by making sure it always returns a class.
The function currently raises a deprecation warning if it detects an anomaly. - Ignore
MemoryError
andasyncio.CancelledError
in Sentry. rasa.shared.utils.validation.validate_training_data
now raises aSchemaValidationError
when validation fails
(this error inheritsjsonschema.ValidationError
, ensuring backwards compatibility).
- Raise
-
#7303: Allow
PolicyEnsemble
in cases where calling individual policy'sload
method returnsNone
. -
#7420: User message metadata can now be accessed via the default slot
session_started_metadata
during the execution of a
customaction_session_start
.from typing import Any, Text, Dict, List from rasa_sdk import Action, Tracker from rasa_sdk.events import SlotSet, SessionStarted, ActionExecuted, EventType class ActionSessionStart(Action): def name(self) -> Text: return "action_session_start" async def run( self, dispatcher, tracker: Tracker, domain: Dict[Text, Any] ) -> List[Dict[Text, Any]]: metadata = tracker.get_slot("session_started_metadata") # Do something with the metadata print(metadata) # the session should begin with a `session_started` event and an `action_listen` # as a user message follows return [SessionStarted(), ActionExecuted("action_listen")]
-
#7579: Add BILOU tagging schema for entity extraction in end-to-end TEDPolicy.
-
#7616: Added two new parameters
constrain_similarities
andmodel_confidence
to machine learning (ML) components - DIETClassifier, ResponseSelector and TEDPolicy.Setting
constrain_similarities=True
adds a sigmoid cross-entropy loss on all similarity values to restrict them to an approximate range inDotProductLoss
. This should help the models to perform better on real world test sets.
By default, the parameter is set toFalse
to preserve the old behaviour, but users are encouraged to set it toTrue
and re-train their assistants as it will be set toTrue
by default from Rasa Open Source 3.0.0 onwards.Parameter
model_confidence
affects how model's confidence for each label is computed during inference. It can take three values:softmax
- Similarities between input and label embeddings are post-processed with a softmax function, as a result of which confidence for all labels sum up to 1.cosine
- Cosine similarity between input label embeddings. Confidence for each label will be in the range[-1,1]
.inner
- Dot product similarity between input and label embeddings. Confidence for each label will be in an unbounded range.
Setting
model_confidence=cosine
should help users tune the fallback thresholds of their assistant better. The default value issoftmax
to preserve the old behaviour, but we recommend usingcosine
as that will be the new default value from Rasa Open Source 3.0.0 onwards. The value of this option does not affect how confidences are computed for entity predictions inDIETClassifier
andTEDPolicy
.With both the above recommendations, users should configure their ML component, e.g.
DIETClassifier
, as- name: DIETClassifier model_confidence: cosine constrain_similarities: True ...
Once the assistant is re-trained with the above configuration, users should also tune fallback confidence thresholds.
Configuration option
loss_type=softmax
is now deprecated and will be removed in Rasa Open Source 3.0.0 . Useloss_type=cross_entropy
instead.The default auto-configuration is changed to use
constrain_similarities=True
andmodel_confidence=cosine
in ML components so that new users start with the recommended configuration. -
#7817: Use simple random uniform distribution of integers in negative sampling, because
negative sampling withtf.while_loop
and random shuffle inside creates a memory leak. -
#7848: Added support to configure
exchange_name
for pika event broker. -
#7867: If
MaxHistoryTrackerFeaturizer
is used, invert the dialogue sequence before passing
it to the transformer so that the last dialogue input becomes the first one and
therefore always have the same positional encoding.
Bugfixes
-
#7420: Fixed an error when using the endpoint
GET /conversations/<conversation_id:path>/story
with a tracker which contained slots. -
#7707: Add the option to configure whether extracted entities should be split by comma (
","
) or not to TEDPolicy. Fixes
crash when this parameter is accessed during extraction. -
#7710: When switching forms, the next form will always correctly ask for the first required slot.
Before, the next form did not ask for the slot if it was the same slot as the requested slot of the previous form.
-
#7749: Fix the bug when
RulePolicy
handling loop predictions are overwritten by e2eTEDPolicy
. -
#7751: When switching forms, the next form is cleanly activated.
Before, the next form was correctly activated, but the previous form had wrongly uttered
the response that asked for the requested slot when slot validation for that slot
had failed. -
#7829: Fix a bug in incremental training when passing a specific model path with the
--finetune
argument. -
#7867: Fix the role of
unidirectional_encoder
in TED. This parameter is only applied to
transformers fortext
,action_text
andlabel_action_text
.
Miscellaneous internal changes
2.2.10
Improvements
- #7069: Updated error message when using incompatible model versions.
Bugfixes
-
#7885: Limit
numpy
version to< 1.2
astensorflow
is not compatible withnumpy
versions>= 1.2
.pip
versions<= 20.2
don't resolve dependencies conflicts
correctly which could result in an incompatiblenumpy
version and the following
error:NotImplementedError: Cannot convert a symbolic Tensor (strided_slice_6:0) to a numpy array. This error may indicate that you're trying to pass a Tensor to a NumPy call, which is not supported
1.10.22
2.2.9
Bugfixes
- #7861: Correctly include the
confused_with
field in the test report for the
POST /model/test/intents
endpoint.
1.10.21
Improvements
- #7439: The url option now supports a list of servers url: ['10.0.0.158:32803','10.0.0.158:32804'].
Removed group_id because it is not a valid Kafka producer parameter.
Bugfixes
- #7638: Fixed a bug that occurred when setting multiple Sanic workers in combination with a custom [Lock Store](lock-stores.mdx). Previously, if the number was set higher than 1 and you were using a custom lock store, it would reject because of a strict check to use a [Redis Lock Store](lock-stores.mdx#redislockstore).
- #7722: Fix a bug where, if a user injects an intent using the HTTP API, slot auto-filling is not performed on the entities provided.
2.2.8
2.2.7
2.2.6
Bugfixes
-
#7717: Fix wrong warning
The method 'EventBroker.close' was changed to be asynchronous
when
theEventBroker.close
was actually asynchronous. -
#7720: Fix incremental training for cases when training data does not contain entities but
DIETClassifier
is configured to perform entity recognition also.Now, the instance of
RasaModelData
insideDIETClassifier
does not containentities
as a feature for training if there is no training data present for entity recognition.
2.2.5
2.2.4
Improvements
- #7520: Improve the warning in case the RulePolicy or the deprecated
MappingPolicy are missing
from the model'spolicies
configuration. Changed the info log to a warning as one
of this policies should be added to the model configuration.
Bugfixes
- #7692: Explicitly specify the
crypto
extra dependency ofpyjwt
to ensure that the
cryptography
dependency is installed.cryptography
is strictly required to be able
to be able to verify JWT tokens.