Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@virajmehta
Copy link
Member

@virajmehta virajmehta commented Dec 12, 2025

listInferencesWithPagination is very flexible but not efficient. In cases where we can avoid using it by leveraging existing indices we should do so. This PR adds two routes GET /internal/inference_metadata and GET /internal/episode_inferences and uses them in the function & variant pages, the inference list when not using complex filtering or search, and the episode route for the episode page.


Important

This PR improves UI ClickHouse query efficiency by adding new routes and handlers for inference metadata, updating frontend components to use these routes, and implementing cursor-based pagination.

  • Backend:
    • Adds GET /internal/inference_metadata and GET /internal/episode_inferences routes in internal.rs.
    • Implements list_inference_metadata in inference_queries.rs to query inference metadata efficiently.
    • Adds InferenceMetadata and ListInferenceMetadataParams structs in inferences.rs.
    • Adds get_inference_metadata_handler in inference_metadata.rs to handle new route.
  • Frontend:
    • Updates FunctionInferenceTable.tsx, VariantInferenceTable.tsx, and InferencesTable.tsx to use InferenceMetadata.
    • Modifies route.tsx files in function and variant directories to use listInferenceMetadata for fetching data.
    • Implements pagination logic in pagination.ts for cursor-based navigation.
  • Tests:
    • Adds E2E tests in inference_metadata.rs to verify new endpoint functionality.
  • Misc:
    • Updates package.json version to 2025.12.2.

This description was created by Ellipsis for f00545d. You can customize this summary. It will automatically update as commits are pushed.

Copy link
Member

@shuyangli shuyangli left a comment

Choose a reason for hiding this comment

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

list_inference_metadata looks good; on the frontend one comment about pagination. I'm skeptical of list_episode_inferences - i think worth checking if it actually makes things better.

@shuyangli shuyangli removed their assignment Dec 12, 2025
@shuyangli shuyangli added this pull request to the merge queue Dec 12, 2025
Merged via the queue into main with commit 7add882 Dec 12, 2025
55 checks passed
@shuyangli shuyangli deleted the viraj/fix-inference-metadata-table branch December 12, 2025 16:50
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.

3 participants