-
Notifications
You must be signed in to change notification settings - Fork 894
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
Am I properly using stanza offline (coref English model - Electra Large)? #1399
Comments
Thanks, this is a good observation. So what I'm hearing is that we need some way to pass
|
Yes. I don't know how feasible it'd be to pass specific transformers configurations to the stanza pipeline config dictionary the user defines. This may be too much, but at least in terms of an offline mode, the An alternative is just to pass the local path to the |
Are you comfortable using branches? We made the Only caveat is the coref model is changed now, to one which detects singletons and uses xlm-roberta as the base model. |
Fixed on dev? #1408 |
Thanks, yeah I'm comfortable using branches. I'll test it on the dev branch and try to report back asap. |
Hopefully can call this fixed? The code is now part of 1.9.0 |
I'm currently attempting to run a pipeline I had built on my local machine with stanza on an HPC with no access to the huggingface hub or the stanza server. To bypass this, I downloaded all of the models I needed and set the
download_method
toNone
. While this seemed to work with most processors in English, the coreference processor bypassed the local files and kept trying to download the google/electra-large model.After setting environment variables such as
HF_HUB_CACHE
to the corresponding path where the HF cache has been stored in the HPC andHF_HUB_OFFLINE='1'
, the huggingface pretrained method from the in the models coref directory kept attempting to download files. I found out that to avoid any downloads, the parameterlocal_files_only
in thefrom_pretrained
method must be set to True (I tested this locally with no internet connection).Unless I'm missing something, with the current setup I don't see how I can pass this parameter to the pre_trained methods in the ~bert.py script without explicitly doing so in the script as the config object used is not the same stanza config dictionary I defined. It seems to me that the config object that it's read in the script is fetched from the model .pt file using the
torch.load
method, which of course means the config won't contain thelocal_files_only
parameter.Am I missing something or is this an expected functionality?
The text was updated successfully, but these errors were encountered: