SuperAPI AI Directory

mindspeed-fsdp2-data-migration

Data & analytics

View repository

Updated 10-15 19:57

About this skill

MindSpeed FSDP2 Data Migration

Objectives

Migrate the source dataset logic into the MindSpeed-MM FSDP2 data plugin structure, preserve preprocessing semantics, and ensure trainer/model input compatibility.

Applicable Scenarios

  • The migration task requires creating a data plugin under mindspeed_mm/fsdp/data/ .
  • The source preprocessing function needs to be reused or minimally adapted.
  • Need to implement dataset_type registration,__getitem__ and collate_fn。

Non-Applicable Scenarios

  • The task is model loading or model registration.
  • The task only performs configuration mapping and does not involve data behavior changes.
  • The task is the final verification gate execution.

Inputs

  • Source dataset entry file
  • Target dataset_type
  • Expected model input fields
  • Data and path format assumptions
  • runtime_assets.dataset_path

Outputs

  • Data plugin implementation
  • Data migration checklist with pass/fail status
  • Adaptation rationale for "non-direct-copy changes"

Mandatory Checks

  1. Registration contract:
    • @data_register.register("<dataset_type>")
  2. Data contract:
    • __getitem__ returns the fields required by the model forward pass
    • collate_fn can safely handle variable-length batches
  3. Reuse contract:
    • When compatible, the source preprocessing function should be reused first
  4. Robustness contract:
    • Safely handle path type variants (str、list[str])
    • Raise clear errors for invalid schema assumptions

Bias-Prevention Execution Protocol

  1. Must be completed before implementation:
    • Validate that runtime_assets.dataset_path exists and is readable
    • Sample and read the first N samples to confirm the schema fields exist
  2. Must be produced after implementation:
    • dataset_schema_report.md
    • fields_contract_report.md
  3. Stop on failure:
    • __getitem__ If fields are incomplete or collate crashes, entering the configuration/verification phase is prohibited

Prohibited Actions

  • It is prohibited to assume the path type is only str
  • It is prohibited to silently swallow schema errors
  • It is prohibited to delete modality-critical fields (pixel_values、image_flags etc.) without declaring it
  • It is prohibited to replace "real path sampling verification" with "sample data passing"

Implementation Rules

  • First copy the core preprocessing logic from the source repository.
  • The adaptation scope is limited to imports, registration, field mapping, and contract alignment.
  • Modality-critical fields must not be silently discarded.
  • Clearly record the reason each function cannot be directly reused.

Exit Criteria

  • The dataset can be constructed via build_mm_dataset .
  • The data fields and collate output meet model expectations.
  • All conclusions in the data-side checklist are supported by evidence.

Progressive Resources

  • checks/data-acceptance.md
  • checks/data-contract-gates.md
  • errors/data-error-dictionary.md
  • errors/triage-severity.md
  • examples/minimal-io.md

Read these files only when detailed criteria are needed for acceptance or data error triage.