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
Show file tree
Hide file tree
Changes from 158 commits
Commits
Show all changes
166 commits
Select commit Hold shift + click to select a range
72842e3
Fix requirements.txt (#84)
AndriiHura Jan 24, 2022
a67e15c
fix itsdangerous requirements
mtalimanchuk Feb 18, 2022
0f8ef0e
pin itsdangerous requirements for all flask==1.1.1 servers
mtalimanchuk Feb 18, 2022
6f0684a
Merge pull request #102 from deepmipt/fix/combined-classification-fla…
mtalimanchuk Feb 18, 2022
d237711
Merge pull request #103 from deepmipt/dev
dilyararimovna Feb 18, 2022
e990264
Merge pull request #107 from deepmipt/dev
dilyararimovna Mar 2, 2022
3208f71
Merge pull request #119 from deepmipt/dev
dilyararimovna Mar 11, 2022
ab44553
Merge pull request #123 from deepmipt/dev
dilyararimovna Mar 18, 2022
1c9a463
Merge pull request #137 from deepmipt/dev
dilyararimovna Apr 8, 2022
f8e4a59
Merge pull request #145 from deepmipt/dev
dilyararimovna Apr 30, 2022
48872a6
Merge pull request #150 from deepmipt/dev
dilyararimovna May 4, 2022
ed42f0c
Merge pull request #153 from deepmipt/dev
dilyararimovna May 5, 2022
30f290c
Merge pull request #155 from deepmipt/dev
dilyararimovna May 6, 2022
de510bc
Merge pull request #158 from deepmipt/dev
dilyararimovna May 11, 2022
ab2dcbd
Merge pull request #165 from deepmipt/dev
dilyararimovna May 27, 2022
525783a
Merge pull request #174 from deepmipt/dev
dilyararimovna Jun 27, 2022
7e87a36
Merge pull request #177 from deepmipt/dev
dilyararimovna Jun 30, 2022
82a19df
Merge pull request #188 from deepmipt/dev
dilyararimovna Jul 28, 2022
2b50d6d
Merge pull request #192 from deepmipt/dev
dilyararimovna Aug 24, 2022
3e3dd71
Merge pull request #14 from deeppavlovteam/dev
dilyararimovna Sep 15, 2022
d42e1d6
Merge pull request #201 from deeppavlov/dev
dilyararimovna Sep 19, 2022
4d5cb36
Merge pull request #206 from deeppavlov/dev
dilyararimovna Oct 11, 2022
5c36b99
Merge pull request #216 from deeppavlov/dev
dilyararimovna Nov 22, 2022
2961057
Merge pull request #247 from deeppavlov/dev
dilyararimovna Dec 2, 2022
c8632e9
Merge pull request #248 from deeppavlov/dev
dilyararimovna Dec 2, 2022
e4df912
Merge pull request #251 from deeppavlov/dev
dilyararimovna Dec 5, 2022
c8dc1fa
Merge pull request #258 from deeppavlov/dev
dilyararimovna Dec 7, 2022
6a85fe4
Merge pull request #259 from deeppavlov/dev
dilyararimovna Dec 12, 2022
92b29eb
Merge pull request #267 from deeppavlov/dev
dilyararimovna Dec 19, 2022
d74eca8
Merge pull request #272 from deeppavlov/dev
dilyararimovna Jan 7, 2023
40326da
Merge pull request #286 from deeppavlov/dev
dilyararimovna Jan 17, 2023
bd21b37
Merge pull request #290 from deeppavlov/dev
dilyararimovna Jan 19, 2023
e6d15dc
Merge pull request #293 from deeppavlov/dev
dilyararimovna Jan 24, 2023
f627d8f
Merge pull request #294 from deeppavlov/dev
dilyararimovna Jan 25, 2023
a2d1b76
Merge pull request #296 from deeppavlov/dev
dilyararimovna Jan 25, 2023
4c311c8
Merge pull request #297 from deeppavlov/dev
dilyararimovna Jan 25, 2023
ebb6de9
Merge pull request #300 from deeppavlov/dev
dilyararimovna Jan 26, 2023
fa37856
Merge pull request #305 from deeppavlov/dev
dilyararimovna Jan 30, 2023
7bfe903
Merge pull request #316 from deeppavlov/dev
dilyararimovna Feb 7, 2023
598e490
Merge pull request #320 from deeppavlov/dev
dilyararimovna Feb 13, 2023
4c17e6f
Merge pull request #323 from deeppavlov/dev
dilyararimovna Feb 14, 2023
9dbf729
Merge pull request #327 from deeppavlov/dev
dilyararimovna Feb 15, 2023
28ac733
Merge pull request #332 from deeppavlov/dev
dilyararimovna Feb 22, 2023
7015110
Merge pull request #340 from deeppavlov/dev
dilyararimovna Mar 13, 2023
aa44906
Merge pull request #350 from deeppavlov/dev
dilyararimovna Mar 18, 2023
a9bae9d
Merge pull request #352 from deeppavlov/dev
dilyararimovna Mar 18, 2023
979f764
Merge pull request #355 from deeppavlov/dev
dilyararimovna Mar 19, 2023
f9ffefd
Merge pull request #356 from deeppavlov/dev
dilyararimovna Mar 19, 2023
a869d9f
Merge pull request #358 from deeppavlov/dev
dilyararimovna Mar 19, 2023
8273f1f
Merge pull request #372 from deeppavlov/dev
dilyararimovna Apr 4, 2023
375a987
Merge pull request #374 from deeppavlov/dev
dilyararimovna Apr 4, 2023
ed5d384
Merge pull request #379 from deeppavlov/dev
dilyararimovna Apr 7, 2023
254d4cb
Merge pull request #387 from deeppavlov/dev
dilyararimovna Apr 12, 2023
9ee02d4
Merge pull request #394 from deeppavlov/dev
dilyararimovna Apr 17, 2023
ab851f9
Merge pull request #399 from deeppavlov/dev
dilyararimovna Apr 21, 2023
7c0dbf9
Merge pull request #401 from deeppavlov/dev
dilyararimovna Apr 21, 2023
5e902b4
Merge pull request #404 from deeppavlov/dev
dilyararimovna Apr 25, 2023
0051fe4
Merge pull request #436 from deeppavlov/dev
dilyararimovna Apr 26, 2023
d59baf8
Merge pull request #447 from deeppavlov/dev
dilyararimovna May 3, 2023
bf636b6
Merge pull request #451 from deeppavlov/dev
dilyararimovna May 5, 2023
8106de6
Merge pull request #455 from deeppavlov/dev
dilyararimovna May 10, 2023
c28c38c
Merge pull request #459 from deeppavlov/dev
dilyararimovna May 17, 2023
644ddab
Merge pull request #462 from deeppavlov/dev
dilyararimovna May 18, 2023
9b2708f
Merge pull request #474 from deeppavlov/dev
dilyararimovna May 25, 2023
528e063
Merge pull request #475 from deeppavlov/dev
dilyararimovna May 29, 2023
a0ff368
Merge pull request #485 from deeppavlov/dev
dilyararimovna Jun 15, 2023
8c3f34d
Merge pull request #501 from deeppavlov/dev
dilyararimovna Jun 28, 2023
82ae4a9
Merge pull request #511 from deeppavlov/dev
dilyararimovna Jul 10, 2023
58e6912
Merge pull request #519 from deeppavlov/dev
dilyararimovna Jul 10, 2023
fa72dc6
Merge pull request #520 from deeppavlov/dev
dilyararimovna Jul 10, 2023
eed244e
Merge pull request #542 from deeppavlov/dev
dilyararimovna Aug 3, 2023
b0f1df3
Merge pull request #554 from deeppavlov/dev
dilyararimovna Aug 15, 2023
9d1e48d
Merge pull request #557 from deeppavlov/dev
dilyararimovna Aug 16, 2023
0015ded
Merge pull request #582 from deeppavlov/dev
dilyararimovna Oct 17, 2023
79b033a
Update dev.yml
dimakarp1996 Oct 18, 2023
e37ea6f
Update docker-compose.override.yml
dimakarp1996 Oct 18, 2023
5df4153
Update gpu1.yml
dimakarp1996 Oct 18, 2023
14b4595
Update proxy.yml
dimakarp1996 Oct 18, 2023
d0cf210
Update cpu.yml
dimakarp1996 Oct 18, 2023
cf53b05
Update test.yml
dimakarp1996 Oct 18, 2023
03990a9
Update pipeline_conf.json
dimakarp1996 Oct 18, 2023
2c24f49
Create 2JUPwwo1SZzxuj4RXjI350.yml
dimakarp1996 Oct 18, 2023
cfae777
Create Readme.md
dimakarp1996 Oct 18, 2023
818c220
Create environment.yml
dimakarp1996 Oct 18, 2023
059ae07
Create classifier.json
dimakarp1996 Oct 18, 2023
aa50156
Create service.yml
dimakarp1996 Oct 18, 2023
ab3698e
Create Dockerfile
dimakarp1996 Oct 18, 2023
48b2820
Create requirements.txt
dimakarp1996 Oct 18, 2023
8c55ec3
Create load_test.py
dimakarp1996 Oct 18, 2023
cd5dd6b
Create requirements_load_test.txt
dimakarp1996 Oct 18, 2023
1a5f366
Create test.sh
dimakarp1996 Oct 18, 2023
5f42d80
Create test.py
dimakarp1996 Oct 18, 2023
8878a85
Update classifier.json
dimakarp1996 Oct 18, 2023
caf5180
Update runtests.sh
dimakarp1996 Oct 21, 2023
a629a05
Update classifier.json
dimakarp1996 Oct 21, 2023
698dd2e
Create utils.py
dimakarp1996 Oct 21, 2023
193f771
Create server.py
dimakarp1996 Oct 21, 2023
a92b53b
Create dnnc_classes.py
dimakarp1996 Oct 21, 2023
05acd47
Update utils.py
dimakarp1996 Oct 21, 2023
03cd5eb
Update server.py
dimakarp1996 Oct 21, 2023
ae0a7a7
Update dnnc_classes.py
dimakarp1996 Oct 21, 2023
05ee608
Update utils.py
dimakarp1996 Oct 21, 2023
f9822d8
Add files via upload
dimakarp1996 Oct 21, 2023
197997e
Delete annotators/dnnc_intents/data_full(1).json
dimakarp1996 Oct 21, 2023
bfe6ec2
Add files via upload
dimakarp1996 Oct 21, 2023
671b388
Update server.py
dimakarp1996 Oct 21, 2023
38a14d1
Update test.py
dimakarp1996 Oct 21, 2023
1a18dfd
Update utils.py
dimakarp1996 Oct 21, 2023
cf7b466
Update dnnc_classes.py
dimakarp1996 Oct 21, 2023
58407e6
Update load_test.py
dimakarp1996 Oct 21, 2023
6ffdc7f
Update server.py
dimakarp1996 Oct 21, 2023
684df29
Update test.py
dimakarp1996 Oct 21, 2023
f40f064
Update utils.py
dimakarp1996 Oct 21, 2023
4a1fe06
Update server.py
dimakarp1996 Oct 21, 2023
7b71743
Update server.py
dimakarp1996 Oct 21, 2023
62b5b58
black codestyle
Oct 21, 2023
c96b172
Update dev.yml
dimakarp1996 Oct 21, 2023
93614cf
Update docker-compose.override.yml
dimakarp1996 Oct 21, 2023
a71115a
Now bug is that container does not find requirements.txt
Oct 21, 2023
fbde76c
Update proxy.yml
dimakarp1996 Oct 21, 2023
1207989
Update docker-compose.override.yml
dimakarp1996 Oct 21, 2023
a06d3be
Update docker-compose.override.yml
dimakarp1996 Oct 21, 2023
adf9231
Update classifier.json
dimakarp1996 Oct 21, 2023
e50c401
Update classifier.json
dimakarp1996 Oct 21, 2023
7506ef4
Update classifier.json
dimakarp1996 Oct 21, 2023
23df970
Update classifier.json
dimakarp1996 Oct 21, 2023
f0d28ce
Update utils.py
dimakarp1996 Oct 21, 2023
71dd329
Update Dockerfile
dimakarp1996 Oct 21, 2023
ffe6517
Update Dockerfile
dimakarp1996 Oct 21, 2023
4cfd828
Update Dockerfile
dimakarp1996 Oct 21, 2023
fbeb9ee
Update Dockerfile
dimakarp1996 Oct 21, 2023
c265e41
Update requirements.txt
dimakarp1996 Oct 21, 2023
ef0d9e2
Update requirements.txt
dimakarp1996 Oct 21, 2023
1751503
Update requirements.txt
dimakarp1996 Oct 21, 2023
1d7e943
Update 2JUPwwo1SZzxuj4RXjI350.yml
dimakarp1996 Oct 21, 2023
712ddf9
Update docker-compose.override.yml
dimakarp1996 Oct 21, 2023
19e41fd
Update utils.py
dimakarp1996 Oct 21, 2023
3d5e61e
Update classifier.json
dimakarp1996 Oct 21, 2023
71b5762
Update utils.py
dimakarp1996 Oct 21, 2023
208947e
Update utils.py
dimakarp1996 Oct 21, 2023
422c3ae
Update utils.py
dimakarp1996 Oct 21, 2023
b5ae191
Update utils.py
dimakarp1996 Oct 21, 2023
13ff24f
Update utils.py
dimakarp1996 Oct 21, 2023
1698e3b
Update utils.py
dimakarp1996 Oct 21, 2023
e737701
Update utils.py
dimakarp1996 Oct 21, 2023
c433e58
codestyle still needs to pass
Oct 23, 2023
929b787
codestyle
Oct 23, 2023
6eb047a
codestyle
Oct 23, 2023
5866747
hj
Oct 23, 2023
9362fef
Old files preserved, new files added. Now logreg is in place, all 150…
Oct 23, 2023
03a3431
codestyle
Oct 23, 2023
ffea5f7
CPU-only
Oct 23, 2023
0170f7c
h
Oct 27, 2023
ae79269
Update server.py
dimakarp1996 Oct 27, 2023
d1cefcc
codestyle
Oct 27, 2023
4306c8c
hf
Oct 27, 2023
c2d6d3a
Update server.py
dimakarp1996 Oct 29, 2023
0ad100b
analogous to dnnc_intents branch
dimakarp1996 Oct 30, 2023
6d18eab
Delete annotators/dnnc_intents/logreg_files.tar.gz.md5
dimakarp1996 Nov 9, 2023
c3e8d83
Delete annotators/dnnc_intents/logreg_files.tar.gz
dimakarp1996 Nov 9, 2023
70caae1
Update 2JUPwwo1SZzxuj4RXjI350.yml
dimakarp1996 Nov 9, 2023
7a49fe2
Update Dockerfile
dimakarp1996 Nov 9, 2023
f9626b5
Update docker-compose.override.yml
dimakarp1996 Nov 9, 2023
09aecac
Update utils_roberta.py
dimakarp1996 Nov 9, 2023
383770c
codestyle
dimakarp1996 Nov 9, 2023
fd65563
Update Readme.md
dimakarp1996 Nov 9, 2023
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
23 changes: 23 additions & 0 deletions annotators/dnnc_intents/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
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.

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


WORKDIR /base/DeepPavlov

WORKDIR /src
RUN mkdir common

COPY annotators/dnnc_intents/requirements.txt ./requirements.txt
RUN pip install -r requirements.txt

RUN python -m spacy download en_core_web_sm

ARG SERVICE_PORT
ENV SERVICE_PORT=$SERVICE_PORT
ARG CONFIG
ENV CONFIG=$CONFIG

COPY annotators/dnnc_intents/ ./
COPY common/ common/

CMD gunicorn --workers=1 server:app -b 0.0.0.0:${SERVICE_PORT} --timeout=1200 --preload
2 changes: 2 additions & 0 deletions annotators/dnnc_intents/Readme.md
Original file line number Diff line number Diff line change
@@ -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.

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

75 changes: 75 additions & 0 deletions annotators/dnnc_intents/classifier.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"chainer": {
"in": ["x"],
"pipe": [
{
"class_name": "stream_spacy_tokenizer",
"in": [
"x"
],
"id": "my_tokenizer",
"lemmas": false,
"out": "token_lemmas",
"spacy_model": "en_core_web_sm",
"support_load_path": "{DOWNLOADS_PATH}/logreg_files/support_dataset.json"
},
{
"ref": "my_tokenizer",
"in": [
"token_lemmas"
],
"out": [
"text_lem"
]
},
{
"class_name": "fasttext",
"in": [
"token_lemmas"
],
"load_path": "{DOWNLOADS_PATH}/embeddings/fasttext/{LANGUAGE}.bin",
"mean": true,
"out": [
"text_vector"
]
},
{
"in": [
"text_vector"
],
"out": [
"y_pred_probas"
],
"class_name": "sklearn_component",
"main": true,
"save_path": "{DOWNLOADS_PATH}/logreg_files/model.pkl",
"load_path": "{DOWNLOADS_PATH}/logreg_files/model.pkl",
"model_class": "sklearn.linear_model:LogisticRegression",
"infer_method": "predict_proba",
"C": 10,
"penalty": "l2"
}
],
"out": ["y_pred_probas"]
},
"metadata": {
"variables": {
"ROOT_PATH": "~/.deeppavlov",
"DOWNLOADS_PATH":"{ROOT_PATH}/downloads",
"LOGREG_PATH": "{DOWNLOADS_PATH}/logreg_files",
"LANGUAGE":"en"
},
"imports":["utils"],
"download": [
{
"url": "http://files.deeppavlov.ai/embeddings/fasttext/{LANGUAGE}.bin",
"subdir": "{DOWNLOADS_PATH}/embeddings/fasttext"
},
{
"url": "https://files.deeppavlov.ai/dream_data/dnnc_intents/logreg_files.tar.gz",
"subdir": "{LOGREG_PATH}"
}

]
}
}
61 changes: 61 additions & 0 deletions annotators/dnnc_intents/classifier_roberta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"chainer": {
"in": ["text"],
"pipe": [
{
"class_name": "dnnc_preparer",
"in": ["text"],
"out": ["texts","dataset"]
},
{
"class_name": "dnnc_pairgenerator",
"in": ["texts", "dataset"],
"out": ["x", "x_support", "x_populated", "y_support"],
"bidirectional": false
},
{
"class_name": "torch_transformers_preprocessor",
"in": ["x_populated", "x_support"],
"out": ["bert_features"],
"vocab_file": "{BASE_MODEL}",
"do_lower_case": true,
"max_seq_length": 128
},
{
"class_name": "torch_transformers_classifier_batch1",
"main": true,
"in": ["bert_features"],
"out": ["simmilarity_scores"],
"n_classes": 2,
"return_probas": true,
"pretrained_bert": "{BASE_MODEL}",
"save_path": "{MODEL_PATH}/model",
"load_path": "{MODEL_PATH}/model",
"is_binary": "{BINARY_CLASSIFICATION}"
},
{
"class_name": "dnnc_proba2labels",
"is_binary": "{BINARY_CLASSIFICATION}",
"in": ["simmilarity_scores", "x", "x_populated", "x_support", "y_support"],
"out": ["y_pred"],
"confidence_threshold": 0.0
}
],
"out": ["y_pred"]
},
"metadata": {
"variables": {
"ROOT_PATH": "~/.deeppavlov",
"MODEL_PATH": "{ROOT_PATH}/models/fewshot/roberta_nli_mrpc_1_10",
"BINARY_CLASSIFICATION": true,
"BASE_MODEL": "roberta-base"
},
"imports":["utils_roberta"],
"download": [
{
"url": "http://files.deeppavlov.ai/v1/classifiers/fewshot/roberta_nli_mrpc_1_10.tar.gz",
"subdir": "{MODEL_PATH}"
}
]
}
}
Loading
Loading