Skip to content

Conversation

@riturajFi
Copy link
Contributor

@riturajFi riturajFi commented Aug 29, 2025

Details

  • Added support for updating experiment name & config.
  • Integrated the feature into the:
    • Front-end
    • Python SDK
    • TypeScript SDK
  • Leveraging the existing Update Experiment backend endpoint.
    • Fixed critical bug in this endpoint
experiment_update_demo.mov

Change checklist

  • User facing
  • Documentation update

Issues

Testing

  • Manually tested all FE changes locally.
  • Manually tested all SDKs Python and TypeScript locally.
  • Added test coverage for both SDKs.
  • Manually tested BE fix.
  • Added test coverage to BE fix.
  • Manually reviewed the new documentation.

Documentation

  • Documented both SDKs and FE new update experiment name and config functionality.

@riturajFi riturajFi requested a review from a team as a code owner August 29, 2025 06:24
@riturajFi riturajFi marked this pull request as draft August 29, 2025 06:29
@riturajFi riturajFi marked this pull request as ready for review September 1, 2025 17:19
@riturajFi
Copy link
Contributor Author

Hi @yaricom @Lothiraldan @dsblank @vincentkoc , would like this PR to be reviewd

@vincentkoc vincentkoc requested a review from Copilot September 2, 2025 03:49
@vincentkoc
Copy link
Member

@riturajFi can you please address the linter and test failures please before team can review. Thanks for your contribution.

@vincentkoc vincentkoc changed the title Feature/update experiment name metadata [issue-2572] [FE] Update experiment name metadata in UI Sep 2, 2025
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 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

Copy link
Member

@andrescrz andrescrz left a 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!

@riturajFi
Copy link
Contributor Author

Great insights @andrescrz ! Will do the changes right away!

Copy link
Contributor

@andriidudar andriidudar left a 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.

Copy link

@cursor cursor bot left a 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.

@andrescrz
Copy link
Member

andrescrz commented Sep 30, 2025

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 main branch, resolve the conflicts and resume this implementation.

Let me know if any question.
Regards,
Andrés

@vincentkoc
Copy link
Member

@riturajFi are you still interested in working on this issue?

@riturajFi
Copy link
Contributor Author

Hi @vincentkoc , i think it was solv3d already??

@andrescrz
Copy link
Member

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

@vincentkoc
Copy link
Member

@riturajFi let me know if you are still open to working on this issue?

@andrescrz andrescrz force-pushed the feature/update-experiment-name-metadata branch from 0c1fb3d to 3014e8d Compare November 19, 2025 16:56
@andrescrz
Copy link
Member

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.
Really appreciate your contribution!

@andrescrz andrescrz force-pushed the feature/update-experiment-name-metadata branch 4 times, most recently from 7231dfc to 21e416c Compare November 20, 2025 12:12
@andrescrz andrescrz requested a review from a team as a code owner November 20, 2025 12:12
@andrescrz andrescrz requested a review from Copilot November 20, 2025 12:22
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 10 out of 12 changed files in this pull request and generated 3 comments.

@andrescrz andrescrz force-pushed the feature/update-experiment-name-metadata branch from b4832c9 to a6a6f41 Compare November 20, 2025 13:55
@andrescrz andrescrz requested a review from Copilot November 20, 2025 13:56
…ove invalidation to onSuccess, simplify parsing
- 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
@andrescrz andrescrz force-pushed the feature/update-experiment-name-metadata branch from d319408 to 68445fc Compare November 21, 2025 15:51
@andrescrz andrescrz added Bug Something isn't working documentation Improvements or additions to documentation Feature Request New feature or request python Pull requests that update Python code java Pull requests that update Java code javascript Pull requests that update Javascript code Python SDK Frontend Backend Typescript SDK JS SDK labels Nov 21, 2025
@andrescrz andrescrz merged commit d52b4ac into comet-ml:main Nov 24, 2025
58 of 146 checks passed
vincentkoc added a commit that referenced this pull request Nov 25, 2025
…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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backend Bug Something isn't working documentation Improvements or additions to documentation Feature Request New feature or request Frontend java Pull requests that update Java code javascript Pull requests that update Javascript code JS SDK Python SDK python Pull requests that update Python code test-environment Deploy Opik adhoc environment Typescript SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FR]: Add support for updating experiments

4 participants