Skip to content

Commit

Permalink
Merge pull request RasaHQ#11809 from RasaHQ/merge-3.3.x-main-95d44dc
Browse files Browse the repository at this point in the history
Merge 3.3.x into main
  • Loading branch information
ancalita authored Nov 28, 2022
2 parents 2b87f0a + 774adb6 commit bdb6873
Show file tree
Hide file tree
Showing 21 changed files with 899 additions and 771 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ https://github.com/RasaHQ/rasa/tree/main/changelog/ . -->

<!-- TOWNCRIER -->

## [3.3.1] - 2022-11-09
### Improved Documentation
- [#11721](https://github.com/rasahq/rasa/issues/11721): Add docs on how to set up additional data lakes for Rasa Pro analytics pipeline.
- [#11724](https://github.com/rasahq/rasa/issues/11724): Update migration guide and form docs with prescriptive recommendation on how to implement dynamic forms with custom slot mappings.

### Improvements
- [#11732](https://github.com/rasahq/rasa/issues/11732): Updated numpy and scikit learn version to fix vulnerabilities of those dependencies

## [3.3.0] - 2022-10-24
### Improvements
- [#11561](https://github.com/rasahq/rasa/issues/11561): Added option `--offset-timestamps-by-seconds` to offset the timestamp of events when using `rasa export`
Expand Down Expand Up @@ -179,7 +187,7 @@ Yanked.
## [3.1.4] - 2022-06-21 No significant changes.
Upgrade dependent libraries with security vulnerabilities (Pillow, TensorFlow, ujson).

## [3.1.3] - 2022-06-17
## [3.1.3] - 2022-06-17
### Bugfixes
- [#11129](https://github.com/rasahq/rasa/issues/11129): The azure botframework channel now validates the incoming JSON Web Tokens (including signature).

Expand Down
1 change: 0 additions & 1 deletion changelog/11721.doc.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog/11724.doc.md

This file was deleted.

2 changes: 2 additions & 0 deletions changelog/11768.doc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The documentation was updated for Buttons using messages that start with '/'.
Previously, it wrongly stated that messages with '/' bypass NLU, which is not the case.
1 change: 1 addition & 0 deletions changelog/11799.doc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add documentation for Rasa Pro Services upgrades.
42 changes: 42 additions & 0 deletions data/test_classes/custom_graph_components/nlu_meta_fallback.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
from typing import Dict, Text, Any, List

from rasa.engine.graph import GraphComponent, ExecutionContext
from rasa.engine.recipes.default_recipe import DefaultV1Recipe
from rasa.engine.storage.resource import Resource
from rasa.engine.storage.storage import ModelStorage
from rasa.shared.nlu.training_data.message import Message
from rasa.shared.nlu.training_data.training_data import TrainingData
from rasa.nlu.classifiers.fallback_classifier import FallbackClassifier


@DefaultV1Recipe.register(
[DefaultV1Recipe.ComponentType.INTENT_CLASSIFIER], is_trainable=True
)
class MetaFallback(FallbackClassifier):

def __init__(
self,
config: Dict[Text, Any],
model_storage: ModelStorage,
resource: Resource,
execution_context: ExecutionContext,
) -> None:
super().__init__(config)

self._model_storage = model_storage
self._resource = resource

@classmethod
def create(
cls,
config: Dict[Text, Any],
model_storage: ModelStorage,
resource: Resource,
execution_context: ExecutionContext,
) -> FallbackClassifier:
"""Creates a new untrained component (see parent class for full docstring)."""
return cls(config, model_storage, resource, execution_context)

def train(self, training_data: TrainingData) -> Resource:
# Do something here with the messages
return self._resource
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from rasa.engine.recipes.default_recipe import DefaultV1Recipe
from rasa.shared.nlu.training_data.training_data import TrainingData
from rasa.nlu.classifiers.diet_classifier import DIETClassifier


@DefaultV1Recipe.register(
[DefaultV1Recipe.ComponentType.INTENT_CLASSIFIER,
DefaultV1Recipe.ComponentType.ENTITY_EXTRACTOR,
DefaultV1Recipe.ComponentType.MESSAGE_FEATURIZER], is_trainable=True
)
class DIETFeaturizer(DIETClassifier):

def process_training_data(self, training_data: TrainingData) -> TrainingData:
# classify and add the attributes to the messages on the training data
return training_data
Loading

0 comments on commit bdb6873

Please sign in to comment.