API for Querying the Task Status Between Prefill and Decode Nodes

Function

Queries the status of tasks between prefill and decode nodes.

This API does not need to be called by users. It is a communication API between the Coordinator and Controller.

Format

Operation type: POST

URL: https://{ip}:{port}/v1/instances/query_tasks

  • Preferably set {ip} to {manage_ip} in Starting Coordinator. If the parameter is not configured, set {ip} to the value of the manage_ip parameter in the ms_coordinator.json configuration file.
  • Preferably set {port} to {manage_port} in Starting Coordinator. If the parameter is not configured, set {port} to the value of the manage_port parameter in the ms_coordinator.json configuration file.

Request Parameters

Parameter

Type

Description

p_id

uint64_t

Mandatory.

Prefill node ID.

d_id

uint64_t

Mandatory.

Decode node ID.

Usage Example

Request example:

POST https://{ip}:{port}/v1/instances/query_tasks

Request body:

{
    "p_id": 0,
    "d_id": 1
}

Response example:

  • There is no task between PDs.
    {
        "is_end": true
    }
  • There are tasks between PDs.
    {
        "is_end": false
    }

Output Description

Parameter

Type

Description

is_end

Bool

Whether the task between PDs is complete.