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

[FEATURE] Add metod to Criteria to check whether the model was downloaded or not #3397

Closed
InAnYan opened this issue Aug 7, 2024 · 1 comment · Fixed by #3403
Closed

[FEATURE] Add metod to Criteria to check whether the model was downloaded or not #3397

InAnYan opened this issue Aug 7, 2024 · 1 comment · Fixed by #3403
Labels
enhancement New feature or request

Comments

@InAnYan
Copy link

InAnYan commented Aug 7, 2024

Description

Criteria.loadModel method won't tell whether:

  1. The model wasn't downloaded, and it will be downloaded right away.
  2. The model was already downloaded, so no Internet connection will be created, and DJL will reuse existing files.

For the first case in the real app, it would be useful for users to make a background task saying "Downloading model...", however for the second case no need to tell users about anything.

But because with Criteria.loadModel we can't distinguish anything, the user is constantly prompted "Downloading model...", while it's possible that it was already downloaded.

I propose to add a method like Criteria.checkIfModelWasDownloaded, to distinguish these two cases.

Will this change the current api? How?

This feature probably will introduce only one new method, so no breaking changes 😄

Who will benefit from this enhancement?

Users of you library, who develop applications for non-computer-science-background users

References

@InAnYan
Copy link
Author

InAnYan commented Aug 14, 2024

@frankfliu Thank you! Will try to use it as soon as possible!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant