Skip to content

Commit 5d56b13

Browse files
committed
Fix warnings
1 parent 895fecf commit 5d56b13

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

backends/.jvm/src/main/scala/ORTTensorUtils.scala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ object ORTTensorUtils {
115115

116116
value.getByteBuffer.array().map(x => if (x == 1) true else false)
117117
}
118+
case ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING => ??? //TODO
119+
case ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT8 => ??? //TODO, Newly supported in ORT Java 1.9.x
120+
case ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED | ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT16 |
121+
ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT32 | ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT64 |
122+
ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT16 | ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX64 |
123+
ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX128 | ONNX_TENSOR_ELEMENT_DATA_TYPE_BFLOAT16 => ??? //Unsupported
118124
}
119125
value.close()
120126
arr.asInstanceOf[Array[T]]

build.sbt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ lazy val proto = (crossProject(JSPlatform, JVMPlatform)
3939
libraryDependencies -= ("com.thesamet.scalapb" %%% "scalapb-runtime" % scalapb.compiler.Version.scalapbVersion),
4040
libraryDependencies += ("com.thesamet.scalapb" %%% "scalapb-runtime" % scalapb.compiler.Version.scalapbVersion)
4141
.cross(CrossVersion.for3Use2_13),
42-
PB.targets in Compile := Seq(
43-
scalapb.gen() -> (sourceManaged in Compile).value
42+
Compile / PB.targets := Seq(
43+
scalapb.gen() -> (Compile / sourceManaged).value
4444
),
4545
// The trick is in this line:
46-
PB.protoSources in Compile := Seq(file("proto/src/main/protobuf"))
46+
Compile / PB.protoSources := Seq(file("proto/src/main/protobuf"))
4747
)
4848

4949
lazy val backends = (crossProject(JVMPlatform, JSPlatform)
@@ -63,7 +63,7 @@ lazy val backends = (crossProject(JVMPlatform, JSPlatform)
6363
)
6464
.jsSettings(
6565
scalaJSUseMainModuleInitializer := true, //, //Testing
66-
npmDependencies in Compile += "onnxruntime-web" -> "1.9.0"
66+
Compile / npmDependencies += "onnxruntime-web" -> "1.9.0"
6767
)
6868
.jsConfigure { project => project.enablePlugins(ScalablyTypedConverterPlugin) }
6969

@@ -102,7 +102,7 @@ lazy val docs = (crossProject(JVMPlatform)
102102
)
103103
*/
104104

105-
skip in publish := true
105+
publish / skip := true
106106

107107
lazy val sonatypeSettings = Seq(
108108
sonatypeProfileName := "org.emergent-order",

core/src/main/scala/OpToONNXBytesConverter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ trait OpToONNXBytesConverter extends AutoCloseable {
4646
t = Some(
4747
TensorProto()
4848
.withDataType(TensorProto.DataType.FLOAT.value)
49-
.withDims(x.shape.map(_.toLong))
49+
.withDims(ArraySeq.unsafeWrapArray(x.shape.map(_.toLong)))
5050
.withFloatData(ArraySeq.unsafeWrapArray(x.data))
5151
)
5252
)

0 commit comments

Comments
 (0)