Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

NPE in BucketingModule when providedLabel of DataBatch is not set #11775

Description

@milandesai

Package: Scala
Mxnet Version: 1.1.0
Java Version: openjdk 1.8.0_131
Maven Version: [unused]
Scala Runtime: 2.12.4

We create a DataBatch without setting the providedLabel field. We then call BucketingModule.forward(...) with the data batch and get a NullPointerException:

java.lang.NullPointerException was thrown.
java.lang.NullPointerException
	at ml.dmlc.mxnet.DataDesc$.ListMap2Descs(IO.scala:252)
	at ml.dmlc.mxnet.module.BucketingModule.forward(BucketingModule.scala:313)

This happens because the implicit method ListMap2Descs tries to convert ListMap[String, Shape] into IndexedSeq[DataDesc] but fails because the former is null by default.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions