-
Notifications
You must be signed in to change notification settings - Fork 763
Port "curated inference" clickhouse queries to gateway #5067
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
Conversation
ee04630 to
2142e36
Compare
2142e36 to
882cf32
Compare
8c21dbb to
453c08a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Merge activity
|
453c08a to
45fa9d4
Compare
45fa9d4 to
fb950c4
Compare
|
Ready for review, failing test is flaky and is being fixed at head |
|
/merge-queue |
|
🚀 Merge queue workflow triggered! View the run: https://github.com/tensorzero/tensorzero/actions/runs/20087632451 |
virajmehta
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
blind
* Port inference curation clickhouse queries to Rust Unify * Rewrite tests for e2e fixtures
* Port inference curation clickhouse queries to Rust Unify * Rewrite tests for e2e fixtures
The frontend "curated inference" queries are actually counting inferences with some specific metric/feedback criteria, so I put them all in
InferenceStats.This adds a new
GET /internal/functions/{function_name}/inference-stats/{metric_name}route to the gateway to allow querying the number of feedback metrics and the number of inferences matching the metric, and changes the frontend to call this route instead.Fixes #5064
A step towards #5062
Important
Adds a new API endpoint to fetch inference statistics with feedback metrics, updates backend logic, and refactors frontend to use the new endpoint.
GET /internal/functions/{function_name}/inference-stats/{metric_name}route ininternal.rsfor fetching inference stats with feedback metrics.get_inference_with_feedback_stats_handler()ininference_stats.rsto handle the new route.InferenceWithFeedbackStatsResponsetype inInferenceWithFeedbackStatsResponse.ts.build_count_metric_feedbacks_query()andbuild_count_demonstration_feedbacks_query()ininference_stats.rsfor querying feedback metrics.ClickHouseConnectionInfoto implementInferenceStatsQueriestrait for feedback metrics.count.route.tsto usegetInferenceStats()andgetFeedbackStats()fromtensorzero.server.curation.server.ts.inference_stats.rsfor new API endpoints.tensorzero.test.tsto cover new client methods.This description was created by
for 6e1a010. You can customize this summary. It will automatically update as commits are pushed.