Replies: 3 comments
-
Well, there is no reason for the same class and instance attribute, but class instantiation will indeed not work from the python side as of now as there is no contractor that is defined in Rust for this python class. This can be added but would this be necessary? Because the idea is to generate the embeddings using the dedicated embedding methods to get the output as EmbedData. |
Beta Was this translation helpful? Give feedback.
-
Hi @pramodith , there are dedicated functions to generate embeddings from sources in python, like embed_file, embed_query. Because all the methods to actually generate the embeddings are in rust, you can access them through these dedicated functions. And the pyi file is a stub file, it's just for docs. It's just like an interface. Because we used pyo3 bindings. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the context folks, closing the issue since you've clarified my confusion. |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
The EmbedData class has the same class and instance attributes, its not clear to me if there's a reason behind this further more trying to create an instance of the class throws an error.
https://github.com/StarlightSearch/EmbedAnything/blob/edf3086852d6dd003fac56ff9de09adfde57af13/python/python/embed_anything/_embed_anything.pyi#L308C1-L324C1
To Reproduce
raises the error:
TypeError: No constructor defined for EmbedData
Expected behavior
An instance of EmbedData is created.
Screenshots
Beta Was this translation helpful? Give feedback.
All reactions