Replies: 1 comment
-
Hi Jonas, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When initialising models we sometimes don't have access to the web. Having the download_model funktion inside a class
__init__()
creates a big firewall dependency for all people working on premise or behind a firewall.Being able to point directly to a local folder or any on prem repository where the model objects are hosted, is essential for the usage of this library in a generel production setting.
I propose a change in all model classes
__init__()
methods, that separates the generelself.model_path
(or several paths) attribute from thedownload_model()
function.Right now the
BertBase
init method looks like this.We could instead do something like this.
Or maybe more comprehensive change that changes the API to init the model class without downloading or setting path, and then call the download method on the instance as a way for the user to setup/load the model before usage.
Another idea would be to write a class called ModelStorage and use that class to specify where the models are located or whether they should be downloaded before loading the model classes.
Beta Was this translation helpful? Give feedback.
All reactions