Rasa Open Source 2.0 is out now!

Hey @community

Rasa Open Source 2.0 is centered on simplicity, especially unifying key concepts and reducing the learning curve for newcomers—while still expanding what advanced Rasa users can create. We’d like to thank each of you who have greatly helped us by testing and providing your feedback on the alpha versions, we appreciate your support in achieving this milestone and helping us shape the future direction of Rasa Open Source.

:rocket: What’s new?

The release includes YAML formatting for training data, the new RulePolicy and rule snippets, and a new feature to suggest a pipeline configuration. Plus, we’ve done a major documentation update!

In addition, Rasa Open Source 2.0 will be fully compatible with the upcoming Rasa X release: 0.33.0. You will be able to upgrade to Rasa X 0.33.0 to get support for YAML training data and the ability to view, create, and edit rule snippets. It also includes complete support for retrieval intents, which now appear alongside regular intents in the UI, and you can view, add, and edit multimedia responses.

Read more in our blog:

Check out the details in our changelog:


:arrow_right: Need to migrate from 1.10 to 2.0? Here’s a guide:


:tv: Get an in-depth look at everything in 2.0!

On Wednesday, October 14, our team will present a 90-minute deep dive into the major release!

Timezones: 8am - 9:30am PDT/5pm - 6:30pm CEST/8:30pm - 10pm IST


:purple_heart: We very much look forward to your feedback!

13 Likes

Wow… Congratulations @community. Will explore asap :diving_mask:

2 Likes

@Emma Well, frustrating. My working forms in 2.0.rc3 & 2.0rc4 stopped working. After 9 days (!) of migration, and I am again at zero. Are you sure the documentation is correct?

Rasa 2.0 returned back to FormValidationAction and validate_cuisine()? I tired to follow what is written here: Forms

While testing, rasa NEVER asked the form validation function, and in the action logs I only see:

2020-10-09 13:56:58 DEBUG    rasa_sdk.executor  - Received request to run 'validate_flight_departure_form'
2020-10-09 13:56:58 DEBUG    rasa_sdk.executor  - Finished running 'validate_flight_departure_form'
2020-10-09 13:56:58 DEBUG    rasa_sdk.executor  - Received request to run 'action_ask_sl_frm_flight_departure_info_city'

Form validation starts, from the user text (I am flying to Berlin), the validate_sl_frm_flight_departure_info_city is never called (to validate Berlin), and you end up asking for a city.

Also, are you sure you can have two actions by the same name? Like here: Forms The programmer should define another action, again with name “validate_restaurant_form”, for custom slot filling?

@petasis what do you mean by “rasa NEVER asked the form validation function”? in your logs, it says Received request to run 'validate_flight_departure_form' so validation action was run

1 Like

@Ghostvv Yes, I see it in my logs, but what was run?

I have modified my validation form to be (according to today’s docs):

class ValidateFlightDepartureForm(FormValidationAction):
    def name(self):
        return "validate_flight_departure_form"

    @staticmethod
    def required_slots(tracker):
        return ["sl_frm_flight_departure_info_city",
                "sl_frm_flight_departure_info_time"]

    def validate_sl_frm_flight_departure_info_city(
        self,
        value: Any,
        dispatcher: CollectingDispatcher,
        tracker: Tracker,
        domain: DomainDict,
    ) -> Dict[Text, Any]:
            """Validate city value."""
        logger.debug(f"Validating city value: {value}")
        .....

But the “Validating city value:” is not in my logs. The validation method was never called. I am unaware what gets validated.

And the fact that the form then asks for a city, suggests that something happened (an error?) that is not shown.

@Ghostvv I suppose it is stil due to this (unsolved) bug that tracker.slots_to_validate() returns an empty list when the entities are defined in the user text.

The user asks: “I want to go to Berlin”. The entity “city” is identified, and the slot city is filled (it has the same value as the slot). The form slot must be filled from city:

forms:
  flight_departure_form:
    sl_frm_flight_departure_info_city:
    - type: from_entity
      entity: city
      intent:
        - flight_departure_info
        - inform

I modified validate() in forms.py in rasa-sdk to:

class FormValidationAction(Action, ABC):
    """An action that validates if every extracted slot is valid."""

    async def validate(
        self,
        dispatcher: "CollectingDispatcher",
        tracker: "Tracker",
        domain: "DomainDict",
    ) -> List[EventType]:
        """Validate slots by calling a validation function for each slot.

        Args:
            dispatcher: the dispatcher which is used to
                send messages back to the user.
            tracker: the conversation tracker for the current user.
            domain: the bot's domain.
        Returns:
            `SlotSet` events for every validated slot.
        """
        print("Slots to validate:", flush=True)
        slots: Dict[Text, Any] = tracker.slots_to_validate()
        print("Slots to validate:", slots, flush=True)

