Raphtory
Raphtory copied to clipboard
make EmbeddingFunction return a result instead of panicking
What changes were proposed in this pull request?
The EmbeddingFunction was changed to return a Result to be able to bubble up errors instead of panicking. These changes were propagated all the way up.
Why are the changes needed?
This means the GraphQL server can now successfully load even with a failing embedding function. All the vector APIs won't be available for the graphs whose vectorisation failed, but everything else should work normally.
Does this PR introduce any user-facing change? If yes is this documented?
No, it doesn't
How was this patch tested?
A test was added starting up a server with an embedding function provided that returns always an Err
Issues
Fixes #1805
Are there any further changes required?
No