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

Skip to content

Conversation

@GabrielBianconi
Copy link
Member

@GabrielBianconi GabrielBianconi commented Dec 12, 2025

CleanShot 2025-12-11 at 20 21 58@2x

Important

Enhances dataset builder UI to create datasets from inferences with advanced filtering and adds backend support for these features.

  • UI Enhancements:
    • Adds DatasetBuilderForm to create datasets from inferences with filters like function, variant, episode ID, and search query.
    • Introduces VariantSelector for selecting function variants.
    • Updates OutputSourceSelector to choose output source for dataset creation.
    • Adds inference count feedback in DatasetBuilderForm using useInferenceCountFetcher.
  • Backend Changes:
    • Adds countInferences API endpoint to count inferences matching query parameters.
    • Updates createDatapointsFromInferences to support new filtering options.
    • Modifies TensorZeroClient to interact with new API endpoints.
  • Testing:
    • Adds e2e tests in datasets.builder.spec.ts for dataset creation with various filters.
    • Adds e2e tests in observability.inferences.filter.spec.ts for inference filtering UI.

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

Copilot AI review requested due to automatic review settings December 12, 2025 00:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR restructures the dataset builder in the UI to use the new /v1/datasets/{dataset_name}/from_inferences API endpoint. The changes consolidate filtering parameters, deprecate old API types, and expand the dataset builder UI to include inference filtering capabilities.

Key Changes:

  • Renamed filter to filters across the codebase for API consistency
  • Restructured the CreateDatapointsFromInferenceRequest API to flatten the ListInferencesRequest parameters into the InferenceQuery variant
  • Consolidated CreateDatapointsFromInferenceOutputSource into the existing InferenceOutputSource enum

Reviewed changes

Copilot reviewed 33 out of 33 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
ui/e2e_tests/observability.inferences.filter.spec.ts Updated test to use getByLabel instead of getByPlaceholder for finding the Episode ID input
ui/app/utils/tensorzero/tensorzero.ts Added createDatapointsFromInferences client method and inlined EvaluationRunStatsResponse type definition
ui/app/utils/clickhouse/inference.server.ts Renamed parameter from filter to filters for consistency
ui/app/routes/observability/inferences/route.tsx Renamed URL parameter and loader data from filter to filters
ui/app/routes/observability/inferences/InferencesTable.tsx Updated component to use filters prop and added htmlFor attributes for accessibility
ui/app/routes/datasets/builder/types.ts Replaced metric-based filtering with inference filtering parameters (variant_name, episode_id, search_query, filters)
ui/app/routes/datasets/builder/route.tsx Restructured to use the new createDatapointsFromInferences API with inference_query type
ui/app/routes/datasets/builder/OutputSourceSelector.tsx Removed demonstration count fetching and UI complexity
ui/app/routes/datasets/builder/DatasetCountDisplay.tsx Deleted file - count display is no longer needed with the new API
ui/app/routes/datasets/builder/DatasetBuilderForm.tsx Expanded UI to include variant, episode ID, search query, and advanced filter builder inputs
ui/app/routes/api/datasets/count_inserts.route.ts Deleted file - row counting endpoint is no longer needed
ui/app/routes.ts Removed the count_inserts route
tensorzero-core/tests/e2e/endpoints/datasets/create_from_inferences.rs Updated tests to use the new flattened ListInferencesRequest structure
tensorzero-core/tests/e2e/endpoints/datasets/clone_datapoints.rs Updated imports and removed usage of deprecated CreateDatapointsFromInferenceOutputSource
tensorzero-core/src/stored_inference.rs Changed into_datapoint_insert to use InferenceOutputSource instead of CreateDatapointsFromInferenceOutputSource
tensorzero-core/src/endpoints/stored_inferences/v1/types.rs Added filters field and deprecated filter field with backward compatibility handling
tensorzero-core/src/endpoints/datasets/v1/types.rs Removed CreateDatapointsFromInferenceOutputSource, restructured request to flatten ListInferencesRequest
tensorzero-core/src/endpoints/datasets/v1/create_from_inferences.rs Refactored to use flattened ListInferencesRequest and InferenceOutputSource
tensorzero-core/src/endpoints/datasets/legacy.rs Renamed handler and added deprecation warning for the legacy endpoint
tensorzero-core/src/db/inferences.rs Added None variant to InferenceOutputSource enum
tensorzero-core/src/db/clickhouse/inference_queries.rs Updated query generation to handle InferenceOutputSource::None
internal/tensorzero-node/lib/bindings/index.ts Removed export of deprecated CreateDatapointsFromInferenceOutputSource
internal/tensorzero-node/lib/bindings/ListInferencesRequest.ts Renamed filter field to filters
internal/tensorzero-node/lib/bindings/InferenceOutputSource.ts Added "none" as a possible value
internal/tensorzero-node/lib/bindings/CreateDatapointsFromInferenceRequestParams.ts Flattened ListInferencesRequest fields into the InferenceQuery variant
internal/tensorzero-node/lib/bindings/CreateDatapointsFromInferenceRequest.ts Restructured to flatten parameters and move output_source into variant-specific fields
internal/tensorzero-node/lib/bindings/CreateDatapointsFromInferenceOutputSource.ts Deleted file - type consolidated into InferenceOutputSource
gateway/src/routes/internal.rs Updated to use renamed deprecated_create_datapoints_from_inferences_handler
clients/rust/tests/test_stored_inferences.rs Renamed filter to filters in test
clients/rust/tests/test_datasets.rs Updated to use flattened ListInferencesRequest structure
clients/rust/src/lib.rs Removed CreateDatapointsFromInferenceOutputSource export and output_source parameter from method signature
clients/python/tensorzero/generated_types.py Updated Python type definitions to match new API structure
clients/python/src/lib.rs Removed output_source parameter from Python client method signatures

Copilot AI review requested due to automatic review settings December 12, 2025 01:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 35 out of 35 changed files in this pull request and generated 2 comments.

Copilot AI review requested due to automatic review settings December 12, 2025 19:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 36 out of 36 changed files in this pull request and generated 4 comments.

Copilot AI review requested due to automatic review settings December 12, 2025 20:10
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 38 out of 38 changed files in this pull request and generated 2 comments.

Copilot AI review requested due to automatic review settings December 16, 2025 14:55
@GabrielBianconi
Copy link
Member Author

@codex review

@GabrielBianconi
Copy link
Member Author

/merge-queue

@github-actions
Copy link
Contributor

🚀 Merge queue workflow triggered!

View the run: https://github.com/tensorzero/tensorzero/actions/runs/20273251484

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

@GabrielBianconi GabrielBianconi marked this pull request as ready for review December 16, 2025 16:23
Copilot AI review requested due to automatic review settings December 16, 2025 16:23
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 46 out of 46 changed files in this pull request and generated 2 comments.

Copy link
Member

@virajmehta virajmehta left a comment

Choose a reason for hiding this comment

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

generally l think this LGTM; the copilot nit is something we should fix though.

@virajmehta virajmehta enabled auto-merge December 17, 2025 18:42
@virajmehta virajmehta added this pull request to the merge queue Dec 17, 2025
@Aaron1011 Aaron1011 removed this pull request from the merge queue due to a manual request Dec 17, 2025
@Aaron1011 Aaron1011 added this pull request to the merge queue Dec 17, 2025
Merged via the queue into main with commit d13a0f3 Dec 17, 2025
54 checks passed
@Aaron1011 Aaron1011 deleted the gb/dataset-builder branch December 17, 2025 20:02
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.

InferenceFilterBuilder should use a dropdown instead for text input for variants

4 participants