-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[issue-2572] [FE] Update experiment name metadata in UI #3136
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
[issue-2572] [FE] Update experiment name metadata in UI #3136
Conversation
|
Hi @yaricom @Lothiraldan @dsblank @vincentkoc , would like this PR to be reviewd |
|
@riturajFi can you please address the linter and test failures please before team can review. Thanks for your contribution. |
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.
Pull Request Overview
This PR introduces functionality to update experiment names and metadata across all Opik applications. The feature enables users to modify existing experiments through API endpoints, frontend UI, and SDK methods.
Key changes:
- Added API endpoint for updating experiment name and metadata with validation and change detection
- Created interactive frontend dialog with Monaco editor for JSON metadata editing
- Extended both Python and TypeScript SDKs with update methods
Reviewed Changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
apps/opik-backend/src/main/java/com/comet/opik/api/resources/v1/priv/ExperimentsResource.java |
REST endpoint for experiment updates with change detection |
apps/opik-backend/src/main/java/com/comet/opik/domain/ExperimentService.java |
Business logic for planning and applying experiment updates |
apps/opik-backend/src/main/java/com/comet/opik/domain/ExperimentDAO.java |
Database operations for updating experiment name and metadata |
apps/opik-frontend/src/components/shared/UpdateExperimentDialog/UpdateExperimentDialog.tsx |
React dialog component with Monaco editor for experiment editing |
apps/opik-frontend/src/api/datasets/useExperimentUpdate.ts |
Frontend mutation hook for experiment updates |
sdks/python/src/opik/api_objects/opik_client.py |
Python SDK method for updating experiments |
sdks/typescript/src/opik/client/Client.ts |
TypeScript SDK method for updating experiments |
sdks/typescript/tests/experiment/client-experiment.test.ts |
Unit and integration tests for TypeScript SDK |
Files not reviewed (1)
- apps/opik-frontend/package-lock.json: Language not supported
apps/opik-frontend/src/components/shared/UpdateExperimentDialog/UpdateExperimentDialog.tsx
Outdated
Show resolved
Hide resolved
apps/opik-frontend/src/components/shared/UpdateExperimentDialog/UpdateExperimentDialog.tsx
Outdated
Show resolved
Hide resolved
apps/opik-frontend/src/components/pages/ExperimentsPage/ExperimentRowActionsCell.tsx
Outdated
Show resolved
Hide resolved
apps/opik-backend/src/main/java/com/comet/opik/api/resources/v1/priv/ExperimentsResource.java
Outdated
Show resolved
Hide resolved
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.
Hi @riturajFi
Thanks a lot for your contribution.
I left a review on the backend part, with the general guidelines to follow in this service.
The main question here is how to handle the ClickHouse updates, which isn't straight forward and probably one of the reasons why we haven't implemented this ourselves yet.
I'll discuss and double check the approach with the team for that, but for now, the best option is to handle the update with a INSERT + SELECT query (see examples in this DAO already) and document that the endpoint is only meant for the UI and doesn't handle concurrent scenarios for the SDK (already the case).
Other members of the team will review the FE and SDK parts. In the meantime, please remove changes on the auto-generated code.
Thank you very much for all this work!
apps/opik-backend/src/main/java/com/comet/opik/domain/ExperimentDAO.java
Outdated
Show resolved
Hide resolved
apps/opik-backend/src/main/java/com/comet/opik/api/resources/v1/priv/ExperimentsResource.java
Outdated
Show resolved
Hide resolved
apps/opik-backend/src/main/java/com/comet/opik/api/resources/v1/priv/ExperimentsResource.java
Show resolved
Hide resolved
apps/opik-backend/src/main/java/com/comet/opik/api/resources/v1/priv/ExperimentsResource.java
Outdated
Show resolved
Hide resolved
apps/opik-backend/src/main/java/com/comet/opik/api/resources/v1/priv/ExperimentsResource.java
Outdated
Show resolved
Hide resolved
apps/opik-backend/src/main/java/com/comet/opik/domain/ExperimentUpdatePayload.java
Outdated
Show resolved
Hide resolved
apps/opik-backend/src/main/java/com/comet/opik/domain/ExperimentUpdatePayload.java
Show resolved
Hide resolved
apps/opik-backend/src/main/java/com/comet/opik/domain/ExperimentUpdatePlan.java
Outdated
Show resolved
Hide resolved
sdks/typescript/src/opik/rest_api/api/resources/experiments/client/Client.ts
Show resolved
Hide resolved
|
Great insights @andrescrz ! Will do the changes right away! |
andriidudar
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.
Thank you very much for your contribution. I have provided a few comments regarding the frontend implementation for your consideration.
apps/opik-frontend/src/components/pages/ExperimentsPage/ExperimentRowActionsCell.tsx
Outdated
Show resolved
Hide resolved
apps/opik-frontend/src/components/pages/ExperimentsPage/ExperimentRowActionsCell.tsx
Outdated
Show resolved
Hide resolved
apps/opik-frontend/src/components/shared/UpdateExperimentDialog/UpdateExperimentDialog.tsx
Outdated
Show resolved
Hide resolved
apps/opik-frontend/src/components/shared/UpdateExperimentDialog/UpdateExperimentDialog.tsx
Show resolved
Hide resolved
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.
This PR is being reviewed by Cursor Bugbot
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
sdks/typescript/src/opik/rest_api/api/resources/experiments/client/Client.ts
Outdated
Show resolved
Hide resolved
|
Hi @riturajFi We've just added a new experiment update API endpoint which supports your use cases, see: #3263 You don't need to implement that part anymore. You can't simplify this PR and simply use it from the FE (Frontend) and SDK changes. Feel free to rebase the latest changes from Let me know if any question. |
|
@riturajFi are you still interested in working on this issue? |
|
Hi @vincentkoc , i think it was solv3d already?? |
|
Hi @riturajFi, Thank you for your interest in this issue! It’s still open, and we’d be delighted if community contributors like you would like to work on it. The good news is that the backend endpoint has already been implemented. This means you can focus solely on the frontend changes. Please remember to rebase your branch onto the latest main and resolve any conflicts that may arise. If you’re interested in resuming work on this, please let us know—we’d love to see your contribution! Best regards |
|
@riturajFi let me know if you are still open to working on this issue? |
0c1fb3d to
3014e8d
Compare
|
Hi @riturajFi, Thank you for all your work on this PR! I’ll be taking it over from here, including resolving any merge conflicts and addressing the outstanding comments to move it toward completion. No further action is needed from your end. |
7231dfc to
21e416c
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.
Pull Request Overview
Copilot reviewed 10 out of 12 changed files in this pull request and generated 3 comments.
apps/opik-frontend/src/components/pages/ExperimentsPage/ExperimentRowActionsCell.tsx
Show resolved
Hide resolved
apps/opik-frontend/src/components/shared/UpdateExperimentDialog/UpdateExperimentDialog.tsx
Outdated
Show resolved
Hide resolved
apps/opik-frontend/src/components/shared/UpdateExperimentDialog/UpdateExperimentDialog.tsx
Outdated
Show resolved
Hide resolved
b4832c9 to
a6a6f41
Compare
…ve null guard, add TS SDK validation
…ove invalidation to onSuccess, simplify parsing
…uccess and simplified parsing fixes
…nge while dialog is open
- Both Python and TypeScript SDKs now conditionally include only the parameters that are provided - Python SDK uses OMIT sentinel value to exclude unprovided fields - TypeScript SDK builds payload object dynamically - This prevents clearing name when only updating config, and vice versa - Added comprehensive test coverage for all three scenarios: name-only, config-only, and both
- Add ORDER BY last_updated_at DESC LIMIT 1 to ensure the query selects the most recent row - Prevents bug where partial updates could select old historical rows and overwrite current values with ancient data - Add regression test for multiple partial updates to verify latest values are preserved
- Replace hardcoded strings with RandomStringUtils.secure().nextAlphanumeric() - Replace hardcoded JSON metadata with podamFactory.manufacturePojo(JsonNode.class) - Aligns with existing test patterns in ExperimentsResourceTest - Improves test robustness by using unique random values each run
d319408 to
68445fc
Compare
…l/opik into vk/optimizer-bm25-hotpot * 'vk/optimizer-bm25-hotpot' of https://github.com/comet-ml/opik: [NA] [BE] Performant ClickHouse bulk update queries to ensure latest row selection (#4206) [issue-1239] [DOCS] Improve console logging level documentation (#4201) [OPIK-3110] [BE/FE] Add threshold support for trace and thread feedback score alerts (#4168) [NA] [DOCS] Fix Update experiment docs (#4199) [issue-2572] [FE] Update experiment name metadata in UI (#3136) Bump opentelmetry.version from 2.21.0 to 2.22.0 in /apps/opik-backend (#4194) [NA][SDK] Optimizer Benchmarks Modal Timeout (#4197) Bump org.apache.maven.plugins:maven-jar-plugin in /apps/opik-backend (#4190) [OPIK-3116][FE] user friendly error message for duplicate dataset name (#4188) [NA][BE] Cursor rules update for BE java code (#4155) Bump software.amazon.awssdk:bom in /apps/opik-backend (#4192) Bump com.diffplug.spotless:spotless-maven-plugin in /apps/opik-backend (#4193) [NA] [BE] Update model prices file (#4189)
Details
experiment_update_demo.mov
Change checklist
Issues
Testing
Documentation