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

bug/unable to instantiate HuggingFaceEmbeddingEncoder from unstructured.embed.huggingface #3731

Open
mattseddon opened this issue Oct 18, 2024 · 0 comments · May be fixed by #3730
Open

bug/unable to instantiate HuggingFaceEmbeddingEncoder from unstructured.embed.huggingface #3731

mattseddon opened this issue Oct 18, 2024 · 0 comments · May be fixed by #3730
Labels
bug Something isn't working

Comments

@mattseddon
Copy link

Describe the bug
A clear and concise description of what the bug is.

As of 0.16.0 I am unable to instantiate an instant of HuggingFaceEmbeddingEncoder from unstructured.embed.huggingface due to a missing abstract method (initialize)

To Reproduce
Provide a code snippet that reproduces the issue.

from unstructured.embed.huggingface import (
    HuggingFaceEmbeddingConfig,
    HuggingFaceEmbeddingEncoder,
)

embedding_encoder = HuggingFaceEmbeddingEncoder(config=HuggingFaceEmbeddingConfig())

Returns TypeError: Can't instantiate abstract class HuggingFaceEmbeddingEncoder without an implementation for abstract method 'initialize'

For full example see: https://github.com/iterative/datachain/blob/main/examples/llm_and_nlp/unstructured-embeddings-gen.py

Expected behavior
A clear and concise description of what you expected to happen.

No error

Screenshots
If applicable, add screenshots to help explain your problem.

N/A

Environment Info
Please run python scripts/collect_env.py and paste the output here.
This will help us understand more about the environment in which the bug occurred.

I have seen this across Windows, Linux and Mac (https://github.com/iterative/datachain/actions/runs/11395986364)

Additional context
Add any other context about the problem here.

I opened to #3730 close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant