AGENT SKILL

data-preparation

Prepare, validate, split, and transform interaction datasets for Microsoft Recommenders workflows, including pandas, sparse, LibFFM, and optional Spark paths.

License 许可
MIT
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
data-preparation
license
MIT
metadata
{ "disco-role": "operating" }
description
Prepare, validate, split, and transform interaction datasets for Microsoft Recommenders workflows, including pandas, sparse, LibFFM, and optional Spark paths.
disable-model-invocation
true

02 资源文件 5

03 SKILL.md 正文

Data Preparation

Use this sub-skill when a user needs to load recommendation datasets, validate interaction columns, choose a train/test splitter, create negative samples, convert dataframe formats, or prepare sparse matrices before modeling or evaluation.

Backend truth for this skill

  • Verified in the base CPU scope: pandas/numpy dataframe utilities, Python splitters, sparse AffinityMatrix, LibFFM conversion signatures, and MovieLens helper import/signature checks.
  • Optional and not verified in this CPU scope: PySpark splitters and Spark dataframe loaders. They require the [spark] extra plus a working Java/Spark/PySpark runtime.
  • Dataset download helpers may use network access. For no-network tasks, prefer user-provided small fixtures or bundled validation scripts.

Start here

  • For validated API signatures and defaults, read api-reference.md.
  • For end-to-end data preparation recipes, read workflows.md.
  • For column contracts and dataframe/sparse/LibFFM layouts, read data-formats.md.
  • For common failures, read troubleshooting.md.
  • To check whether a small interactions CSV is ready for common Recommenders workflows, run:
python sub-skills/data-preparation/scripts/validate_interactions.py --input interactions.csv --require-rating --require-timestamp

Run the command from the generated skill root, or adapt the script path to the installed skill location.

Route elsewhere

  • Choosing or fitting algorithms belongs in modeling.
  • Computing RMSE, MAP, nDCG, diversity, novelty, or serendipity belongs in evaluation.
  • Hyperparameter sweeps, benchmark loops, Databricks, AzureML, AKS, and environment diagnostics belong in operations-and-tuning.

Working rules

  1. Normalize the user's dataframe contract before choosing a splitter. Default columns are userID, itemID, rating, timestamp, and prediction.
  2. For implicit-feedback workflows, make the positive event column explicit. Use rating or a custom label consistently; do not mix feedback, label, and rating without a mapping.
  3. Use random splits for quick smoke tests, chronological splits when timestamps encode order, and stratified splits when each user or item needs representation in train/test.
  4. Check minimum interactions before stratifying. A user or item with too few rows can make a split impossible or misleading.
  5. Treat Spark loaders/splitters as optional. Do not claim Spark validation unless PySpark and Java are actually available.
  6. Do not instruct future agents to open original notebooks or tests; the recipes and helper here are the self-contained replacements.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351