@Override
    public Map<String, Tensor> evaluate(Map<String, Tensor> inputs) {
        Map<String, OnnxTensor> onnxInputs = null;
        try {
            onnxInputs = TensorConverter.toOnnxTensors(inputs, EmbeddedOnnxRuntime.ortEnvironment(), session.instance());
            Map<String, Tensor> outputs = new HashMap<>();
            try (OrtSession.Result result = session.instance().run(onnxInputs)) {
                for (Map.Entry<String, OnnxValue> output : result) {
                    String mapped = TensorConverter.asValidName(output.getKey());
                    outputs.put(mapped, TensorConverter.toVespaTensor(output.getValue()));
                }
                return outputs;
            }
        } catch (OrtException e) {
            throw new RuntimeException("ONNX Runtime exception", e);
        } finally {
            if (onnxInputs != null) {
                onnxInputs.values().forEach(OnnxTensor::close);
            }
        }
    }
Evaluates an ONNX Model by deferring to ONNX Runtime.

@author lesters
model-integration/src/main/java/ai/vespa/modelintegration/evaluator/EmbeddedOnnxEvaluator.java