diff --git a/backends/.jvm/src/main/scala/ORTTensorUtils.scala b/backends/.jvm/src/main/scala/ORTTensorUtils.scala index 97829e8a..52928894 100644 --- a/backends/.jvm/src/main/scala/ORTTensorUtils.scala +++ b/backends/.jvm/src/main/scala/ORTTensorUtils.scala @@ -115,6 +115,12 @@ object ORTTensorUtils { value.getByteBuffer.array().map(x => if (x == 1) true else false) } + case ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING => ??? //TODO + case ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT8 => ??? //TODO, Newly supported in ORT Java 1.9.x + case ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED | ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT16 | + ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT32 | ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT64 | + ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT16 | ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX64 | + ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX128 | ONNX_TENSOR_ELEMENT_DATA_TYPE_BFLOAT16 => ??? //Unsupported } value.close() arr.asInstanceOf[Array[T]] diff --git a/build.sbt b/build.sbt index 844dcb3b..86f3e46e 100755 --- a/build.sbt +++ b/build.sbt @@ -39,11 +39,11 @@ lazy val proto = (crossProject(JSPlatform, JVMPlatform) libraryDependencies -= ("com.thesamet.scalapb" %%% "scalapb-runtime" % scalapb.compiler.Version.scalapbVersion), libraryDependencies += ("com.thesamet.scalapb" %%% "scalapb-runtime" % scalapb.compiler.Version.scalapbVersion) .cross(CrossVersion.for3Use2_13), - PB.targets in Compile := Seq( - scalapb.gen() -> (sourceManaged in Compile).value + Compile / PB.targets := Seq( + scalapb.gen() -> (Compile / sourceManaged).value ), // The trick is in this line: - PB.protoSources in Compile := Seq(file("proto/src/main/protobuf")) + Compile / PB.protoSources := Seq(file("proto/src/main/protobuf")) ) lazy val backends = (crossProject(JVMPlatform, JSPlatform) @@ -63,7 +63,7 @@ lazy val backends = (crossProject(JVMPlatform, JSPlatform) ) .jsSettings( scalaJSUseMainModuleInitializer := true, //, //Testing - npmDependencies in Compile += "onnxruntime-web" -> "1.9.0" + Compile / npmDependencies += "onnxruntime-web" -> "1.9.0" ) .jsConfigure { project => project.enablePlugins(ScalablyTypedConverterPlugin) } @@ -102,7 +102,7 @@ lazy val docs = (crossProject(JVMPlatform) ) */ -skip in publish := true +publish / skip := true lazy val sonatypeSettings = Seq( sonatypeProfileName := "org.emergent-order", diff --git a/core/src/main/scala/OpToONNXBytesConverter.scala b/core/src/main/scala/OpToONNXBytesConverter.scala index 1aec317b..7bdb6bda 100644 --- a/core/src/main/scala/OpToONNXBytesConverter.scala +++ b/core/src/main/scala/OpToONNXBytesConverter.scala @@ -46,7 +46,7 @@ trait OpToONNXBytesConverter extends AutoCloseable { t = Some( TensorProto() .withDataType(TensorProto.DataType.FLOAT.value) - .withDims(x.shape.map(_.toLong)) + .withDims(ArraySeq.unsafeWrapArray(x.shape.map(_.toLong))) .withFloatData(ArraySeq.unsafeWrapArray(x.data)) ) )