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

[api] Allows to use relative jar uri for cache folder name #3026

Merged
merged 1 commit into from
Mar 13, 2024

Conversation

frankfliu
Copy link
Contributor

Fixes: #3025

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 zachgk and a team as code owners March 12, 2024 05:09
@codecov-commenter
Copy link

codecov-commenter commented Mar 12, 2024

Codecov Report

Attention: Patch coverage is 90.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 72.30%. Comparing base (0fa0db2) to head (ed28bc7).

Files Patch % Lines
...src/main/java/ai/djl/repository/JarRepository.java 85.71% 0 Missing and 1 partial ⚠️

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

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #3026   +/-   ##
=========================================
  Coverage     72.30%   72.30%           
- Complexity     7294     7295    +1     
=========================================
  Files           722      722           
  Lines         32508    32512    +4     
  Branches       3395     3396    +1     
=========================================
+ Hits          23506    23509    +3     
- Misses         7382     7385    +3     
+ Partials       1620     1618    -2     

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

String fileName = path.toFile().getName();
if (FilenameUtils.isArchiveFile(fileName)) {
fileName = FilenameUtils.getNamePart(fileName);
}

return new JarRepository(name, uri, fileName, queryString);
return new JarRepository(name, uri, fileName, jarUri);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the name real uri or jarUri? Also, can we document this somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed to realUri and added comments

Copy link
Contributor

@zachgk zachgk left a comment

Choose a reason for hiding this comment

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

The comments helps, but can you also add somewhere in our public docs or at least javadoc that the ?ignore_real_uri=true option exists

@frankfliu frankfliu merged commit 8c5ed49 into deepjavalibrary:master Mar 13, 2024
5 checks passed
@frankfliu frankfliu deleted the jar branch March 13, 2024 18:03
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.

Extracting local model ZIP multiple times
3 participants