This repository was archived by the owner on Nov 17, 2023. It is now read-only.
Repository navigation
NPE in BucketingModule when providedLabel of DataBatch is not set - #11790
Merged
Merged
Conversation
Contributor
Author
Member
|
@milandesai Thanks for the quick fix, @lanking520 also suggested the same fix. This will work for now, we are discussing to add new APIs(alike provideData and provideShape) to take |
Contributor
|
@milandesai thanks for your contribution. A unit test would be great... |
KellenSunderland
pushed a commit
to KellenSunderland/incubator-mxnet
that referenced
this pull request
Jul 19, 2018
…ache#11790) NPE in BucketingModule when providedLabel of DataBatch is not set
KellenSunderland
pushed a commit
to KellenSunderland/incubator-mxnet
that referenced
this pull request
Jul 21, 2018
…ache#11790) NPE in BucketingModule when providedLabel of DataBatch is not set
Member
|
Closing this issue in favor of #11878 |
XinYao1994
pushed a commit
to XinYao1994/incubator-mxnet
that referenced
this pull request
Aug 29, 2018
…ache#11790) NPE in BucketingModule when providedLabel of DataBatch is not set
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Using BucketingModule together with a DataBatch in which the
provideLabelfield is not set triggers a NullPointerException inBucketingModule.forward(...). This happens because the implicit methodListMap2Descstries to convertListMap[String, Shape]intoIndexedSeq[DataDesc]but fails because the former is null by default. A simple fix is to do a null check in the implicit method.Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments