Skip to content

[FEATURE] Track model last undeployed time #3503

Open
@pyek-bot

Description

@pyek-bot

Is your feature request related to a problem?
Currently, there is no easy way to determine if a model was un-deployed at a particular point in time or not. For deployments, you can query the .plugins-ml-task index and look for DEPLOY_MODEL task type to know when models were deployed. Moreover, you can also look at last_deploy_time when you fetch a model via its ID.

Example:

{
                "_id": "<MODEL_ID>",
                "_index": ".plugins-ml-model",
                "_primary_term": 4,
                "_score": 0.0,
                "_seq_no": 1,
                "_source": {
                    "algorithm": "REMOTE",
                    "connector_id": "<CONNECTOR_ID>",
                    "created_time": 1737753808053,
                    "is_hidden": false,
                    **"last_deployed_time": 1738511769832,**
                    "last_updated_time": 1738511769832,
                    "model_group_id": "<MODEL_GROUP_ID>",
                    "model_state": "DEPLOYED",
                    "name": "test model",
                },
                "_version": 14
            }

Tasks

         {
                "_id": "<TASK_ID>",
                "_index": ".plugins-ml-task",
                "_primary_term": 2,
                "_score": null,
                "_seq_no": 285,
                "_source": {
                    "create_time": 1738152921394,
                    "function_name": "REMOTE",
                    "is_async": true,
                    "last_update_time": 1738152927304,
                    "model_id": "<MODEL_ID>",
                    "state": "COMPLETED",
                    "task_type": "DEPLOY_MODEL"
                },
                "_version": 3,
                "sort": [
                    1738152921394
                ]
            }

Not knowing undeploy time makes it hard to debug problems during a time-frame where you wish to know the status of the model.

What solution would you like?
Track last_undeploy_time if applicable

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

On-deck

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions