8000 [OPIK-1799] [FE] Add support for filtering by config (metadata) to experiments by andriidudar · Pull Request #2411 · comet-ml/opik · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[OPIK-1799] [FE] Add support for filtering by config (metadata) to experiments #2411

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

Merged
merged 2 commits into from
Jun 9, 2025

Conversation

andriidudar
Copy link
Contributor

Details

image
image
image
image

Issues

Resolves #

Testing

Documentation

@andriidudar andriidudar requested a review from a team as a code owner June 6, 2025 14:19
Copy link
Contributor
@Copilot 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

Adds the ability to filter experiments by arbitrary metadata fields (“configuration”) alongside dataset filters, replacing the old one-off dataset filter button with a generic FiltersButton and wiring filters through data hooks and pages.

  • Introduce FilterRowConfig and make columns “disposable” so they can only be used once per filter.
  • Update useExperimentsList/useGroupedExperimentsList to accept filters and send them to the API.
  • Replace old ExperimentsFiltersButton with a configurable FiltersButton, new helper components (DatasetSelectBox, ExperimentsPathsAutocomplete), and page wiring for Experiments, ExperimentsTab, and OptimizationsPage.

Reviewed Changes

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

Show a summary per file
File Description
apps/opik-frontend/src/types/shared.ts Added COLUMN_DATASET_ID and a disposable flag on ColumnData.
apps/opik-frontend/src/types/filters.ts Defined FilterRowConfig and updated imports.
apps/opik-frontend/src/api/datasets/useExperimentsList.ts Accept and process filters in experiment list API calls.
apps/opik-frontend/src/hooks/useGroupedExperimentsList.ts Propagate filters into grouped experiments hook.
apps/opik-frontend/src/components/shared/FiltersButton/* Generic filter UI (FiltersButton, FilterRow, ColumnSelector,
StringRow, DictionaryRow).
apps/opik-frontend/src/components/pages-shared/experiments/* New ExperimentsPathsAutocomplete, DatasetSelectBox components.
apps/opik-frontend/src/components/pages/PromptPage/ExperimentsTab/ExperimentsTab.tsx Replace old filter UI with new FiltersButton and metadata column.
apps/opik-frontend/src/components/pages/OptimizationsPage/OptimizationsPage.tsx Wire filters into optimizations list.
apps/opik-frontend/src/components/pages/ExperimentsPage/ExperimentsPage.tsx Wire filters into main experiments page.
Comments suppressed due to low confidence (3)

apps/opik-frontend/src/components/pages-shared/experiments/ExperimentsPathsAutocomplete/ExperimentsPathsAutocomplete.tsx:1

  • [nitpick] This new ExperimentsPathsAutocomplete component does not have accompanying unit or integration tests. Consider adding tests to cover its path extraction and filtering logic.
import React, { useMemo } from "react";

apps/opik-frontend/src/components/pages/OptimizationsPage/OptimizationsPage.tsx:160

  • You're using JsonParam here but it hasn't been imported. Add import { JsonParam } from 'use-query-params' (or your project’s equivalent) so this compiles.
const [filters = [], setFilters] = useQueryParam("filters", JsonParam, {

apps/opik-frontend/src/components/pages/ExperimentsPage/ExperimentsPage.tsx:213

  • You're using JsonParam here but it hasn't been imported. Add import { JsonParam } from 'use-query-params' (or your project’s equivalent) so this compiles.
const [filters = [], setFilters] = useQueryParam("filters", JsonParam, {

8000
Copy link
Collaborator
@aadereiko aadereiko left a comment

Choose a reason for hiding this comment

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

I checked the code, looks good, thanks!

@andriidudar andriidudar merged commit fdffb78 into main Jun 9, 2025
5 checks passed
@andriidudar andriidudar deleted the andriidudar/OPIK-1799-experiments-filtering branch June 9, 2025 07:41
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.

2 participants
0