Skip to content

Add training data operators and opt-in resilient JSONL processing - #572

Open
yaoxiao67 wants to merge 5 commits into
OpenDCAI:mainfrom
yaoxiao67:feat/training-data-preparation
Open

yaoxiao67 wants to merge 5 commits into
OpenDCAI:mainfrom
yaoxiao67:feat/training-data-preparation

Conversation

@yaoxiao67

@yaoxiao67 yaoxiao67 commented Oct 21, 2026 •

Copy link
Copy Markdown

This PR adds training-data preparation operators and opt-in resilience for local JSONL tasks. Invalid content can be inspected before explicit filtering, committed pipeline outputs can be resumed, and failed independent model requests can be replayed.

Changes

  • Add format-specific QA, Alpaca and text ShareGPT messages builders with fixed field signatures and source-field preservation.
  • Separate source/conversation/preference evaluation from explicit filtering. Conversion preserves row count and raises on invalid content.
  • Keep preference field mapping as a Python utility, preserving both answers.
  • Add opt-in malformed-JSONL isolation, validated batch/stream checkpoints and recorded HTTP request budgets/retries.
  • Provide an independent recorded-generation runner with aligned success/failure outcomes and an explicit successful-results export.
  • Include bilingual operator descriptions, migration notes and three CPU examples.

Compatibility and classification

  • Existing upstream defaults and serving return types are preserved; no runtime dependencies were added.
  • The unpublished core_text interfaces from the first PR revision have been removed and their examples/tests migrated.
  • Please review the proposed domain generate placement for structured messages builders and the text_preference domain for preference evaluation/filtering.
  • Enhanced recovery targets local JSONL and a single writer. Deduplication, distributed storage, multimodal data and conversational DPO are outside this change.

Validation

  • macOS arm64 / Python 3.11.17: python -m pytest -m 'cpu or api' -q -rs — 425 passed, 48 deselected.
  • Public-data, tool/error, SIGKILL recovery and localhost HTTP/replay tasks passed from source and an independently installed wheel.
  • 56,002 public records: 55,973 accepted and 29 empty-content errors; source/wheel training exports matched, with content unchanged from the preceding revision.
  • Installed dependency checks and sdist/wheel source checks passed. HTTP faults used a local server; no real model API was called.

Please review the public interfaces, taxonomy and opt-in recovery boundaries. Native platform matrix results remain for upstream CI.

@yaoxiao67

Copy link
Copy Markdown
Author

I have revised the implementation against the framework conventions:

  • Moved training-format rules out of core_text into SFT, conversation and preference domains.
  • Split format-specific operators with fixed field signatures so compile() can detect missing default and enabled optional inputs.
  • Separated evaluation, explicit filtering and conversion; converters no longer drop invalid records implicitly.
  • Added bilingual descriptions, parameter defaults, error semantics and migration examples.
  • Replaced RecordedPromptedGenerator with an explicit task runner, keeping aligned failure outcomes separate from the successful-results export.

Local CPU/API selection: 425 passed. Public-data, tool/error, real process-interruption and localhost HTTP/replay tasks passed from both source and an installed wheel.

Please review two classification proposals: domain generate for structured messages builders that preserve source columns, and text_preference for preference evaluation/filtering. These choices are proposals for review and can be adjusted to the project's preferred taxonomy.

This branch has not been deployed

No deployments
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