And the log is:

2020-10-09 15:05:28 DEBUG    rasa_sdk.executor  - Received request to run 'validate_flight_departure_form'
Slots to validate:
Slots to validate: {}
2020-10-09 15:05:28 DEBUG    rasa_sdk.executor  - Finished running 'validate_flight_departure_form'

So, tracker.slots_to_validate() returns nothing.

It was called “tracker.form_slots_to_validate()” in 2.0.0rc4

@Ghostvv In rasa 2.0 it is impossible to bypass this bug. I tried to bring my “run()” from 2.0rc4 as "validate() in my FormValidationAction in rasa 2.0, but the form slots are not filled any more (as was done in 2.0rc2/3/4).

So, the only slots that are not None are {'city': Berlin', 'language': 'el'}, so there is absolutely no way to deduce that sl_frm_flight_departure_info_city must be validated.

I think it is urgent that tracker.slots_to_validate() is fixed. User texts that trigger a form and contain also slot values in the text, do not work at all.

That’s nice! Congratulations!

Using the forms with the new syntax seems really nice.

Will the JSON format for NLU data still be a compatible format in Rasa 2.0?

1 Like

@petasis Could you please also print tracker.events and share the output? Sorry for the pain :raised_hands: . Thanks for trying out the new forms and giving us this important feedback!

@Tobias_Wochinger Here it is:

 2020-10-09 15:45:58 DEBUG    rasa_sdk.executor  - Received request to run 'validate_flight_departure_form'
[{'event': 'action', 'timestamp': 1602247557.9156418, 'name': 'action_session_start', 'policy': None, 'confidence': None}, {'event': 'session_started', 'timestamp': 1602247557.9156487}, {'event': 'action', 'timestamp': 1602247557.915664, 'name': 'action_listen', 'policy': None, 'confidence': None}, {'event': 'user', 'timestamp': 1602247558.7827165, 'text': 'Πάω Βερολίνο', 'parse_data': {'intent': {'id': -3941216509075261043, 'name': 'flight_departure_info', 'confidence': 0.8201098442077637}, 'entities': [{'start': 0, 'end': 12, 'value': 'el', 'entity': 'language', 'extractor': 'LanguageDetection', 'confidence': 0.8, 'processors': []}, {'entity': 'flying', 'start': 0, 'end': 3, 'confidence_entity': 0.9909201860427856, 'value': 'Πάω', 'extractor': 'DIETClassifier'}, {'entity': 'city', 'start': 4, 'end': 12, 'confidence_entity': 0.9995670914649963, 'role': 'destination', 'confidence_role': 0.9381487369537354, 'value': 'Βερολίνο', 'extractor': 'DIETClassifier'}], 'text': 'Πάω Βερολίνο', 'message_id': '87c00f56503c44e3bf86d65316592e5d', 'metadata': {}, 'intent_ranking': [{'id': -3941216509075261043, 'name': 'flight_departure_info', 'confidence': 0.8201098442077637}, {'id': 2664044872589260126, 'name': 'search_weather', 'confidence': 0.12625588476657867}, {'id': 7125258340380963357, 'name': 'inform', 'confidence': 0.044472575187683105}, {'id': -39451462298262712, 'name': 'flight_arrival_info', 'confidence': 0.003252280643209815}, {'id': -5768927727766554198, 'name': 'thank_you', 'confidence': 0.0018673756858333945}, {'id': -8692670432125223958, 'name': 'search_encyclopedia', 'confidence': 0.0017559383995831013}, {'id': 6588513445203812823, 'name': 'deny', 'confidence': 0.0009740469977259636}, {'id': -7785233749859444664, 'name': 'affirm', 'confidence': 0.0006402599974535406}, {'id': 7070374288436930481, 'name': 'chitchat_el', 'confidence': 0.0005440535605885088}, {'id': 6954701023244427238, 'name': 'chitchat_en', 'confidence': 0.00012771673209499568}], 'response_selector': {'all_retrieval_intents': ['chitchat_el', 'chitchat_en', 'thank_you', 'insult'], 'default': {'response': {'id': -5457300344229815958, 'response_templates': [{'text': 'Δεν νομίζω να αρέσει σε κανέναν ο πόλεμος.'}], 'confidence': 0.18031364679336548, 'intent_response_key': 'chitchat_el/trivia0el012', 'template_name': 'utter_chitchat_el/trivia0el012'}, 'ranking': [{'id': -5457300344229815958, 'confidence': 0.18031364679336548, 'intent_response_key': 'chitchat_el/trivia0el012'}, {'id': 7748575985266962142, 'confidence': 0.1385030597448349, 'intent_response_key': 'chitchat_el/AI0el0artificial0el0intelligence0el043'}, {'id': -7816006097834037261, 'confidence': 0.10925857722759247, 'intent_response_key': 'chitchat_el/AI0el0artificial0el0intelligence0el056'}, {'id': -3888007851385573483, 'confidence': 0.09588941931724548, 'intent_response_key': 'chitchat_el/AI0el0artificial0el0intelligence0el057'}, {'id': 8478890575344912681, 'confidence': 0.09179303795099258, 'intent_response_key': 'chitchat_el/trivia0el010'}, {'id': -6018272054094680420, 'confidence': 0.08424077183008194, 'intent_response_key': 'chitchat_el/trivia0el08'}, {'id': -4798333830252020586, 'confidence': 0.07688944041728973, 'intent_response_key': 'chitchat_el/AI0el0artificial0el0intelligence0el026'}, {'id': 6799014478740034578, 'confidence': 0.0765918642282486, 'intent_response_key': 'chitchat_el/AI0el0artificial0el0intelligence0el059'}, {'id': 6827961708562525567, 'confidence': 0.07622824609279633, 'intent_response_key': 'chitchat_el/pepper0el013'}, {'id': -5419568955056479616, 'confidence': 0.07029189169406891, 'intent_response_key': 'chitchat_el/philosophy0el04'}]}}}, 'input_channel': 'cmdline', 'message_id': '87c00f56503c44e3bf86d65316592e5d', 'metadata': {}}, {'event': 'slot', 'timestamp': 1602247558.7827384, 'name': 'city', 'value': 'Βερολίνο'}, {'event': 'slot', 'timestamp': 1602247558.782742, 'name': 'language', 'value': 'el'}, {'event': 'action', 'timestamp': 1602247558.7963033, 'name': 'flight_departure_form', 'policy': None, 'confidence': None}]
2020-10-09 15:45:58 DEBUG    rasa_sdk.executor  - Finished running 'validate_flight_departure_form'

@Tobias_Wochinger A first observation is that in all rasa versions (including 2.00rc) before 2.0, the form slots that should be filled according to the domain file, were filled before a form validation was requested. In rasa 2.0, the form slots are empty. And when validation is asked from the action server, now the slot filling has to somehow happen in the actions server. Was this change on purpose?

The documentation for writing forms has 2 different formats in the examples:

Im assuming the second link is the correct one but please correct the first one to match the second…

Has Rasa X been updated to work with Rasa 2.0? I don’t see a new tag in docker hub: Docker Hub

2 Likes

The ‘download project’ button in the Rasa Playground does not work. Tried on Chrome ond Edge (both chromium) but the button is not recognised as a button.

Executing ‘rasa train’ in Rasa 2.0 only uses the CPU for processing and does not take advantage of the GPU hardware available. I’ve been using a GPU with previous versions so I know it was previously finding this hardware. How do I get Rasa to recognise the GPU? As a test I removed the tensorflow package and then reinstalled the tensorflow-gpu package to try and force Rasa to use the only option available but still received the following error:

rasa train Traceback (most recent call last): File “c:\users\t\anaconda3\envs\aenv\lib\runpy.py”, line 194, in _run_module_as_main return run_code(code, main_globals, None, File “c:\users\t\anaconda3\envs\aenv\lib\runpy.py”, line 87, in run_code exec(code, run_globals) File "C:\Users\t\anaconda3\envs\aenv\Scripts\rasa.exe_main.py", line 7, in File "c:\users\t\anaconda3\envs\aenv\lib\site-packages\rasa_main.py", line 104, in main set_log_level(log_level) File “c:\users\t\anaconda3\envs\aenv\lib\site-packages\rasa\utils\common.py”, line 66, in set_log_level update_tensorflow_log_level() File “c:\users\t\anaconda3\envs\aenv\lib\site-packages\rasa\utils\common.py”, line 108, in update_tensorflow_log_level import tensorflow as tf ModuleNotFoundError: No module named ‘tensorflow’

In my setup, rasa 2.0 uses the GPU for training. Is tensorflow installed?

Is a fix expected for the forms problems? (like today?)

I am not sure what is happening. Conda list doesn’t show tensorflow but does show tensorflow-gpu but when I run > rasa train CPU usage goes up to 80% and the GPU usage stays at 0%.

tabulate 0.8.7 pypi_0 pypi tensorboard 2.3.0 pypi_0 pypi tensorboard-plugin-wit 1.7.0 pypi_0 pypi tensorflow-addons 0.11.2 pypi_0 pypi tensorflow-estimator 2.3.0 pypi_0 pypi tensorflow-gpu 2.3.1 pypi_0 pypi tensorflow-gpu-estimator 2.3.0 pypi_0 pypi tensorflow-hub 0.9.0 pypi_0 pypi tensorflow-probability 0.11.1 pypi_0 pypi termcolor 1.1.0 pypi_0 pypi