Skip to content

Commit

Permalink
mint -> embodied all names changed
Browse files Browse the repository at this point in the history
  • Loading branch information
moon-strider committed Aug 8, 2023
1 parent 7cd577d commit ae2354c
Show file tree
Hide file tree
Showing 50 changed files with 127 additions and 127 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ ENV SERVICE_PORT ${SERVICE_PORT}

RUN mkdir /src

COPY ./services/mint_sender/requirements.txt /src/requirements.txt
COPY ./annotators/embodied_status/requirements.txt /src/requirements.txt
RUN pip install -r /src/requirements.txt

COPY ./services/mint_sender /src/
COPY ./annotators/embodied_status /src/
COPY ./common/ /src/common/
WORKDIR /src

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# mint_status annotator service
# embodied_status annotator service

This annotator does the following:
1. Checks whether there is a command currently being performed on the side of *connector* (e.g. minecraft-interface);
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def respond():
command = dialog["human"]["attributes"].get("performing_command")

if command:
logger.info(f"mint_status: found command `{command}` sent to robot")
logger.info(f"embodied_status: found command `{command}` sent to robot")
result = False
try:
result = check_if_command_performed(command, ROS_FLASK_SERVER, dialog.get("dialog_id", "unknown"))
Expand All @@ -46,11 +46,11 @@ def respond():
else:
# command is not completed, so do not update human attributes
results += [{"human_attributes": dialog["human"]["attributes"]}]
logger.info(f"mint_status: status of command `{command}` performance: `{result}`")
logger.info(f"embodied_status: status of command `{command}` performance: `{result}`")
else:
logger.info("mint_status: NO command found in human attributes")
logger.info("embodied_status: NO command found in human attributes")
results += [{"human_attributes": {}}]

total_time = time.time() - st_time
logger.info(f"mint_status exec time: {total_time:.3f}s")
logger.info(f"embodied_status exec time: {total_time:.3f}s")
return jsonify(results)
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
SERVICE_PORT: 8043
SERVICE_NAME: mint_status
SERVICE_NAME: embodied_status
CUDA_VISIBLE_DEVICES: '0'
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: mint-status
name: embodied-status
endpoints:
- check
compose:
Expand All @@ -7,10 +7,10 @@ compose:
build:
args:
SERVICE_PORT: 8043
SERVICE_NAME: mint_status
SERVICE_NAME: embodied_status
CUDA_VISIBLE_DEVICES: '0'
context: .
dockerfile: ./annotators/mint_status/Dockerfile
dockerfile: ./annotators/embodied_status/Dockerfile
command: gunicorn --workers=1 server:app -b 0.0.0.0:8043 --timeout 600
environment:
- CUDA_VISIBLE_DEVICES=0
Expand All @@ -22,6 +22,6 @@ compose:
memory: 100M
volumes:
- ./common:/src/common
- ./annotators/mint_status:/src
- ./annotators/embodied_status:/src
ports:
- 8043:8043
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# dream_mint distribution
# dream_embodied distribution

![Architecture](architecture.png)

Expand All @@ -20,8 +20,8 @@ This distribution functions the following way:
# Launch command:

```
docker-compose -f docker-compose.yml -f assistant_dists/dream_mint/docker-compose.override.yml -f \
assistant_dists/dream_mint/dev.yml -f assistant_dists/dream_mint/proxy.yml up --build
docker-compose -f docker-compose.yml -f assistant_dists/dream_embodied/docker-compose.override.yml -f \
assistant_dists/dream_embodied/dev.yml -f assistant_dists/dream_embodied/proxy.yml up --build
```

Attention! The last part of the command stops all running containers on the machine. If this is not required, remove the part of the command after the semicolon or edit it to stop only specific containers if their names are known in advance.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ services:
- "~/.deeppavlov:/root/.deeppavlov"
ports:
- 8021:8021
dff-mint-skill:
dff-embodied-skill:
volumes:
- "./skills/dff_mint_skill:/src"
- "./skills/dff_embodied_skill:/src"
- "./common:/src/common"
ports:
- 8041:8041
mint-sender:
embodied-sender:
volumes:
- "./services/mint_sender:/src"
- "./services/embodied_sender:/src"
- "./common:/src/common"
ports:
- 8042:8042
Expand All @@ -91,9 +91,9 @@ services:
- "./common:/home/dkr/common"
ports:
- 5000:5000
mint-status:
embodied-status:
volumes:
- "./annotators/mint_status:/src"
- "./annotators/embodied_status:/src"
- "./common:/src/common"
ports:
- 8043:8043
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
services:
agent:
command: sh -c 'bin/wait && python -m deeppavlov_agent.run agent.channel=telegram agent.telegram_token=$TG_TOKEN agent.pipeline_config=assistant_dists/dream_mint/pipeline_conf.json'
command: sh -c 'bin/wait && python -m deeppavlov_agent.run agent.channel=telegram agent.telegram_token=$TG_TOKEN agent.pipeline_config=assistant_dists/dream_embodied/pipeline_conf.json'
environment:
WAIT_HOSTS: "ranking-based-response-selector:8002, sentence-ranker:8128, dff-program-y-skill:8008, sentseg:8011, convers-evaluation-selector:8009,
intent-catcher-commands:8014, badlisted-words:8018, dialogpt:8125, entity-detection:8103, ner:8021, spacy-nounphrases:8006,
dff-mint-skill:8041, mint-sender:8042, ros-flask-server:5000, mint-status:8043"
dff-embodied-skill:8041, embodied-sender:8042, ros-flask-server:5000, embodied-status:8043"
WAIT_HOSTS_TIMEOUT: ${WAIT_TIMEOUT:-480}
HIGH_PRIORITY_INTENTS: 1
RESTRICTION_FOR_SENSITIVE_CASE: 1
Expand Down Expand Up @@ -252,14 +252,14 @@ services:
reservations:
memory: 100M

