Help with error message "Could not locate the configuration.py inside Alibaba-NLP/new-impl."

#6
by azhang01 - opened

Hi:

I would very much like to install gte-base-en-v1.5 to a local machine (which does not have internet connection outside the firewall). I was able to download all the files to another machine (which has internet connection), and copied the files to the firewalled machine.

I then executed the following lines of code (just to load the model):

from sentence_transformers import SentenceTransformer, util
transf = '/home/llm/gte_base_en_1.5_saved'
sentence_encoder = SentenceTransformer(transf, local_files_only=True, trust_remote_code=True)  # does not work
print(f'max_seq_length = {sentence_encoder.max_seq_length}')

I got the following error message:

Could not locate the configuration.py inside Alibaba-NLP/new-impl.
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/transformers/utils/hub.py", line 399, in cached_file
    resolved_file = hf_hub_download(
  File "/usr/local/lib/python3.9/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/huggingface_hub/file_download.py", line 1221, in hf_hub_download
    return _hf_hub_download_to_cache_dir(
  File "/usr/local/lib/python3.9/site-packages/huggingface_hub/file_download.py", line 1325, in _hf_hub_download_to_cache_dir
    _raise_on_head_call_error(head_call_error, force_download, local_files_only)
  File "/usr/local/lib/python3.9/site-packages/huggingface_hub/file_download.py", line 1817, in _raise_on_head_call_error
    raise LocalEntryNotFoundError(
huggingface_hub.utils._errors.LocalEntryNotFoundError: Cannot find the requested files in the disk cache and outgoing traffic has been disabled. To enable hf.co look-ups and downloads online, set 'local_files_only' to False.

Could you point me to the right direction to solve the above issue? Where is the Alibaba-NLP/new-impl directory (or where should it be) on the firewalled machine?

Thanks very much!
Alex.

I solved the above problem ... see another thread https://huggingface.co/Alibaba-NLP/new-impl/discussions/2
I downloaded configuration.py and modeling.py to the same directory '/home/llm/gte_base_en_1.5_saved', then replaced the "auto-map" section in the configuration.py file based on the comment by izhx.
Thanks!

Sign up or log in to comment