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

Dnnc config arg #585

Open
wants to merge 166 commits into
base: dev
Choose a base branch
from
Open

Dnnc config arg #585

wants to merge 166 commits into from

Conversation

dimakarp1996
Copy link
Contributor

No description provided.

AndriiHura and others added 30 commits January 24, 2022 11:22
@dimakarp1996 dimakarp1996 changed the title [WIP]Dnnc config arg Dnnc config arg Oct 30, 2023
@@ -0,0 +1,2 @@
DNNC intent classifier.
Source: https://github.com/deeppavlov/DeepPavlov/blob/master/deeppavlov/configs/classifiers/few_shot_roberta.json
Copy link
Collaborator

Choose a reason for hiding this comment

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

другой формат ридми немного - посмотри по аналогии сделай, пожалуйста

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Можно уточнить, по аналогии с чем? У разных скиллов и аннотаторов ридми разные


LOGREG_DIR = "/root/.deeppavlov/downloads/logreg_files"
try:
model = build_model(os.getenv("CONFIG"), download=True)
Copy link
Collaborator

Choose a reason for hiding this comment

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

у тебя тут вроде скачивается модель. Но почему у тебя куча файликов всяких добавлено - надо убрать их и скачивать тоже

Copy link
Contributor Author

Choose a reason for hiding this comment

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

tar.gz убрал

Copy link
Collaborator

Choose a reason for hiding this comment

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

так а pkl почему оставил? и что за огромные jso, которые даже на гитхабе не открываются? их бы тоже убрать в скачивание

logger = logging.getLogger(__name__)


supported_intents = ["tell_joke", "are_you_a_bot", "meaning_of_life", "oos"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

почему это здесь? это должно быть частью конфиг файла. Ну то есть чтобы задать названия классов тоже в рамках конфига

Copy link
Contributor Author

Choose a reason for hiding this comment

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

добавил

url: http://dnnc-intents:8218/model
dialog_formatter:
name: state_formatters.dp_formatters:preproc_last_human_utt_dialog
skill_name: dnnc_intents
Copy link
Collaborator

Choose a reason for hiding this comment

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

это не так работает. Убери этот параметр отсюда и из пайплайн конфа

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Параметр skill_name убрал. В пайплайн конфе в dnnc_intents его и нет

@@ -0,0 +1,25 @@
FROM deeppavlov/base-gpu:0.17.5

RUN pip install git+https://github.com/deeppavlov/DeepPavlov.git@1.3.0
Copy link
Collaborator

Choose a reason for hiding this comment

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

а базового докер образа поновее сразу нет? чтобы не переставлять, а сразу взять новый? если нет, напиши Феде запрос на такой, пожалуйста, в паблик канале слака.


app = Flask(__name__)
if os.getenv("CONFIG") == "classifier.json":
labels = [k.split("\t")[0] for k in open(f"{LOGREG_DIR}/classes.dict", "r").readlines()]
Copy link
Collaborator

Choose a reason for hiding this comment

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

а почему так? почему не универсальное обращение

Copy link
Collaborator

Choose a reason for hiding this comment

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

лучше бы было единообразное обращение в обоих случаях

Copy link
Collaborator

Choose a reason for hiding this comment

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

плюс хочется, чтобы если человек хочет весь список доступных интентов детектить, ему не надо было все перечислять в классес, а можно было просто классес убрать и все


LOGREG_DIR = "/root/.deeppavlov/downloads/logreg_files"
try:
model = build_model(os.getenv("CONFIG"), download=True)
Copy link
Collaborator

Choose a reason for hiding this comment

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

так а pkl почему оставил? и что за огромные jso, которые даже на гитхабе не открываются? их бы тоже убрать в скачивание

@dilyararimovna dilyararimovna changed the base branch from main to dev January 22, 2024 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants