nswamy closed pull request #11790: NPE in BucketingModule when providedLabel of 
DataBatch is not set
URL: https://github.com/apache/incubator-mxnet/pull/11790
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/scala-package/core/src/main/scala/org/apache/mxnet/IO.scala 
b/scala-package/core/src/main/scala/org/apache/mxnet/IO.scala
index d9c767cb1fa..47fd4eee939 100644
--- a/scala-package/core/src/main/scala/org/apache/mxnet/IO.scala
+++ b/scala-package/core/src/main/scala/org/apache/mxnet/IO.scala
@@ -356,6 +356,10 @@ object DataDesc {
   }
 
   implicit def ListMap2Descs(shapes: ListMap[String, Shape]): 
IndexedSeq[DataDesc] = {
-    shapes.map { case (k, s) => new DataDesc(k, s) }.toIndexedSeq
+    if (shapes != null) {
+      shapes.map { case (k, s) => new DataDesc(k, s) }.toIndexedSeq
+    } else {
+      null
+    }
   }
 }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to