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

Add put feature with linear indexing on PyTorch engine #1749

Merged
merged 8 commits into from
Jun 30, 2022

Conversation

KexinFeng
Copy link
Contributor

@KexinFeng KexinFeng commented Jun 25, 2022

Description

Add put feature support on PyTorch engine. This corresponds to take which get values according to linear indexing.

The relavant preceding PRs
Support of take from pytorch #1627

@codecov-commenter
Copy link

codecov-commenter commented Jun 25, 2022

Codecov Report

Merging #1749 (9df802d) into master (bb5073f) will decrease coverage by 1.53%.
The diff coverage is 70.48%.

@@             Coverage Diff              @@
##             master    #1749      +/-   ##
============================================
- Coverage     72.08%   70.55%   -1.54%     
- Complexity     5126     5564     +438     
============================================
  Files           473      527      +54     
  Lines         21970    24714    +2744     
  Branches       2351     2680     +329     
============================================
+ Hits          15838    17437    +1599     
- Misses         4925     5943    +1018     
- Partials       1207     1334     +127     
Impacted Files Coverage Δ
api/src/main/java/ai/djl/modality/cv/Image.java 69.23% <ø> (-4.11%) ⬇️
...rc/main/java/ai/djl/modality/cv/MultiBoxPrior.java 76.00% <ø> (ø)
...rc/main/java/ai/djl/modality/cv/output/Joints.java 71.42% <ø> (ø)
.../main/java/ai/djl/modality/cv/output/Landmark.java 100.00% <ø> (ø)
...main/java/ai/djl/modality/cv/output/Rectangle.java 72.41% <0.00%> (ø)
...i/djl/modality/cv/translator/BigGANTranslator.java 21.42% <ø> (-5.24%) ⬇️
...odality/cv/translator/BigGANTranslatorFactory.java 33.33% <0.00%> (+8.33%) ⬆️
...nslator/InstanceSegmentationTranslatorFactory.java 14.28% <0.00%> (-3.90%) ⬇️
.../cv/translator/StyleTransferTranslatorFactory.java 40.00% <ø> (ø)
.../ai/djl/modality/cv/translator/YoloTranslator.java 8.33% <0.00%> (-0.50%) ⬇️
... and 411 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e69f23f...9df802d. Read the comment docs.

@KexinFeng KexinFeng changed the title Add setter with advanced indexing on PyTorch engine Add put feature with linear indexing on PyTorch engine Jun 26, 2022
@KexinFeng KexinFeng changed the title Add put feature with linear indexing on PyTorch engine [WIP] Add put feature with linear indexing on PyTorch engine Jun 26, 2022
@KexinFeng KexinFeng marked this pull request as ready for review June 28, 2022 04:35
@KexinFeng KexinFeng changed the title [WIP] Add put feature with linear indexing on PyTorch engine Add put feature with linear indexing on PyTorch engine Jun 28, 2022
Add NDIndeTest fix NDArray.get(index)

testIndexationUsesSpecificManager add manager checking into PtNDArrayIndexer get(NDArray, NDIndex)

Add :engines:pytorch:pytorch-jni

change at::indexing to torch::indexing; testRuntimeOnly project(":engines:pytorch:pytorch-jni

Restore the get(NDArray, NDIndex)

Torch index type check: long, byte or boolean; restore testPick behaviour; The previous commit: PtNDManager.from() bug fixed.

bug fixed

bug fixed

Update api/src/main/java/ai/djl/ndarray/index/dim/NDIndexNone.java

Co-authored-by: Frank Liu <frankfliu2000@gmail.com>

bug fixed

feed std::vector<> to tensor.index(ArrayRef<>)

code cleaning 2

code cleaning

mixed index getter on pytorch draft
@KexinFeng KexinFeng requested a review from zachgk June 30, 2022 19:21
@KexinFeng KexinFeng merged commit 22cb398 into deepjavalibrary:master Jun 30, 2022
@KexinFeng KexinFeng deleted the pt_torch_setter branch August 25, 2022 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants