This repository was archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Reducing memory footprint of one_hot for Large Array Testing #16136
Merged
Conversation
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
Contributor
Author
|
@mxnet-label-bot add [pr-awaiting-review] |
9c4c4a2 to
2838fea
Compare
Contributor
Author
|
@apeforest @ChaiBapchya PR is ready for review |
apeforest
reviewed
Sep 10, 2019
tests/nightly/test_large_vector.py
Outdated
| a[0] = 1 | ||
| a[-1] = 1 | ||
| #default dtype of ndarray is float32 which cannot index elements over 2^32 | ||
| a = nd.array([1], dtype=np.int64) |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe you don't even need this array a?
just do a = nd.one_hot([1], LARGE_X)
Contributor
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it still expects numpy array and errors out AssertionError: Argument indices must have NDArray type cannot avoid that. Also, it keeps default dtype as np.float32 so we have to explicitly give dtype as int64
Contributor
|
Actually, after checking test_large_array.py, I think this test is redundant. We can remove it from test_large_vector. |
…ncorporate large vector part of the test
apeforest
approved these changes
Sep 11, 2019
access2rohit
added a commit
to access2rohit/incubator-mxnet
that referenced
this pull request
Sep 25, 2019
…16136) * reducing memory footprint of one_hot for Large Tensor * removing one_hot from large_vector and changing large_array test to incorporate large vector part of the test
access2rohit
added a commit
to access2rohit/incubator-mxnet
that referenced
this pull request
Sep 25, 2019
…16136) * reducing memory footprint of one_hot for Large Tensor * removing one_hot from large_vector and changing large_array test to incorporate large vector part of the test
access2rohit
added a commit
to access2rohit/incubator-mxnet
that referenced
this pull request
Sep 25, 2019
…16136) * reducing memory footprint of one_hot for Large Tensor * removing one_hot from large_vector and changing large_array test to incorporate large vector part of the test
larroy
pushed a commit
to larroy/mxnet
that referenced
this pull request
Sep 28, 2019
…16136) * reducing memory footprint of one_hot for Large Tensor * removing one_hot from large_vector and changing large_array test to incorporate large vector part of the test
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 2 element one hot location NDarray to ensure
one_hotoperator is not using too much memory.Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Testing
Currently running full suite of all tests in test_large_array.py