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

avoid download on import #201

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

bogdan-galileo
Copy link

What

Prevent downloading the mobilenetV3 model at import time.

Why

It creates an extra log that can be disturbing when integrating the repo in applications
Screenshot 2023-07-26 at 3 25 33 PM

How

Set the default argument to None, and evaluate and download the model within the __init__ method only (since default args are evaluated at import time but the code in __init__ is not run)

See Issue: #200

@tanujjain
Copy link
Collaborator

Could you also update the relevant test cases please?

@bogdan-galileo
Copy link
Author

Thanks @tanujjain. All tests are passing on my side, I added an extra test to check that the model is not downloaded at import time.

@papayalove
Copy link

please merge this branch to Master!

@bogdan-galileo
Copy link
Author

@tanujjain any thoughts ? I added a new test and they were all passing on my side!

@bogdan-galileo
Copy link
Author

@tanujjain can we merge ?

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