| 1071 | for (const auto & [key, value] : context.values) { |
| 1072 | if (key.rfind(prefix, 0) == 0) { |
| 1073 | output_item[key.substr(prefix.size())] = value; |
| 1074 | } |
| 1075 | } |
| 1076 | output_items.push_back(std::move(output_item)); |
| 1077 | std::cout << "workflow_step=" << id << "\n"; |
| 1078 | } |
| 1079 | |
| 1080 | context.values = base_values; |
| 1081 | context.values[id + ".count"] = std::to_string(output_items.size()); |
| 1082 | context.batches[id] = std::move(output_items); |
| 1083 | std::cout << "workflow_step=" << id << "\n"; |
| 1084 | std::cout << "batch_items=" << context.values[id + ".count"] << "\n"; |
| 1085 | } |
| 1086 | |
| 1087 | void run_workflow_step_once( |
| 1088 | const engine::runtime::ModelRegistry & registry, |
| 1089 | const engine::io::json::Value & step, |
| 1090 | const WorkflowRunOptions & options, |
| 1091 | WorkflowContext & context) { |
| 1092 | const std::string type = workflow_string(step, "type"); |
| 1093 | if (type == "batch_inputs") { |
| 1094 | run_batch_inputs_step(step, context); |
| 1095 | } else if (type == "convert_audio") { |
| 1096 | run_convert_audio_step(step, options, context); |
| 1097 | } else if (type == "model") { |
no test coverage detected