RunFlowModel

Applicable Products

Product

Supported

Atlas A3 training products/Atlas A3 inference products

√

Atlas A2 training products/Atlas A2 inference products

√

Atlas 200I/500 A2 inference products

x

Atlas inference products

x

Atlas training products

x

Function Description

Runs a specified model synchronously. This function is called by Proc.

Prototype

1
2
int32_t RunFlowModel(const char *modelKey, const std::vector<std::shared_ptr<FlowMsg>> &inputMsgs,
std::vector<std::shared_ptr<FlowMsg>> &outputMsgs, int32_t timeout)

Parameters

Parameter

Input/Output

Description

modelKey

Input

Specified model key, which is the same as name specified in AddInvokedClosure.

inputMsgs

Input

Input for the model.

outputMsgs

Output

Output of model execution.

timeout

Input

Model execution waiting timeout, in ms. The value -1 means no timeout limit.

Returns

Exception Handling

None

Constraints

None