mrangach
(Mrangach)
March 23, 2021, 3:06pm
1
Hi Team,
I have an issue in regards to next action prediction for multiple instances of RASA on docker.
I am on rasa:2.3.4-spacy-en version on a Docker container (i create 2 docker images for 2 different enviroments build and release).
at the moment both the environments have same config.yml, domain.yml, data/nlu.yml, data/stories.yml, data/rules.yml, actions.py etc.
In the Dockerfile i RUN a train command and then build the image with docker-compose.
When i use to use both the instances for a scenario. One instance is using policy_1_TEDPolicy & another instance is using policy_2_RulePolicy to predict the next action.
In my case the Rulepolicy is wrong.
Whats the correct process for making all containers instances have same behaviour. Use the same model file?
Any help is much appreciated
My config.yml file is as below,
pipeline:
# No configuration for the NLU pipeline was provided. The following default pipeline was used to train your model.
# If you’d like to customize it, uncomment and adjust the pipeline.
name: WhitespaceTokenizer
name: RegexFeaturizer
case_sensitive: false
name: LexicalSyntacticFeaturizer
name: CountVectorsFeaturizer
name: CountVectorsFeaturizer
analyzer: char_wb
min_ngram: 1
max_ngram: 4
name: DIETClassifier
epochs: 100
constrain_similarities: true
name: EntitySynonymMapper
- name: ResponseSelector
epochs: 100
constrain_similarities: true
name: FallbackClassifier
threshold: 0.3
ambiguity_threshold: 0.1
name: SpacyNLP
model: en_core_web_md
name: SpacyEntityExtractor
dimensions: [“PERSON”]
- name: SpacyTokenizer
- name: SpacyFeaturizer
Configuration for Rasa Core.
policies:
# No configuration for policies was provided. The following default policies were used to train your model.
# If you’d like to customize them, uncomment and adjust the policies.
# See Policies for more information.
name: MemoizationPolicy
name: TEDPolicy
max_history: 5
epochs: 100
constrain_similarities: true
name: RulePolicy
- name: MappingPolicy
Juste
(Juste)
March 24, 2021, 11:06am
2
Hi @mrangach . Would you be able to share your docker-compose-override.yml file here? That would help me to see how you are configuring your instances
mrangach
(Mrangach)
March 24, 2021, 11:40am
5
version: ‘3.0’
services:
rasa:
container_name: “${SARA_BRANCH_NAME}_sara_server”
build:
context: .
image: obok/rasa:${SARA_BRANCH_NAME}
ports:
- “${SARA_RASA_PORT}:5005”
networks: [‘rasa-network’]
environment:
“PYTHONPATH”: “/app/channels”
“SARA_REDIS_HOST”: “10.234.211.203”
“SARA_REDIS_PORT”: “6379”
“SARA_REDIS_DB”: “0”
“SARA_RASA_PORT”: “5003”
labels:
- “build=${SARA_BRANCH_NAME}”
action_server:
container_name: “${SARA_BRANCH_NAME}_action_server”
build:
context: actions
image: obok/actions:${SARA_BRANCH_NAME}
ports:
- 5055
depends_on:
- “rasa”
networks: [‘rasa-network’]
labels:
- “build=${SARA_BRANCH_NAME}”
networks: {rasa-network: {}}
mrangach:
Hi Team,
I have an issue in regards to next action prediction for multiple instances of RASA on docker.
I am on rasa:2.3.4-spacy-en version on a Docker container (i create 2 docker images for 2 different enviroments build and release).
at the moment both the environments have same config.yml, domain.yml, data/nlu.yml, data/stories.yml, data/rules.yml, actions.py etc.
In the Dockerfile i RUN a train command and then build the image with docker-compose.
When i use to use both the instances for a scenario. One instance is using policy_1_TEDPolicy & another instance is using policy_2_RulePolicy to predict the next action.
In my case the Rulepolicy is wrong.
Whats the correct process for making all containers instances have same behaviour. Use the same model file?
Any help is much appreciated
My config.yml file is as below,
pipeline:
# No configuration for the NLU pipeline was provided. The following default pipeline was used to train your model.
# If you’d like to customize it, uncomment and adjust the pipeline.
name: WhitespaceTokenizer
name: RegexFeaturizer
case_sensitive: false
name: LexicalSyntacticFeaturizer
name: CountVectorsFeaturizer
name: CountVectorsFeaturizer
analyzer: char_wb
min_ngram: 1
max_ngram: 4
name: DIETClassifier
epochs: 100
constrain_similarities: true
name: EntitySynonymMapper
- name: ResponseSelector
epochs: 100
constrain_similarities: true
name: FallbackClassifier
threshold: 0.3
ambiguity_threshold: 0.1
name: SpacyNLP
model: en_core_web_md
name: SpacyEntityExtractor
dimensions: [“PERSON”]
- name: SpacyTokenizer
- name: SpacyFeaturizer
Configuration for Rasa Core.
policies:
# No configuration for policies was provided. The following default policies were used to train your model.
# If you’d like to customize them, uncomment and adjust the policies.
# See Policies for more information.
name: MemoizationPolicy
name: TEDPolicy
max_history: 5
epochs: 100
constrain_similarities: true
name: RulePolicy
- name: MappingPolicy
mrangach
(Mrangach)
March 24, 2021, 11:45am
6
Hi Juste,
Thanks for getting back to me.
Here are the 3 files i use
docker-compose.yml
version: ‘3.0’
services:
rasa:
container_name: "${SARA_BRANCH_NAME}_sara_server"
build:
context: .
image: obok/rasa:${SARA_BRANCH_NAME}
ports:
- "${SARA_RASA_PORT}:5005"
networks: ['rasa-network']
environment:
"PYTHONPATH": "/app/channels"
"SARA_REDIS_HOST": "10.234.211.203"
"SARA_REDIS_PORT": "6379"
"SARA_REDIS_DB": "0"
"SARA_RASA_PORT": "5003"
labels:
- "build=${SARA_BRANCH_NAME}"
action_server:
container_name: "${SARA_BRANCH_NAME}_action_server"
build:
context: actions
image: obok/actions:${SARA_BRANCH_NAME}
ports:
- 5055
depends_on:
- "rasa"
networks: ['rasa-network']
labels:
- "build=${SARA_BRANCH_NAME}"
networks: {rasa-network: {}}
RASA NLU Dockerfile
FROM rasa/rasa:2.3.4-spacy-en
USER root
WORKDIR /app
COPY . /app
RUN rasa train -c /app/config.yml -d /app/domain.yml --data /app/data --debug --out /app/models
VOLUME /app
CMD [ “run”,"-m","/app/models","–endpoints",“endpoints.yml”,"–debug","–credentials",“credentials.yml”, “–auth-token”, “None”,"–enable-api","–cors","*","-vv" ]
RASA Actions dockerfile
FROM rasa/rasa-sdk:2.3.0
WORKDIR /app
USER root
COPY . /app/actions
VOLUME /app
USER 1001
CMD [ “start”, “–actions”, “actions”, “–debug” ]
Regards,
Mukundhan