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

make EmbeddingFunction return a result instead of panicking #1806

Merged
merged 4 commits into from
Oct 4, 2024

Conversation

ricopinazo
Copy link
Contributor

@ricopinazo ricopinazo commented Oct 3, 2024

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

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Rust Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 4cf305d Previous: 41282d0 Ratio
lotr_graph_window_100/has_node_existing 42 ns/iter (± 8) 20 ns/iter (± 0) 2.10

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Collaborator

@miratepuffin miratepuffin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@miratepuffin miratepuffin merged commit 0ef05ae into master Oct 4, 2024
19 checks passed
@miratepuffin miratepuffin deleted the fix/embedding-panic branch October 4, 2024 13:38
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

Successfully merging this pull request may close these issues.

Make the graphql server skip the embedding step if the embedding function fails
2 participants