dataset-transformation

Generates Python code that converts ML datasets between training and evaluation formats.

881|152|Updated Feb 5, 2026
One-click install
npx skills add https://github.com/awslabs/agent-plugins --skill dataset-transformation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dataset-transformation
Source: https://github.com/awslabs/agent-plugins/tree/main/plugins/sagemaker-ai/skills/dataset-transformation
Command: npx skills add https://github.com/awslabs/agent-plugins --skill dataset-transformation

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires boto3, sagemaker, pandas, and includes scripts (resource) and references (resource) components.

What problem does it solve?

ML datasets often arrive in a schema that does not match the format required by SageMaker training or evaluation jobs, forcing developers to hand-write brittle conversion code. This Skill guides an agent through an 11-step workflow to generate, test, and execute a validated dataset transformation function.

Core Features & Use Cases

  • Format Conversion: Transforms datasets between OpenAI chat, SageMaker SFT/DPO/RLVR/RLAIF, HuggingFace preference, Bedrock Nova, VERL, and custom JSONL formats.
  • Validated Code Generation: Produces a transform_dataset(df) pandas function plus an execution script, tested against sample records before running on the full dataset.
  • Scalable Execution: Runs transformations locally for datasets under 50 MB or submits them as SageMaker Processing Jobs for larger datasets, with S3 or local input/output.
  • Use Case: You have a DPO preference dataset and need it in VERL format for RLVR training on SageMaker — the Skill inspects your data, generates the conversion function, validates it on samples, and runs the full transformation to S3.

Quick Start

Ask the agent to transform your dataset into a target ML format, for example: convert my local DPO dataset at data/prefs.jsonl into VERL format and upload the result to S3.

Frequently Asked Questions about dataset-transformation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert a dataset to SageMaker training format?

Provide the dataset location (local path or S3 URI) and the target format determined by your model type and finetuning technique such as SFT, DPO, RLVR, or RLAIF. The Skill generates a pandas transform_dataset function, validates it on sample records, and runs the full conversion.

What dataset formats are supported for transformation?

Supported formats include OpenAI chat, SageMaker SFT/DPO/RLVR/RLAIF, HuggingFace prompt-completion and preference, Bedrock Nova, VERL, and custom JSONL schemas. Evaluation formats are resolved from live AWS documentation with an offline fallback copy.

Can I transform datasets stored in S3?

Yes, both input and output locations can be S3 URIs or local paths. The generated execution script uses aws s3 cp for loading and uploading, and large datasets can run as SageMaker Processing Jobs with S3-mounted inputs and outputs.

When should I use a SageMaker Processing Job instead of local execution?

The Skill recommends local execution for datasets under 50 MB and a SageMaker Processing Job for datasets of 50 MB or larger. Processing Jobs use a FrameworkProcessor with the SKLearn 1.2-1 image and stream logs until completion.

What output format does the transformed dataset use?

The default output is JSONL, with one JSON object per line, unless you explicitly request another format. When given an output directory, the file is named using the pattern {original_name}_{target_format}.jsonl.