Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ML-363] Copy double array to float Homogen Table #364

Closed
Prev Previous commit
move Future sequence to outside the loop
Signed-off-by: minmingzhu <[email protected]>
minmingzhu committed Oct 10, 2023
commit 955616e03a12b3aa5e6ea110d3d9283c1c93af32
16 changes: 8 additions & 8 deletions mllib-dal/src/main/scala/com/intel/oap/mllib/OneDAL.scala
Original file line number Diff line number Diff line change
@@ -575,10 +575,10 @@ object OneDAL {
(labelsArray, featuresAddress)
}
labeledPointsList += f

val result = Future.sequence(labeledPointsList)
Await.result(result, Duration.Inf)
}
val result = Future.sequence(labeledPointsList)
Await.result(result, Duration.Inf)

val labelsTable = new HomogenTable(numRows.toLong, 1, labelsArray,
device)
val featuresTable = new HomogenTable(numRows.toLong, numCols.toLong, featuresAddress, Common.DataType.FLOAT32,
@@ -746,10 +746,10 @@ object OneDAL {
targetArrayAddress
}
futureList += f

}
val result = Future.sequence(futureList)
Await.result(result, Duration.Inf)
}

val table = new HomogenTable(numRows.toLong, numCols.toLong, targetArrayAddress,
Common.DataType.FLOAT64, device)

@@ -821,10 +821,10 @@ object OneDAL {
targetArrayAddress
}
futureList += f

val result = Future.sequence(futureList)
Await.result(result, Duration.Inf)
}
val result = Future.sequence(futureList)
Await.result(result, Duration.Inf)

val table = new HomogenTable(numRows.toLong, numCols.toLong, targetArrayAddress,
Common.DataType.FLOAT32, device)