Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
Docker Opensearch 3.0.0
Describe the issue:
I registered and deployed a ml model : “all-MiniLM-L6-v2”,
however, _predict failed with “Empty text document”.
What should I do?
Configuration:
model status:
curl -s -XGET localhost:9200/_plugins/_ml/models/lt5-oZgB-AztwZ-SF2o2?pretty
{
“name” : “all-MiniLM-L6-v2”,
“model_group_id” : “lN5-oZgB-AztwZ-SF2oc”,
“algorithm” : “TEXT_EMBEDDING”,
“model_version” : “1”,
“description” : “This is a sentence-transformers model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search.”,
“model_format” : “TORCH_SCRIPT”,
“model_state” : “DEPLOYED”,
“model_content_size_in_bytes” : 91789778,
“model_content_hash_value” : “25e2858993cd477936f24e412a508b005aa6b59a308301cc69690e4b90cab439”,
“model_config” : {
“model_type” : “bert”,
“embedding_dimension” : 384,
“framework_type” : “SENTENCE_TRANSFORMERS”,
“all_config” : “{\“_name_or_path\”:\“sentence-transformers/paraphrase-MiniLM-L3-v2\”, … }”
},
“created_time” : 1755056052022,
“last_updated_time” : 1755833240670,
“last_registered_time” : 1755056065416,
“last_deployed_time” : 1755833009113,
“auto_redeploy_retry_times” : 0,
“total_chunks” : 10,
“planning_worker_node_count” : 1,
“current_worker_node_count” : 1,
“planning_worker_nodes” : [
“kti9yxO8TjWjlAXud8A5PA”
],
“deploy_to_all_nodes” : true,
“is_hidden” : false
}
test_predict.json:
{
“input”: {
“docs”: [“日本の都市の文化的特徴について教えてください”]
}
}
Relevant Logs or Screenshots:
curl -XPOST localhost:9200/_plugins/_ml/models/lt5-oZgB-AztwZ-SF2o2/_predict?pretty -H “Content-Type:application/json” -d @test_predict.json
{
“error” : {
“root_cause” : [
{
“type” : “illegal_argument_exception”,
“reason” : “Empty text docs”
}
],
“type” : “illegal_argument_exception”,
“reason” : “Empty text docs”
},
“status” : 400
}