Skip to content

Support to Bool input for Onnx models #1996

@luamct

Description

@luamct

It seems Synapse doesn't yet support BOOL inputs on onnx models. If I run the following code, where coolean-inputs.onnx is a very simple model that simply bypasses its single boolean input:

def df: DataFrame = Seq(true, true, false).toDF("i1")

val model: ONNXModel = new ONNXModel()
  .setModelLocation("boolean-inputs.onnx")
  .setFeedDict(Map("i1" -> "i1"))
  .setFetchDict(Map("o1" -> "o1"))

val actual: DataFrame = model.transform(df)

It throws an exception scala.NotImplementedError: Tensor input type BOOL not supported. Only FLOAT, DOUBLE, INT8, INT16, INT32, INT64, STRING types are supported.. Curiously, a boolean output works fine.

I guess my questions are:

  1. Is it in the roadmap to add this support anytime soon?
  2. How complex would that be? Should I attempt a PR on it, or there are more implications that it seems at first?

Thanks!

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions