| 218 | } |
| 219 | |
| 220 | SchemaType Model::inputSchema() const { |
| 221 | SchemaType inputs; |
| 222 | const Specification::ModelDescription& interface = m_spec->description(); |
| 223 | int size = interface.input_size(); |
| 224 | assert(size >= 0); |
| 225 | inputs.reserve(static_cast<size_t>(size)); |
| 226 | for (int i = 0; i < size; i++) { |
| 227 | const Specification::FeatureDescription &desc = interface.input(i); |
| 228 | inputs.push_back(std::make_pair(desc.name(), desc.type())); |
| 229 | } |
| 230 | return inputs; |
| 231 | } |
| 232 | |
| 233 | SchemaType Model::outputSchema() const { |
| 234 | SchemaType outputs; |