Skip to content

fix(python-sdk): log direct experiment URL from evaluate() (#7462)#7593

Open
aiedwardyi wants to merge 2 commits into
comet-ml:mainfrom
aiedwardyi:fix/experiment-url-direct
Open

fix(python-sdk): log direct experiment URL from evaluate() (#7462)#7593
aiedwardyi wants to merge 2 commits into
comet-ml:mainfrom
aiedwardyi:fix/experiment-url-direct

Conversation

@aiedwardyi

@aiedwardyi aiedwardyi commented Jul 23, 2026

Copy link
Copy Markdown

Closes #7462.

evaluate() logged an opaque v1/session/redirect/experiments/... URL that breaks in offline / air-gapped environments. This mirrors the dataset fix (#7440) and builds the direct frontend URL instead:

{domain_root}opik/{workspace}/experiments/{dataset_id}/compare?experiments=[...]

  • get_experiment_url_by_id now takes base_url, workspace and returns the direct URL, matching get_dataset_url_by_id / get_test_suite_url_by_id.
  • Updated the 5 call sites in evaluator.py to pass workspace=client._dereferenced_workspace(). This resolves the default-workspace sentinel, matching how the dataset/project URLs are built - passing raw _workspace would produce a broken link on default workspaces.
  • Added a parametrized unit test mirroring the existing dataset / test-suite cases.

Review fixes applied: 1b7a43d - wrapped the new url-helper lines to the 88-char limit (Baz review).

@aiedwardyi
aiedwardyi requested a review from a team as a code owner July 23, 2026 14:15
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@github-actions github-actions Bot added python Pull requests that update Python code tests Including test files, or tests related like configuration. Python SDK 🟢 size/S labels Jul 23, 2026
Comment thread sdks/python/tests/unit/test_url_helpers.py
Comment thread sdks/python/tests/unit/test_url_helpers.py
Comment thread sdks/python/src/opik/url_helpers.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Python SDK python Pull requests that update Python code 🟢 size/S tests Including test files, or tests related like configuration.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SDK] Fix experiment URL logged by evaluate() to use direct workspace-scoped URL

1 participant