Skip to content

Onnx Support for String Tensors? #4034

Closed

Description

System information

Windows 10 -
.NET Core 2 - ML.NET 1.2

Issue

Is there any timeline for allowing string tensors to be used in Onnx models within ML.NET? Tried both InferenceSession and pipeline ApplyOnnxModel and keep hitting in the

public static NamedOnnxValue CreateNamedOnnxValue(string name, ReadOnlySpan data, OnnxShape shape)
{
if (!_onnxTypeMap.Contains(typeof(T)))
throw new NotImplementedException($"Not implemented type {typeof(T)}");
return NamedOnnxValue.CreateFromTensor(name, new DenseTensor(data.ToArray(), shape.Select(x => (int)x).ToArray()));
}

Because onnxTypeMap does not support string.

My OnnxModel takes input of string and output of long+float.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    P2Priority of the issue for triage purpose: Needs to be fixed at some point.onnxExporting ONNX models or loading ONNX models

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions