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 nested IValue list and tuple support #1208

Merged
merged 1 commit into from
Sep 8, 2021

Conversation

frankfliu
Copy link
Contributor

Change-Id: I41761821f2a605b2c69be95cff109b0761ba4990

Description

Brief description of what this PR is about

  • If this change is a backward incompatible change, why must this change be made?
  • Interesting edge cases to note here

@frankfliu frankfliu requested review from stu1130 and zachgk September 8, 2021 03:23
@codecov-commenter
Copy link

codecov-commenter commented Sep 8, 2021

Codecov Report

Merging #1208 (54cc1ff) into master (df1a805) will increase coverage by 0.09%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1208      +/-   ##
============================================
+ Coverage     70.51%   70.60%   +0.09%     
- Complexity     5006     5016      +10     
============================================
  Files           476      476              
  Lines         21960    21964       +4     
  Branches       2320     2320              
============================================
+ Hits          15484    15508      +24     
+ Misses         5276     5255      -21     
- Partials       1200     1201       +1     
Impacted Files Coverage Δ
...c/main/java/ai/djl/pytorch/jni/PyTorchLibrary.java 100.00% <ø> (ø)
...ngine/src/main/java/ai/djl/pytorch/jni/IValue.java 95.09% <100.00%> (+19.58%) ⬆️
api/src/main/java/ai/djl/repository/Artifact.java 87.80% <0.00%> (-1.63%) ⬇️
api/src/main/java/ai/djl/inference/Predictor.java 90.38% <0.00%> (+2.88%) ⬆️

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 df1a805...54cc1ff. Read the comment docs.

API_BEGIN()
jsize len = env->GetArrayLength(jvalues);
jlong* jptrs = env->GetLongArrayElements(jvalues, JNI_FALSE);
std::vector<at::IValue> elements;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: torch::IValue

Change-Id: I41761821f2a605b2c69be95cff109b0761ba4990
@frankfliu frankfliu merged commit e3a64c6 into deepjavalibrary:master Sep 8, 2021
@frankfliu frankfliu deleted the pt branch September 8, 2021 05:36
frankfliu added a commit that referenced this pull request Sep 8, 2021
Change-Id: I41761821f2a605b2c69be95cff109b0761ba4990
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