Skip to content
This repository was archived by the owner on Jul 30, 2021. It is now read-only.

Commit 29aea3d

Browse files
committed
chore: migrate to Rasa 2.0.0.a1
1 parent 6d651d9 commit 29aea3d

File tree

19 files changed

+510
-1041
lines changed

19 files changed

+510
-1041
lines changed

action-server/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM rasa/rasa:1.9.4 as base
1+
FROM rasa/rasa:2.0.0a1 as base
22
EXPOSE 8080
33

44
COPY poetry.lock poetry.lock

action-server/covidflow/actions/action_fallback.py

Lines changed: 0 additions & 43 deletions
This file was deleted.

action-server/covidflow/actions/action_unsupported_intent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ def run(
3030
text,
3131
parse_data={
3232
"text": text,
33-
"intent": {"name": "fallback", "confidence": 1.0},
34-
"intent_ranking": [{"name": "fallback", "confidence": 1.0}],
33+
"intent": {"name": "nlu_fallback", "confidence": 1.0},
34+
"intent_ranking": [{"name": "nlu_fallback", "confidence": 1.0}],
3535
"entities": [],
3636
},
3737
)

action-server/covidflow/actions/question_answering_form.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ async def _activate_if_required(
7878
intent = _get_intent(tracker)
7979

8080
# Fallback QA
81-
if intent == "fallback":
81+
if intent == "nlu_fallback":
8282
question = tracker.latest_message.get("text", "")
8383

8484
result = await self.validate_active_question(

action-server/covidflow/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class Symptoms: # Not using an enum to avoid persisting enum values
2-
NONE = "none"
2+
NONE = "neni"
33
MILD = "mild"
44
MODERATE = "moderate"
55
SEVERE = "severe"

action-server/tests/actions/test_question_answering_form.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ def test_fallback_question_success(self, mock_protocol):
351351
)
352352

353353
tracker = self.create_tracker(
354-
active_form=False, intent="fallback", text=QUESTION
354+
active_form=False, intent="nlu_fallback", text=QUESTION
355355
)
356356

357357
self.run_form(tracker, DOMAIN)
@@ -377,7 +377,7 @@ def test_fallback_question_failure(self, mock_protocol):
377377
)
378378

379379
tracker = self.create_tracker(
380-
active_form=False, intent="fallback", text=QUESTION
380+
active_form=False, intent="nlu_fallback", text=QUESTION
381381
)
382382

383383
self.run_form(tracker, DOMAIN)
@@ -413,7 +413,7 @@ def test_fallback_question_out_of_distribution(self, mock_protocol):
413413
)
414414

415415
tracker = self.create_tracker(
416-
active_form=False, intent="fallback", text=QUESTION
416+
active_form=False, intent="nlu_fallback", text=QUESTION
417417
)
418418

419419
self.run_form(tracker, DOMAIN)
@@ -449,7 +449,7 @@ def test_fallback_question_need_assessment(self, mock_protocol):
449449
)
450450

451451
tracker = self.create_tracker(
452-
active_form=False, intent="fallback", text=QUESTION
452+
active_form=False, intent="nlu_fallback", text=QUESTION
453453
)
454454

455455
self.run_form(tracker, DOMAIN)

core/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM rasa/rasa:1.9.4-full
1+
FROM rasa/rasa:2.0.0a1-full
22
EXPOSE 8080
33

44
COPY poetry.lock poetry.lock

core/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# include source code in any python subprocess
44
export PYTHONPATH = .
55

6-
RASA_VERSION=1.9.4
6+
RASA_VERSION=2.0.0a1
77

88
UID:=$(shell id -u)
99
GID:=$(shell id -g)
@@ -62,7 +62,7 @@ test:
6262

6363
train-en:
6464
sh scripts/prepare-training-data.sh en
65-
docker run \
65+
docker run -it \
6666
--rm -v ${PWD}:/app \
6767
--user ${UID}:${GID} \
6868
rasa/rasa:${RASA_VERSION}-full train \

core/config/config.core.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
11
# Configuration for Rasa Core.
22
# https://rasa.com/docs/rasa/core/policies/
33
policies:
4-
- name: FormPolicy
4+
- name: RulePolicy
55
- name: AugmentedMemoizationPolicy
66
max_history: 10
77
- name: TEDPolicy
88
max_history: 10
99
epochs: 100
1010
evaluate_on_number_of_examples: 0
1111
random_seed: 42
12-
- name: MappingPolicy
13-
- name: "FallbackPolicy"
14-
nlu_threshold: 0.3
15-
ambiguity_threshold: 0.0
16-
core_threshold: 0.0
17-
fallback_action_name: "action_fallback"
1812
- name: core.policies.unsupported_intent_policy.UnsupportedIntentPolicy
19-
fallback_action_name: 'action_unsupported_intent'
13+
fallback_action_name: "action_unsupported_intent"

core/config/config.en.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@ language: en
55
pipeline:
66
- name: ConveRTTokenizer
77
- name: ConveRTFeaturizer
8+
case_sensitive: false
89
- name: RegexFeaturizer
910
- name: LexicalSyntacticFeaturizer
11+
case_sensitive: false
1012
- name: CountVectorsFeaturizer
13+
case_sensitive: false
1114
- name: CountVectorsFeaturizer
15+
case_sensitive: false
1216
analyzer: "char_wb"
1317
min_ngram: 1
1418
max_ngram: 4

0 commit comments

Comments
 (0)