Skip to content

Проблема с парсингом входных данных через api и через socket #1663

Open
@clover-soft

Description

@clover-soft

Want to contribute to DeepPavlov? Please read the contributing guideline first.

Please enter all the information below, otherwise your issue may be closed without a warning.

DeepPavlov version (you can look it up by running pip show deeppavlov):
Name: deeppavlov
Version: 1.3.0

Python version:
3.9
Operating system (ubuntu linux, windows, ...):
ubuntu server 22
Issue:

Content or a name of a configuration file:

python -m deeppavlov risesocket -d few_shot_roberta --socket-type TCP -p 5000

отправляем запрос на api либо сокет
вот на примере вашей документации
POST deeppavlov:5000
JSON:
{"texts":[
"what expression would i use to say i love you if i were an italian",
"what's the currency conversion between krones and yen",
"i'd like to reserve a high-end car"
],
"dataset" :[
["please help me book a rental car for nashville", "car_rental"],
["how can i rent a car in boston", "car_rental"],
["help me get a rental car for march 2 to 6th", "car_rental"],

["how many pesos can i get for one dollar",                              "exchange_rate"],
["tell me the exchange rate between rubles and dollars",                 "exchange_rate"],
["what is the exchange rate in pesos for 100 dollars",                   "exchange_rate"],

["can you tell me how to say 'i do not speak much spanish', in spanish", "translate"],
["please tell me how to ask for a taxi in french",                       "translate"],
["how would i say thank you if i were russian",                          "translate"]

]
}

Command that led to error:

deeppavlov  | 2023-10-01 14:09:54.100 ERROR in 'deeppavlov.utils.socket.socket'['socket'] at line 189: got several different batch sizes: {3, 9}

Error (including full traceback):

PS
Нормально отвечает если количество вариантов в dataset совпадает с texts
но это не годится

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions