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

Supports PyTorch stream imperative model load #2981

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

zachgk
Copy link
Contributor

@zachgk zachgk commented Feb 6, 2024

This adds support for PyTorch InputStream model load when using imperative models. Before, it would assume symbolic without actually checking. In those cases, it would throw an engine exception. Now, that option is working and tested.

This adds support for PyTorch InputStream model load when using imperative
models. Before, it would assume symbolic without actually checking. In those
cases, it would throw an engine exception. Now, that option is working and
tested.
@zachgk zachgk requested review from frankfliu and a team as code owners February 6, 2024 19:40
@codecov-commenter
Copy link

Codecov Report

Attention: 1330 lines in your changes are missing coverage. Please review.

Comparison is base (bb5073f) 72.08% compared to head (681af48) 72.10%.
Report is 986 commits behind head on master.

Files Patch % Lines
...va/ai/djl/modality/nlp/generate/TextGenerator.java 2.81% 276 Missing ⚠️
.../java/ai/djl/modality/nlp/generate/SeqBatcher.java 0.75% 132 Missing ⚠️
...ity/nlp/generate/ContrastiveSeqBatchScheduler.java 2.97% 98 Missing ⚠️
...i/djl/modality/nlp/generate/SeqBatchScheduler.java 9.83% 55 Missing ⚠️
.../java/ai/djl/modality/cv/BufferedImageFactory.java 40.96% 47 Missing and 2 partials ⚠️
...a/ai/djl/modality/nlp/generate/StepGeneration.java 2.04% 48 Missing ⚠️
api/src/main/java/ai/djl/ndarray/NDArray.java 43.42% 39 Missing and 4 partials ⚠️
...n/java/ai/djl/modality/cv/output/CategoryMask.java 22.00% 39 Missing ⚠️
...i/src/main/java/ai/djl/ndarray/NDArrayAdapter.java 71.21% 31 Missing and 7 partials ⚠️
.../cv/translator/SemanticSegmentationTranslator.java 37.50% 35 Missing ⚠️
... and 73 more

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2981      +/-   ##
============================================
+ Coverage     72.08%   72.10%   +0.02%     
- Complexity     5126     7273    +2147     
============================================
  Files           473      722     +249     
  Lines         21970    32517   +10547     
  Branches       2351     3393    +1042     
============================================
+ Hits          15838    23448    +7610     
- Misses         4925     7446    +2521     
- Partials       1207     1623     +416     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zachgk zachgk merged commit f457f66 into deepjavalibrary:master Feb 7, 2024
5 checks passed
@zachgk zachgk deleted the ptLoad branch February 7, 2024 19:44
frankfliu pushed a commit that referenced this pull request Apr 26, 2024
This adds support for PyTorch InputStream model load when using imperative
models. Before, it would assume symbolic without actually checking. In those
cases, it would throw an engine exception. Now, that option is working and
tested.
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