-
Notifications
You must be signed in to change notification settings - Fork 77
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
Dream distribution with SF-based DM #572
Conversation
nstsj
commented
Sep 26, 2023
- branch renamed as Dilya suggested
- distribution folder at 'dream/assistant_dists/dream_SFC_based_dm' renamed to 'dream/assistant_dists/dream_ranking_and_sfc_based_dm'
|
||
RUN pip install -r requirements.txt && \ | ||
python -c "import nltk; nltk.download('punkt')" | ||
RUN pip install git+https://github.com/deeppavlov/DeepPavlov.git@feat/speech-fn && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
замените с ветки на конкретный комит
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
а лучше даже релиз
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
НАПОМИНАЮ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -0,0 +1,17 @@ | |||
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_Speech_models_based/pipeline_conf.json agent.db_config=assistant_dists/dream_Speech_models_based/db_conf.json' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
название дистрибутива
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
чекнула, сейчас актуальное название дистрибутива: dream_ranking_and_sf_based_dm
components/XWQGXXbppnHZVm1hyDIw.yml
Outdated
@@ -4,8 +4,7 @@ component_type: null | |||
model_type: NN-based | |||
is_customizable: false | |||
author: publisher@deeppavlov.ai | |||
description: a hierarchical algorithm based on several linear models and a rule-based | |||
approach for the prediction of speech functions described by Eggins and Slade | |||
description: an algorithm based on NN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make a more detailed descriptions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
НАПОМИНАЮ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
LANGUAGE: EN | ||
FALLBACK_FILE: fallbacks_dream_en.json | ||
|
||
ranking-based-response-selector: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
???
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -0,0 +1,444 @@ | |||
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_Speech_models_based/pipeline_conf.json agent.db_config=assistant_dists/dream_Speech_models_based/db_conf.json' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dist name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checked, the name is correct now, dream_ranking_and_sf_based_dm
limits: | ||
memory: 1G | ||
reservations: | ||
memory: 1G |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you sure?
combined-classification:8087, fact-retrieval:8100, entity-detection:8103, | ||
speech-function-classifier:8108, | ||
sentence-ranker:8128, property-extraction:8136, prompt-selector:8135, openai-api-chatgpt:8145, | ||
openai-api-chatgpt-16k:8167, summarization-annotator:8058, dialog-summarizer:8059" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did you remove ALL llm-based skills?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not completely understand - where is a new response selector? you had to create a new response selector, and make a function to integrate SF to response selection
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good question. The removal was accidental and unintentional, we're taking them back rn
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- new response selector has arrived
- regarding llm-based skills, we had to drop
dff-dream-faq-prompted-skill
,dff-google-api-skill
anddff-dream-persona-chatgpt-prompted-skill
bc they require api keys which we didnt have atm. If the skills are crucial, we'll add them back when we know what to add to .env_secret file
combined-classification:8087, fact-retrieval:8100, entity-detection:8103, | ||
speech-function-classifier:8108, | ||
sentence-ranker:8128, property-extraction:8136, prompt-selector:8135, openai-api-chatgpt:8145, | ||
openai-api-chatgpt-16k:8167, summarization-annotator:8058, dialog-summarizer:8059" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not completely understand - where is a new response selector? you had to create a new response selector, and make a function to integrate SF to response selection
|
||
RUN pip install -r requirements.txt && \ | ||
python -c "import nltk; nltk.download('punkt')" | ||
RUN pip install git+https://github.com/deeppavlov/DeepPavlov.git@feat/speech-fn && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
НАПОМИНАЮ
LANGUAGE: EN | ||
FALLBACK_FILE: fallbacks_dream_en.json | ||
|
||
ranking-based-response-selector: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
заменить во всей папке с дистрибутивом на нужный
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Есть
except ValueError: | ||
logger.info(f"Speech function index could not be found from {hyp}, id: {hyp_id}.") | ||
|
||
scores[hyp_id] += speech_predictor_scores[speech_index] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
эта строчка должна быть внутри try-except scope, который выше
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Есть
speech_predictor_scores = [v["confidence"] for v in speech_predictor] | ||
speech_index = None | ||
try: | ||
speech_index = speech_predictor_hyps.index(hyp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
кажется, здесь должно быть не (hyp),а классы, присвоенные аннотатором гипотез hyp.get("annotations", {}).get("speech_function_classifier", {})
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Действительно, просмотрел этот момент. Изменил.
SERVICE_PORT: 8081 | ||
SERVICE_NAME: response_selector | ||
SENTENCE_RANKER_ANNOTATION_NAME: sentence_ranker | ||
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
убрать нэти файлы и создать карточки-файлы под твой респонс селектор
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
"service": "services/response_annotator_selectors/service_configs/agent" | ||
} | ||
}, | ||
"candidate_annotators": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
чтоыб сверять речевые функции гипотез с предсказанными предиктором, нужно аннотировать гипотезы с помощью speech-function-classifier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ПИНГ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Есть
state_formatters/dp_formatters.py
Outdated
res = dialog["human_utterances"][-1]["annotations"].get("speech_function_classifier", [""]) | ||
logger.info(f"formatter log sfp/sfc: {res}") | ||
except Exception as e: | ||
logger.error(f"Failed to format sfc output: {e}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
в чем может быть ошибка?
…v/dream into dream_ranking_and_sfc_based_dm
…ilya' into dream_ranking_and_sfc_based_dm_dilya