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

NameError: name 'disabled_tqdm' is not defined #121

Open
marybloodyzz opened this issue Jul 8, 2024 · 1 comment
Open

NameError: name 'disabled_tqdm' is not defined #121

marybloodyzz opened this issue Jul 8, 2024 · 1 comment

Comments

@marybloodyzz
Copy link

As the title, has anyone got similar issue?
Traceback (most recent call last):
File "/data//instructor-embedding/clustering.py", line 3, in
model = Instructor('hkunlp/instructor-large')
File "/home/miniconda3/envs/instructor/lib/python3.10/site-packages/sentence_transformers/SentenceTransformer.py", line 95, in init
modules = self._load_sbert_model(model_path)
File "/data/instructor-embedding/InstructorEmbedding/instructor.py", line 530, in _load_sbert_model
"tqdm_class": disabled_tqdm,
NameError: name 'disabled_tqdm' is not defined

FYI:
def _load_sbert_model(self, model_path, token = None, cache_folder = None, revision = None, trust_remote_code = False):
"""
Loads a full sentence-transformers model
"""
# Taken mostly from: https://github.com/UKPLab/sentence-transformers/blob/66e0ee30843dd411c64f37f65447bb38c7bf857a/sentence_transformers/util.py#L544
download_kwargs = {
"repo_id": model_path,
"revision": revision,
"library_name": "sentence-transformers",
"token": token,
"cache_dir": cache_folder,
"tqdm_class": disabled_tqdm, (NameError: name 'disabled_tqdm' is not defined)
}

@altria-zewei-wang
Copy link

altria-zewei-wang commented Jul 9, 2024

Facing same problem, fixed with installing sentence transformer 2.3.0 (idk if there will be any other side effect tho)

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

No branches or pull requests

2 participants