I am trying to upload the custom model. It is registered successfully, but during deployment, I am getting issue as below
{
“model_id”: “jcyhWpUBiLYOqMKJU5V0”,
“task_type”: “DEPLOY_MODEL”,
“function_name”: “TEXT_EMBEDDING”,
“state”: “FAILED”,
“worker_node”: [
“kddpRYg9R9-Hj0GkixiUfw”,
“Gtk83tuLSx-DrYN2I_wx4w”,
“tEhaPrkWTGy_N210nfJBDA”
],
“create_time”: 1740983965882,
“last_update_time”: 1740983968556,
“error”: “”“{“kddpRYg9R9-Hj0GkixiUfw”:“all-MiniLM-L6-v2.pt file not found in: /home/elastic/data/opensearch/os_on_9200/data/ml_cache/models_cache/models/jcyhWpUBiLYOqMKJU5V0/1/all-MiniLM-L6-v2”,“Gtk83tuLSx-DrYN2I_wx4w”:“all-MiniLM-L6-v2.pt file not found in: /home/elastic/data/opensearch/os_on_9200/data/ml_cache/models_cache/models/jcyhWpUBiLYOqMKJU5V0/1/all-MiniLM-L6-v2”,“tEhaPrkWTGy_N210nfJBDA”:“all-MiniLM-L6-v2.pt file not found in: /home/elastic/data/opensearch/os_on_9200/data/ml_cache/models_cache/models/jcyhWpUBiLYOqMKJU5V0/1/all-MiniLM-L6-v2”}”“”,
“is_async”: true
}
I used zip file to upload the model.
Initialize ML Commons client
ml_client = MLCommonClient(client)
Define local model paths
model_path = “all-MiniLM-L6-v2_torchscript_sentence-transformer.zip” # Path to your model file
model_config_path = “all-MiniLM-L6-v2_torchscript.json” # Path to your config file
Mention the same name at all 3 places – your model, and in config.json for model name param and and even zip folder name – and try to deploy again via script.