Skip to content

feat:问题生成过程优化及COT数据生成优化#169

Merged
Dallas98 merged 22 commits intomainfrom
dev
Dec 18, 2025
Merged

feat:问题生成过程优化及COT数据生成优化#169
Dallas98 merged 22 commits intomainfrom
dev

Conversation

@Dallas98
Copy link
Copy Markdown
Collaborator

This pull request refactors and updates the data synthesis task model and related API/service code to align with a new database schema and configuration approach. The main changes include renaming the main ORM class and table, consolidating configuration fields, updating API endpoints to use the new structure, and improving compatibility with both old and new data formats.

Database Model and Schema Refactor:

  • Renamed the ORM class from DataSynthesisInstance to DataSynthInstance and the table from t_data_synthesis_instances to t_data_synth_instances, updating all references accordingly. The schema now consolidates multiple configuration fields into a single synth_config JSON column, removes unused columns, and aligns field names with the new structure.
  • Updated the save_synthesis_task function to build and store the new synth_config structure, ensuring compatibility with legacy request formats and only saving fields present in the updated table.

API and Service Layer Updates:

  • Refactored all API endpoints and service logic to use DataSynthInstance and the new config structure, including listing, retrieving, creating, and deleting synthesis tasks and related file tasks. This includes extracting fields from synth_config when constructing response objects for compatibility. [1] [2] [3] [4] [5] [6] [7] [8] [9]
  • Enhanced the creation and listing endpoints to reconstruct API response objects (DataSynthesisTaskItem) from the new synth_config field, ensuring all expected fields are present even if not stored directly in the database. [1] [2]

Schema and Type Improvements:

  • Updated the generation.py schema: replaced SynthesisConfig with SyntheConfig, introduced a new Config class for grouping configs, and changed CreateSynthesisTaskRequest to use synth_config: Config instead of separate config fields. [1] [2]
  • Added missing imports and typing improvements for better type safety and clarity in API code.

Utility and Minor Fixes:

  • Fixed utility function import to use the correct extract_json_substring in evaluation service. [1] [2]
  • Ensured row count handling is robust and type-safe when deleting synthesis data. [1] [2]

These changes modernize the data synthesis task handling, improve maintainability, and ensure forward compatibility with evolving requirements.

…w with enhanced payload handling and UI updates
@Dallas98 Dallas98 merged commit e0e9b1d into main Dec 18, 2025
9 checks passed
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.

1 participant