mint-sender:
embodied-sender:
env_file: [ .env ]
build:
args:
SERVICE_PORT: 8042
ROS_FLASK_SERVER: http://ros-flask-server:5000
context: .
dockerfile: ./services/mint_sender/Dockerfile
dockerfile: ./services/embodied_sender/Dockerfile
command: flask run -h 0.0.0.0 -p 8042
environment:
- FLASK_APP=server
Expand All @@ -270,14 +270,14 @@ services:
reservations:
memory: 100M

mint-status:
embodied-status:
env_file: [ .env ]
build:
args:
SERVICE_PORT: 8043
ROS_FLASK_SERVER: http://ros-flask-server:5000
context: .
dockerfile: ./annotators/mint_status/Dockerfile
dockerfile: ./annotators/embodied_status/Dockerfile
command: flask run -h 0.0.0.0 -p 8043
environment:
- FLASK_APP=server
Expand All @@ -288,16 +288,16 @@ services:
reservations:
memory: 100M

dff-mint-skill:
dff-embodied-skill:
env_file: [ .env ]
build:
args:
SERVICE_PORT: 8041
SERVICE_NAME: dff_mint_skill
SERVICE_NAME: dff_embodied_skill
LANGUAGE: EN
ROS_FLASK_SERVER: http://ros-flask-server:5000
context: .
dockerfile: ./skills/dff_mint_skill/Dockerfile
dockerfile: ./skills/dff_embodied_skill/Dockerfile
command: gunicorn --workers=1 server:app -b 0.0.0.0:8041 --reload
deploy:
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,18 @@
}
},
"annotators": {
"mint_status": {
"embodied_status": {
"connector": {
"protocol": "http",
"timeout": 10,
"url": "http://mint-status:8043/check"
"url": "http://embodied-status:8043/check"
},
"dialog_formatter": "state_formatters.dp_formatters:utt_non_punct_dialog",
"response_formatter": "state_formatters.dp_formatters:simple_formatter_service",
"state_manager_method": "update_attributes",
"source": {
"component": "components/Pnfwoei382fn02nv20vnvVN.yml",
"service": "services/mint_status/service_configs/mint_status"
"service": "services/embodied_status/service_configs/embodied_status"
}
},
"sentseg": {
Expand Down Expand Up @@ -289,11 +289,11 @@
"service": "skills/dff_program_y_skill/service_configs/dff-program-y-skill"
}
},
"dff_mint_skill": {
"dff_embodied_skill": {
"connector": {
"protocol": "http",
"timeout": 2.0,
"url": "http://dff-mint-skill:8041/respond"
"url": "http://dff-embodied-skill:8041/respond"
},
"dialog_formatter": "state_formatters.dp_formatters:dff_intent_responder_skill_formatter",
"response_formatter": "state_formatters.dp_formatters:skill_with_attributes_formatter_service",
Expand All @@ -304,7 +304,7 @@
"is_enabled": true,
"source": {
"component": "components/Ofjpqo2f9j2NFKknf9.yml",
"service": "skills/dff_mint_skill/service_configs/dff_mint_skill"
"service": "skills/dff_embodied_skill/service_configs/dff_embodied_skill"
}
},
"dummy_skill": {
Expand Down Expand Up @@ -364,11 +364,11 @@
}
},
"actors": {
"mint_sender": {
"embodied_sender": {
"connector": {
"protocol": "http",
"timeout": 1.0,
"url": "http://mint-sender:8042/send"
"url": "http://embodied-sender:8042/send"
},
"dialog_formatter": "state_formatters.dp_formatters:last_human_bot_annotated_utterance",
"response_formatter": "state_formatters.dp_formatters:simple_formatter_service",
Expand All @@ -380,7 +380,7 @@
}
},
"metadata": {
"display_name": "Dream Mint",
"display_name": "Dream Embodied",
"author": "DeepPavlov",
"description": "Embodied AI version of DeepPavlov Dream Socialbot that allows user to control remote clients using natural language through dp-agents.",
"version": "0.1.0",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
agent-tg:
command: sh -c 'bin/wait && python -m deeppavlov_agent.run agent.channel=telegram agent.telegram_token=$TG_TOKEN agent.pipeline_config=assistant_dists/dream_mint/pipeline_conf.json agent.db_config=assistant_dists/dream_mint/db_conf.json'
command: sh -c 'bin/wait && python -m deeppavlov_agent.run agent.channel=telegram agent.telegram_token=$TG_TOKEN agent.pipeline_config=assistant_dists/dream_embodied/pipeline_conf.json agent.db_config=assistant_dists/dream_embodied/db_conf.json'
env_file: [.env]
build:
context: ./
Expand Down
2 changes: 1 addition & 1 deletion common/response_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
CAN_NOT_BE_DISLIKED_SKILLS = ["meta_script_skill", "personal_info_skill"]
NOT_ADD_PROMPT_SKILLS = [
"alexa_handler",
"dff_mint_skill",
"dff_embodied_skill",
"dff_intent_responder_skill",
"misheard_asr",
"dff_program_y_dangerous_skill",
Expand Down
2 changes: 1 addition & 1 deletion common/robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


command_intents = {"track_object", "turn_around", "move_forward", "move_backward", "open_door", "move_to_point"}
mint_intents = {"move_forward", "move_backward"}
embodied_intents = {"move_forward", "move_backward"}


def check_if_valid_robot_command(command, service_url, dialog_id, timeout=1.0):
Expand Down
4 changes: 2 additions & 2 deletions common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
sentry_sdk.init(getenv("SENTRY_DSN"))

other_skills = {
"dff_mint_skill",
"dff_embodied_skill",
"dff_intent_responder_skill",
"dff_program_y_dangerous_skill",
"misheard_asr",
Expand Down Expand Up @@ -95,7 +95,7 @@
}

high_priority_intents = {
"dff_mint_skill": {
"dff_embodied_skill": {
"cant_do",
"exit",
"repeat",
Expand Down
6 changes: 3 additions & 3 deletions components.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
8038 robot-fake-server
8039
8040
8041 dff-mint-skill
8042 mint-sender
8043 mint-status
8041 dff-embodied-skill
8042 embodied-sender
8043 embodied-status
8044
8045
8046
Expand Down
12 changes: 6 additions & 6 deletions components/NFiqwoob18b0Buqwbf.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: mint_sender
display_name: Mint sender
name: embodied_sender
display_name: Embodied sender
component_type: Script-based w/o NNs
model_type: null
is_customizable: false
Expand All @@ -10,10 +10,10 @@ gpu_usage: null
connector:
protocol: http
timeout: 1.0
url: http://mint-sender:8042/send
previous_services: [mint_status]
required_previous_services: [mint_status]
url: http://embodied-sender:8042/send
previous_services: [embodied_status]
required_previous_services: [embodied_status]
tags: null
endpoint: send
service: services/mint_sender/service_configs/mint_sender
service: services/embodied_sender/service_configs/embodied_sender
date_created: '2023-06-01T12:12:12'
2 changes: 1 addition & 1 deletion components/OINEWgiowe923n2g2no.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ connector:
url: http://ros-flask-server:5000/is_command_valid
previous_services:
- skills
required_previous_services: [mint_status]
required_previous_services: [embodied_status]
tags: null
endpoint: is_command_valid
service: services/ros_flask_server/service_configs/ros_flask_server
Expand Down
2 changes: 1 addition & 1 deletion components/OInfoqfwbqou2no.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ connector:
url: http://ros-flask-server:5000/perform_command
previous_services:
- skills
required_previous_services: [mint_status]
required_previous_services: [embodied_status]
tags: null
endpoint: perform_command
service: services/ros_flask_server/service_configs/ros_flask_server
Expand Down
12 changes: 6 additions & 6 deletions components/Ofjpqo2f9j2NFKknf9.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
name: dff_mint_skill
display_name: Mint skill
name: dff_embodied_skill
display_name: Embodied skill
component_type: Script-based w/o NNs
model_type: null
is_customizable: false
author: [email protected]
description: A dff skill that interacts with ros_flask_server and mint_status. It allows Dream to answer to embodied intents.
description: A dff skill that interacts with ros_flask_server and embodied_status. It allows Dream to answer to embodied intents.
ram_usage: 150M
gpu_usage: null
connector:
protocol: http
timeout: 1.0
url: http://dff-mint-skill:8041/respond
url: http://dff-embodied-skill:8041/respond
previous_services:
- skill_selectors
required_previous_services: [mint_status]
required_previous_services: [embodied_status]
tags: null
endpoint: respond
service: skills/dff_mint_skill/service_configs/dff_mint_skill
service: skills/dff_embodied_skill/service_configs/dff_embodied_skill
date_created: '2023-06-01T12:12:12'
2 changes: 1 addition & 1 deletion components/Oqwkogbqo2no.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ connector:
url: http://ros-flask-server:5000/is_command_performed
previous_services:
- skills
required_previous_services: [mint_status]
required_previous_services: [embodied_status]
tags: null
endpoint: is_command_performed
service: services/ros_flask_server/service_configs/ros_flask_server
Expand Down
Loading

0 comments on commit ae2354c

Please sign in to comment.