|
11 | 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 | 12 | // See the License for the specific language governing permissions and |
13 | 13 | // limitations under the License. |
| 14 | +#include <viam/sdk/services/private/mlmodel_server.hpp> |
14 | 15 |
|
15 | 16 | #include <viam/sdk/common/private/service_helper.hpp> |
16 | 17 | #include <viam/sdk/rpc/server.hpp> |
17 | 18 | #include <viam/sdk/services/mlmodel.hpp> |
18 | 19 | #include <viam/sdk/services/private/mlmodel.hpp> |
19 | | -#include <viam/sdk/services/private/mlmodel_server.hpp> |
20 | 20 |
|
21 | 21 | namespace viam { |
22 | 22 | namespace sdk { |
@@ -56,11 +56,11 @@ ::grpc::Status MLModelServiceServer::Infer( |
56 | 56 | inputs.emplace(tensor_pair.first, std::move(tensor)); |
57 | 57 | } else { |
58 | 58 | // Normal case: multiple tensors, do metadata checks |
| 59 | + // If there are extra tensors in the inputs that not found in the metadata, |
| 60 | + // they will not be passed on to the implementation. |
59 | 61 | for (const auto& input : md.inputs) { |
60 | 62 | const auto where = request->input_tensors().tensors().find(input.name); |
61 | 63 | if (where == request->input_tensors().tensors().end()) { |
62 | | - // Ignore any inputs for which we don't have metadata, since |
63 | | - // we can't validate the type info. |
64 | 64 | // if the input vector of the expected name is not found, return an error |
65 | 65 | std::ostringstream message; |
66 | 66 | message << "Expected tensor input `" << input.name |
|
0 commit comments