Skip to content

Problems with CachedEmbeddingWrapper in both documentation and code #2772

@Charbddlie

Description

@Charbddlie

caching-embeddings-to-re-use-them
When model_with_cached_emb is created, we should use

evaluation.run(model_with_cached_emb, ...)

instead of using

evaluation.run(model, ...)

Additionally, on line 243 of cache_wrapper.py, the encode function should be called with the task_name parameter; otherwise, it will raise an error.

new_vectors = self._model.encode(
    uncached_texts, batch_size=batch_size, task_name=task_name, **kwargs
)

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions