Skip to content
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

[Bug fix]: Human evaluation UI breaks when a variant has been deleted #1872

Conversation

aybruhm
Copy link
Member

@aybruhm aybruhm commented Jul 10, 2024

Summary

This PR:

  • Adds backward compatibility logic to handle deleted variants in human evaluations, ensuring that the UI remains functional even when associated variants are deleted.
  • Ensures that testsets in use by human evaluations cannot be deleted.

Related Issue

Closes AGE-414

Changes

  • Updates the fetch_evaluations_by_resource function in db_manager to retrieve both human and automatic evaluations for the testset & variant resource type. This ensures that users are notified of the number of resources using the testset or variant before deletion.
  • Updates the construct_app_container_url router to handle backward compatibility when viewing a single human evaluation after a variant is deleted.

Additional Information

When a user views a human evaluation, the "Run All" button is still visible. Clicking on it will result in a 500 server error because the constructed app container URL for the variant no longer works.

aybruhm added 2 commits July 10, 2024 16:23
… both evaluations and human evaluations for testset resource type
Copy link

vercel bot commented Jul 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
agenta ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 11, 2024 8:59am

@aybruhm aybruhm requested review from mmabrouk and aakrem July 10, 2024 15:47
@aybruhm aybruhm marked this pull request as ready for review July 10, 2024 15:47
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. Backend bug Something isn't working UI labels Jul 10, 2024
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Jul 10, 2024
Copy link
Collaborator

@aakrem aakrem left a comment

Choose a reason for hiding this comment

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

thanks @aybruhm !

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 11, 2024
@aakrem aakrem merged commit 66aa6f2 into main Jul 11, 2024
12 checks passed
@aakrem aakrem deleted the feature/age-414-bug-human-evaluation-ui-breaks-when-a-variant-has-been branch July 11, 2024 09:47
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 lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files. UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants