From ad564eb7d0f29ee79cf200e90fad71bca00989a6 Mon Sep 17 00:00:00 2001 From: moon-strider Date: Wed, 30 Oct 2024 14:48:17 +0400 Subject: [PATCH] dream_russian config updated for gigachat demo usage --- .../dream_russian/docker-compose.override.yml | 224 ++++++------------ .../dream_russian/pipeline_conf.json | 73 ------ 2 files changed, 66 insertions(+), 231 deletions(-) diff --git a/assistant_dists/dream_russian/docker-compose.override.yml b/assistant_dists/dream_russian/docker-compose.override.yml index 3b8769969e..0834fbc3f3 100644 --- a/assistant_dists/dream_russian/docker-compose.override.yml +++ b/assistant_dists/dream_russian/docker-compose.override.yml @@ -5,10 +5,10 @@ services: WAIT_HOSTS: "dff-program-y-ru-skill:8008, convers-evaluation-selector-ru:8009, dff-intent-responder-ru-skill:8012, intent-catcher-ru:8014, badlisted-words-ru:8018, ner-ru:8021, personal-info-ru-skill:8030, sentseg-ru:8011, - spelling-preprocessing-ru:8074, entity-linking-ru:8075, wiki-parser-ru:8077, dff-generative-ru-skill:8092, - dff-friendship-ru-skill:8086, entity-detection-ru:8103, dialogpt-ru:8125, - dff-template-skill:8120, spacy-annotator-ru:8129, dialogrpt-ru:8122, - fact-retrieval-ru:8110, text-qa-ru:8078, summarization-annotator:8058, rut5-summarizer:8060, combined-classification-ru:8198" + spelling-preprocessing-ru:8074, + dff-friendship-ru-skill:8086, entity-detection-ru:8103, + dff-template-skill:8120, spacy-annotator-ru:8129, dff-generative-ru-skill:8092, + text-qa-ru:8078, summarization-annotator:8058, rut5-summarizer:8060, combined-classification-ru:8198, gigachat-api:8187, dff-universal-prompted-skill:8147" WAIT_HOSTS_TIMEOUT: ${WAIT_TIMEOUT:-1200} HIGH_PRIORITY_INTENTS: 1 RESTRICTION_FOR_SENSITIVE_CASE: 1 @@ -87,7 +87,7 @@ services: reservations: memory: 128M - sentseg-ru: + sentseg-ru: ########## env_file: [ .env_ru ] build: args: @@ -98,12 +98,12 @@ services: environment: - CUDA_VISIBLE_DEVICES=0 - FLASK_APP=server - deploy: - resources: - limits: - memory: 3G - reservations: - memory: 3G + # deploy: + # resources: + # limits: + # memory: 3G + # reservations: + # memory: 3G intent-catcher-ru: env_file: [ .env_ru ] @@ -142,7 +142,7 @@ services: reservations: memory: 128M - combined-classification-ru: + combined-classification-ru: ################ env_file: [ .env_ru ] build: args: @@ -154,13 +154,13 @@ services: command: gunicorn --workers=1 server:app -b 0.0.0.0:8198 --timeout 600 environment: - CUDA_VISIBLE_DEVICES=0 - deploy: - resources: - limits: - memory: 2G - reservations: - memory: 2G - ner-ru: + # deploy: + # resources: + # limits: + # memory: 2G + # reservations: + # memory: 2G + ner-ru: ######################### env_file: [ .env_ru ] build: args: @@ -175,14 +175,14 @@ services: - FLASK_APP=server - CUDA_VISIBLE_DEVICES=0 tty: true - deploy: - resources: - limits: - memory: 2G - reservations: - memory: 2G + # deploy: + # resources: + # limits: + # memory: 2G + # reservations: + # memory: 2G - entity-detection-ru: + entity-detection-ru: ############################ env_file: [ .env_ru ] build: args: @@ -196,12 +196,12 @@ services: environment: - FLASK_APP=server tty: true - deploy: - resources: - limits: - memory: 3.5G - reservations: - memory: 3.5G + # deploy: + # resources: + # limits: + # memory: 3.5G + # reservations: + # memory: 3.5G personal-info-ru-skill: env_file: [ .env_ru ] @@ -220,54 +220,7 @@ services: reservations: memory: 128M - entity-linking-ru: - env_file: [ .env_ru ] - build: - args: - SERVICE_PORT: 8075 - SERVICE_NAME: entity_linking - CONFIG: entity_linking_rus.json - SRC_DIR: annotators/entity_linking_rus - LANGUAGE: RU - context: ./ - dockerfile: annotators/entity_linking_rus/Dockerfile - environment: - - CUDA_VISIBLE_DEVICES=0 - deploy: - resources: - limits: - memory: 700M - reservations: - memory: 700M - - wiki-parser-ru: - env_file: [ .env_ru ] - build: - args: - SERVICE_PORT: 8077 - SERVICE_NAME: wiki_parser - WIKI_LITE_DB: http://files.deeppavlov.ai/kbqa/wikidata/wikidata2022.hdt - WIKI_LITE_INDEX_DB: http://files.deeppavlov.ai/kbqa/wikidata/wikidata2022.hdt.index.v1-1 - WIKI_CACHE_DB: http://files.deeppavlov.ai/kbqa/wikidata/wikidata_cache.json - CONFIG: wiki_parser.json - SRC_DIR: annotators/wiki_parser - COMMIT: ff5b156d16a949c3ec99da7fb60ae907dec37a41 - LANGUAGE: RU - FAST: 1 - context: ./ - dockerfile: annotators/wiki_parser/Dockerfile-test - command: flask run -h 0.0.0.0 -p 8077 - environment: - - CUDA_VISIBLE_DEVICES='' - - FLASK_APP=server - deploy: - resources: - limits: - memory: 256M - reservations: - memory: 256M - - spelling-preprocessing-ru: + spelling-preprocessing-ru: #################### env_file: [ .env_ru ] build: args: @@ -281,14 +234,14 @@ services: command: flask run -h 0.0.0.0 -p 8074 environment: - FLASK_APP=server - deploy: - resources: - limits: - memory: 8G - reservations: - memory: 8G + # deploy: + # resources: + # limits: + # memory: 8G + # reservations: + # memory: 8G - spacy-annotator-ru: + spacy-annotator-ru: ######################## env_file: [ .env_ru ] build: args: @@ -302,26 +255,23 @@ services: command: flask run -h 0.0.0.0 -p 8129 environment: - FLASK_APP=server - deploy: - resources: - limits: - memory: 256M - reservations: - memory: 256M + # deploy: + # resources: + # limits: + # memory: 256M + # reservations: + # memory: 256M dff-friendship-ru-skill: env_file: [ .env_ru ] build: args: SERVICE_PORT: 8086 - SERVICE_NAME: dff_friendship_skill # has to be the same with skill dir name + SERVICE_NAME: dff_friendship_skill LANGUAGE: RU context: . dockerfile: ./skills/dff_friendship_skill/Dockerfile command: gunicorn --workers=1 server:app -b 0.0.0.0:8086 - # command: flask run -h 0.0.0.0 -p 8086 - # environment: - # - FLASK_APP=server deploy: resources: limits: @@ -329,26 +279,6 @@ services: reservations: memory: 128M - dialogpt-ru: - env_file: [ .env_ru ] - build: - context: ./services/dialogpt_RU/ - args: - SERVICE_PORT: 8125 - PRETRAINED_MODEL_NAME_OR_PATH: DeepPavlov/rudialogpt3_medium_based_on_gpt2_v2 - LANGUAGE: RU - MAX_HISTORY_DEPTH: 3 - command: flask run -h 0.0.0.0 -p 8125 - environment: - - CUDA_VISIBLE_DEVICES=0 - - FLASK_APP=server - deploy: - resources: - limits: - memory: 3G - reservations: - memory: 3G - dff-generative-ru-skill: env_file: [ .env_ru ] build: @@ -367,25 +297,6 @@ services: reservations: memory: 128M - dialogrpt-ru: - env_file: [ .env_ru ] - build: - context: ./services/dialogrpt_ru/ - args: - SERVICE_PORT: 8122 - PRETRAINED_MODEL_FNAME: dialogrpt_ru_ckpt_v0.pth - TOKENIZER_NAME_OR_PATH: DeepPavlov/rudialogpt3_medium_based_on_gpt2_v2 - command: flask run -h 0.0.0.0 -p 8122 - environment: - - CUDA_VISIBLE_DEVICES=0 - - FLASK_APP=server - deploy: - resources: - limits: - memory: 4G - reservations: - memory: 4G - dff-template-skill: env_file: [ .env_ru ] build: @@ -402,28 +313,6 @@ services: reservations: memory: 128M - fact-retrieval-ru: - env_file: [ .env_ru ] - build: - args: - CONFIG: fact_retrieval_rus.json - COMMIT: c8264bf82eaa3ed138395ab68f71d47a4175f2fc - TOP_N: 20 - SERVICE_PORT: 8110 - SRC_DIR: annotators/fact_retrieval_rus - context: ./ - dockerfile: annotators/fact_retrieval_rus/Dockerfile-test - command: flask run -h 0.0.0.0 -p 8110 - environment: - - CUDA_VISIBLE_DEVICES=0 - - FLASK_APP=server - deploy: - resources: - limits: - memory: 10G - reservations: - memory: 10G - text-qa-ru: env_file: [ .env_ru ] build: @@ -463,6 +352,25 @@ services: reservations: memory: 256M + dff-universal-prompted-skill: + env_file: [ .env ] + build: + args: + SERVICE_PORT: 8147 + SERVICE_NAME: dff_universal_prompted_skill + GENERATIVE_TIMEOUT: 120 + N_UTTERANCES_CONTEXT: 7 + DEFAULT_LM_SERVICE_URL: http://gigachat-api:8187/respond + DEFAULT_LM_SERVICE_CONFIG: default_generative_config.json + context: . + dockerfile: ./skills/dff_universal_prompted_skill/Dockerfile + deploy: + resources: + limits: + memory: 128M + reservations: + memory: 128M + rut5-summarizer: env_file: [ .env ] build: diff --git a/assistant_dists/dream_russian/pipeline_conf.json b/assistant_dists/dream_russian/pipeline_conf.json index 703c658e00..6801b3e329 100644 --- a/assistant_dists/dream_russian/pipeline_conf.json +++ b/assistant_dists/dream_russian/pipeline_conf.json @@ -212,61 +212,6 @@ "service": "annotators/entity_detection_rus/service_configs/entity-detection-ru" } }, - "entity_linking": { - "connector": { - "protocol": "http", - "timeout": 1.0, - "url": "http://entity-linking-ru:8075/model" - }, - "dialog_formatter": "state_formatters.dp_formatters:el_formatter_dialog", - "response_formatter": "state_formatters.dp_formatters:simple_formatter_service", - "previous_services": [ - "annotators.ner", - "annotators.entity_detection" - ], - "state_manager_method": "add_annotation", - "is_enabled": true, - "source": { - "component": "components/m30AHfu4VgC51bUU6Jo7A.yml", - "service": "annotators/entity_linking_rus/service_configs/entity-linking-ru" - } - }, - "fact_retrieval": { - "connector": { - "protocol": "http", - "timeout": 1.0, - "url": "http://fact-retrieval-ru:8110/respond" - }, - "dialog_formatter": "state_formatters.dp_formatters:fact_retrieval_rus_formatter_dialog", - "response_formatter": "state_formatters.dp_formatters:simple_formatter_service", - "previous_services": [ - "annotators.entity_linking" - ], - "state_manager_method": "add_annotation", - "is_enabled": true, - "source": { - "component": "components/vE3pRKimWyPc5qaeW8Q1Q.yml", - "service": "annotators/fact_retrieval_rus/service_configs/fact-retrieval-ru" - } - }, - "wiki_parser": { - "connector": { - "protocol": "http", - "timeout": 1.0, - "url": "http://wiki-parser-ru:8077/model" - }, - "dialog_formatter": "state_formatters.dp_formatters:wp_formatter_dialog", - "response_formatter": "state_formatters.dp_formatters:simple_formatter_service", - "required_previous_services": [ - "annotators.entity_linking" - ], - "state_manager_method": "add_annotation", - "is_enabled": true, - "source": { - "component": "components/feDgqHKLibnMNM3HSbnmA.yml", - "service": "annotators/wiki_parser/service_configs/wiki-parser-ru" - } - }, "summarization_annotator": { "connector": { "protocol": "http", @@ -416,24 +361,6 @@ "component": "components/05PqJXVd7gV7DqslN5z3A.yml", "service": "annotators/entity_detection/service_configs/entity-detection-ru" } - }, - "dialogrpt": { - "connector": { - "protocol": "http", - "timeout": 1.0, - "url": "http://dialogrpt-ru:8122/respond" - }, - "dialog_formatter": "state_formatters.dp_formatters:hypotheses_with_context_list", - "response_formatter": "state_formatters.dp_formatters:simple_formatter_service", - "previous_services": [ - "skills" - ], - "state_manager_method": "add_hypothesis_annotation_batch", - "is_enabled": true, - "source": { - "component": "components/DUW2u7FwPMyhBOWrK1HTg.yml", - "service": "services/dialogrpt_ru/service_configs/dialogrpt-ru" - } } }, "skill_selectors": {