Process-Level Recovery
Register (Public Interface)
Receives and processes client registration requests, and prepares initialization for process-level recovery. After the job successfully calls Init, it must wait for the client to confirm that the process-level rescheduling and process-level online recovery on the MindIO side are enabled before calling this interface. After Register succeeds, the process-level rescheduling and process-level online recovery functions become available.
rpc Register(ClientInfo) returns (Status) {}
| Parameter | Type (Protobuf Definition) | Description |
|---|---|---|
| ClientInfo | message ClientInfo{ string jobId = 1; string role = 2; } | ClientInfo.jobId: Job ID ClientInfo.role: Client role |
| Return Value | Type (Protobuf Definition) | Description |
|---|---|---|
| Status | message Status{ int32 code = 1; string info = 2; } | Status.code: Return code.
Status.info: Return information. |
Init
Used to initialize process-level rescheduling and process-level online recovery. After successful initialization, the process-level rescheduling and process-level online recovery functions will be temporarily unavailable.
rpc Init(ClientInfo) returns (Status) {}
| Parameter | Type (Protobuf Definition) | Description |
|---|---|---|
| ClientInfo | message ClientInfo{ string jobId = 1; string role = 2; } | ClientInfo.jobId: Job ID ClientInfo.role: Client role |
| Return Value | Type (Protobuf Definition) | Description |
|---|---|---|
| Status | message Status{ int32 code = 1; string info = 2; } | Status.code: Return code.
Status.info: Return information. |
SubscribeProcessManageSignal
Receives client subscription requests for process control signals. The server allocates a message queue for each job and listens for pending messages in the queue. If a message exists, it is sent to the client via the gRPC stream.
rpc SubscribeProcessManageSignal(ClientInfo) returns (stream ProcessManageSignal){}
| Parameter | Type (Protobuf Definition) | Description |
|---|---|---|
| ClientInfo | message ClientInfo{ string jobId = 1; string role = 2; } | ClientInfo.jobId: Job ID. ClientInfo.role: Client role. |
| Parameter | Type (Protobuf Definition) | Description |
|---|---|---|
| ProcessManageSignal | message FaultRank{ string rankId = 1; string faultType = 2; }message ProcessManageSignal{ string uuid=1; string jobId = 2; string signalType = 3; repeated string actions = 4; repeated FaultRank faultRanks = 5; string changeStrategy = 6; int64 timeout = 7; } | rankId: String, ID of the faulty rank faultType: String, fault type uuid: String, UUID of this signal jobId: String, training job ID signalType: String, signal type actions: Repeated string, actions to be executed faultRanks: Repeated FaultRank, information about faulty ranks changeStrategy: String, recovery strategy to be executed timeout: int64, timeout duration |
| Return Value | Type (Protobuf Definition) | Description |
|---|---|---|
| stream | grpc stream |
|
| nodeRankIds | string array | Node Rank ID of the faulty node. |
| extraParams | string | Passes specific scaling policy information in the form of a JSON string, which is transparently transmitted to MindIO via TaskD and ultimately passed to the callback function for parsing. |
ReportStopComplete
Receives the report from the client on whether the training process was successfully paused.
rpc ReportStopComplete(StopCompleteRequest) returns (Status){}
| Parameter | Type (Protobuf Definition) | Description |
|---|---|---|
| StopCompleteRequest | message StopCompleteRequest{ string jobId = 1; Status status = 2; repeated FaultRank faultRankIds = 3; } | StopCompleteRequest.jobId: Job ID. StopCompleteRequest.status.code: Return code. StopCompleteRequest.status.info: Return information. StopCompleteRequest.faultRankIds: List of global fault ranks for the faulty chips. |
| Return Value | Type (Protobuf Definition) | Description |
|---|---|---|
| Status | message Status{ int32 code = 1; string info = 2; } | Status.code: Return code.
Status.info: Return information. |
ReportRecoverStrategy
Receives the fault recovery strategy supported by the current job reported by the client.
rpc ReportRecoverStrategy(RecoverStrategyRequest) returns (Status) {}
| Parameter | Type (Protobuf Definition) | Description |
|---|---|---|
| RecoverStrategyRequest | message RecoverStrategyRequest{ string jobId = 1; repeated FaultRank faultRankIds = 2; repeated string strategies = 3; } | RecoverStrategyRequest.jobId: Job ID RecoverStrategyRequest.faultRankIds: List of global fault ranks for faulty chips. RecoverStrategyRequest.strategies: Recovery strategies supported by the Current job. |
| Return Value | Type (Protobuf Definition) | Description |
|---|---|---|
| Status | message Status{ int32 code = 1; string info = 2; } | Status.code: Return Code.
Status.info: Return information. |
ReportRecoverStatus
Receives the current job recovery status reported by the client.
rpc ReportRecoverStatus(RecoverStatusRequest) returns (Status) {}
| Parameter | Type (Protobuf Definition) | Description |
|---|---|---|
| RecoverStatusRequest | message RecoverStatusRequest{ string jobId = 1; Status status = 2; string strategy = 3; repeated string isolateRankIds = 4; } | RecoverStatusRequest.jobId: Job ID. RecoverStatusRequest.status.code: Job recovery status code.
RecoverStatusRequest.status.info: Job recovery status. RecoverStatusRequest.strategy: Recovery strategy name. RecoverStatusRequest.isolateRankIds: List of ranks to be isolated when MindIO reports scale-in messages. |
| Return Value | Type (Protobuf Definition) | Description |
|---|---|---|
| Status | message Status{ int32 code = 1; string info = 2; } | Status.code: Return code.
Status.info: Return information. |
ReportProcessFault
Receives the global rank information of the faulty chips reported by the client.
rpc ReportProcessFault(ProcessFaultRequest) returns (Status){}
| Parameter | Type (Protobuf Definition) | Description |
|---|---|---|
| ProcessFaultRequest | message ProcessFaultRequest{ string jobId = 1; repeated FaultRank faultRankIds = 2; } | ProcessFaultRequest.jobId: Job ID. ProcessFaultRequest.faultRankIds: List of global rank IDs of faulty chips. |
| Return Value | Type (Protobuf Definition) | Description |
|---|---|---|
| Status | message Status{ int32 code = 1; string info = 2; } | Status.code: Return code. 0: the recovery process is normal.Status.info: Return information. |
HealthCheck
Checks the gRPC connection status.
rpc HealthCheck(ClientInfo) returns (Status) {}
| Parameter | Type (Protobuf Definition) | Description |
|---|---|---|
| ClientInfo | message ClientInfo{ string jobId = 1; string role = 2; } | ClientInfo.jobId: Job ID. ClientInfo.role: Client role. |
| Return Value | Type (Protobuf Definition) | Description |
|---|---|---|
| Status | message Status{ int32 code = 1; string info = 2; } | Status.code: Return code. 0: the fault recovery process is normal.Status.info: Return information. |
An AI platform can control the fault recovery process and recovery strategy through Pod Group Annotations. For example, when the platform writes the Pod Group Annotation key: ProcessRecoverStrategy with an empty value, the fault recovery will be blocked until the platform writes a specific recovery strategy to continue the recovery process.
Table 1 Parameters
| Parameter | Value | Description |
|---|---|---|
| ProcessRecoverStrategy |
|
|
| ProcessConfirmFault | string | A list of fault key-value pairs refreshed by ClusterD, formatted as a string of "id1:type1,id2:type2". id represents the global rank ID, and type represents the fault type. type = 0 indicates that the faulty chip only has on-chip memory faults, and type = 1 indicates at least one non-on-chip memory fault. |
| ProcessResultFault | string | A list of fault key-value pairs confirmed by the platform, formatted as a string of "id1:type1,id2:type2". id represents the global rank ID, and type represents the fault type. type = 0 indicates that the faulty chip only has on-chip memory faults, and type = 1 indicates at least one non-on-chip memory fault. |
| RankTableReady |
|
|
| ProcessRecoverStatus |
|
|