Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ansible namespace support flow #539

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ run-db:
pipenv run make db

db:
${CONTAINER_EXEC} run --rm -it -p 5432:${DB_PORT} -e POSTGRES_PASSWORD=${DB_PASSWORD} -e POSTGRES_USER=${DB_USERNAME} -e POSTGRES_DB=${DB_NAME} --name postgres postgres:15.5
${CONTAINER_EXEC} run --rm -it -p 5432:${DB_PORT} -e POSTGRESQL_PASSWORD=${DB_PASSWORD} -e POSTGRESQL_USER=${DB_USERNAME} -e POSTGRESQL_DATABASE=${DB_NAME} --name postgres quay.io/sclorg/postgresql-15-c9s:latest

drop-db:
${CONTAINER_EXEC} stop postgres
Expand Down
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,29 @@ To make it easier to review all our intents and their training examples, there a
- GOOGLE_CLOUD_ACCOUNT_SECRET: Private key of the service account email

This is currently done automatically on commits to main branch by one of our github workflows.

## Apple silicon

There are some extra steps required on apple silicon CPUs

### tensorflow

The tensorflow versions required by rasa is not available on apple silicon. Fortunately there is a [bridge package](https://developer.apple.com/metal/tensorflow-plugin/) available for installation.

In your python venv run the following:
```sh
# pip on macos only has tensorflow versions >=2.13.0
python -m pip install tensorflow-macos==2.12.0 # rasa requires 2.12.0
python -m pip install tensorflow-metal

```

### Out of memory issues while training a mode

You may see that the `make train` has exited with code **9**. This code means that some other process killed the process. After inspection, the train command was eating all the memory. You can reduce the memory requirements by reducing the number of epochs of the training. The numbers can be adjusted in the `./config.yml` file.

Because in Mac you can't install python packages outside of venv, you might hav to change some of the make commands so they do not run the pipenv twice. For example:
```diff
- pipenv run ${RASA_EXEC} run ${RASA_RUN_ARGS} --logging-config-file logging-config.yml
+ ${RASA_EXEC} run ${RASA_RUN_ARGS} --logging-config-file logging-config.yml
```
14 changes: 14 additions & 0 deletions data/ansible/domain.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: "3.1"

intents:
- intent_ansible_namespaces_access_issues

entities: []

actions: []

slots: {}

responses:
utter_ansible_inform_reach_out_to_support:
- text: "I'm sorry you are having trouble accessing a namespace. Please reach out to [[email protected]](mailto:[email protected]) for any questions about the namespace access."
16 changes: 16 additions & 0 deletions data/ansible/nlu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: "3.1"

nlu:
- intent: intent_ansible_namespaces_access_issues
examples: |
- unable to access my ansible namespace
- unable to get to my ansible namespace
- i used to be able to access my ansible namespace but i can't anymore
- are you able to get me access to a ansible namespace
- it says i don't have access to my ansible namespace
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- it says i don't have access to my ansible namespace
- it says i don't have access to my ansible namespace
- ansible namespace access
- ansible namespace issues
- ansible namespace problems
- ansible namespace doesn't work
- how do I get access to an ansible namespace
- fix ansible namespace

Our bot is dumb, some more examples

- ansible namespace access
- ansible namespace issues
- ansible namespace problems
- ansible namespace doesn't work
- how do I get access to an ansible namespace
- fix ansible namespace
9 changes: 9 additions & 0 deletions data/ansible/rules.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: "3.1"

rules:
- rule: Reach out to support
steps:
- intent: intent_ansible_namespaces_access_issues
- action: utter_ansible_inform_reach_out_to_support
- action: form_closing
- active_loop: form_closing
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
version: '3.1'
services:
postgres:
image: postgres:latest
image: quay.io/sclorg/postgresql-15-c9s:latest
restart: always
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_NAME}
POSTGRESQL_PASSWORD: ${DB_PASSWORD}
POSTGRESQL_USER: ${DB_USERNAME}
POSTGRESQL_DATABASE: ${DB_NAME}
ports:
- "5432:${DB_PORT}"
11 changes: 5 additions & 6 deletions story_graph.dot
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ digraph {
0 [class="start active", fillcolor=green, fontsize=12, label=START, style=filled];
"-1" [class=end, fillcolor=red, fontsize=12, label=END, style=filled];
1 [class=active, fontsize=12, label=action_session_start];
2 [class=active, fontsize=12, label=form_create_service_account];
2 [class=active, fontsize=12, label=utter_ansible_inform_reach_out_to_support];
3 [class=active, fontsize=12, label=form_closing];
4 [class="intent dashed active", label=" ? ", shape=rect];
5 [class="intent active", fillcolor=lightblue, label="/intent_create_service_account", shape=rect, style=filled];
6 [class="intent active", fillcolor=lightblue, label="/nlu_fallback", shape=rect, style=filled];
5 [class="intent active", fillcolor=lightblue, label="/intent_ansible_namespaces_access_issues", shape=rect, style=filled];
0 -> "-1" [class="", key=NONE, label=""];
0 -> 1 [class=active, key=NONE, label=""];
1 -> 5 [class=active, key=0];
2 -> 4 [class=active, key=NONE, label=""];
2 -> 6 [class=active, key=0];
2 -> 3 [class=active, key=NONE, label=""];
3 -> 4 [class=active, key=NONE, label=""];
5 -> 2 [class=active, key=0];
6 -> 2 [class=active, key=0];
}
Loading