-
Notifications
You must be signed in to change notification settings - Fork 1
Feat: Optimize database performance and fix dataset regeneration UI #93
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
base: dev
Are you sure you want to change the base?
Conversation
Backend Performance Improvements: - Added completed_rows column to track generation progress - Optimized database queries for faster UI loading - Enhanced use_case column population from backend API Frontend Regeneration Fixes: - Fixed Examples component to render immediately during regeneration - Eliminated unnecessary API calls during dataset regeneration (performance boost) - Resolved Form.useWatch timing issues by using form.getFieldsValue(true) pattern - Added regeneration detection across all DataGenerator components - Prevented API calls for topics, examples, prompts, and model params during regeneration Key Technical Changes: - Examples.tsx: Fixed data source logic using same pattern as Summary.tsx - Configure.tsx: Added regeneration detection to prevent inference_type override - Prompt.tsx: Conditional API fetching based on regeneration state - Parameters.tsx: Skip model params API during regeneration - UseCaseSelector.tsx: Prevent use cases API call during regeneration - API hooks: Enhanced with conditional URL generation and loading states Successfully tested: ✅ Examples render immediately during regeneration (no loading spinner) ✅ All form fields populate correctly from existing dataset data ✅ No unnecessary API calls during regeneration ✅ Original dataset creation functionality preserved ✅ Database performance improvements for swift UI loading Maintains backward compatibility while significantly improving user experience.
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 optimizes backend database performance and fixes frontend dataset regeneration issues. The key focus is improving the user experience during dataset regeneration by eliminating unnecessary API calls and ensuring proper data rendering.
- Added
completed_rows
column to track dataset generation progress and created a lightweight query for better performance - Fixed dataset regeneration UI by using existing form data instead of triggering API calls for topics, examples, prompts, and model parameters
- Enhanced use case handling by replacing hardcoded translations with dynamic API-based lookup system
Reviewed Changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
app/main.py | Switched to lightweight database query for generation history |
app/core/database.py | Added optimized query method with completed_rows tracking |
app/client/src/pages/DataGenerator/* | Fixed regeneration detection and conditional API fetching across all components |
app/client/src/pages/Home/* | Added completed_rows column display and migrated to dynamic use case mapping |
app/client/src/api/* | Enhanced hooks with conditional fetching and added use case mapping functionality |
Comments suppressed due to low confidence (1)
app/client/src/pages/DataGenerator/Prompt.tsx:252
- Fixed the typo from 'JSAON' to 'JSON' correctly.
label={
- Fixed test_generation_history to mock get_paginated_generate_metadata_light instead of get_paginated_generate_metadata - The API endpoint uses get_paginated_generate_metadata_light for better performance - All integration tests now pass successfully
Co-authored-by: Copilot <[email protected]>
Backend Performance Improvements:
Frontend new components added/modified
Frontend Regeneration Fixes:
Key Technical Changes:
Successfully tested:
✅ Examples render immediately during regeneration (no loading spinner) ✅ All form fields populate correctly from existing dataset data ✅ No unnecessary API calls during regeneration
✅ Original dataset creation functionality preserved ✅ Database performance improvements for swift UI loading.
✅ Backend testing and integration testing.
Maintains backward compatibility while significantly improving user experience.