本文へ移動
cccskills
無料GitHub で公開

label-training-data

Set up systematic data labeling workflows using Label Studio or similar tools. Implement quality controls, measure inter-annotator agreement, manage labeler teams, and integrate labeled data into ML training pipelines. Use when starting a supervised ML project that requires labeled training data, when model performance is limited by insufficient labeled examples, when labeling text, images, audio, or video, or when implementing active learning to prioritize the most valuable examples.

インストール方法を見る

含まれるファイル(2)

  • SKILL.md8.1 KB
  • references/EXAMPLES.md28.0 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Label Training Data

See Extended Examples for complete configuration files and templates.

Systematically label data for supervised ML with quality controls and efficient workflows.

When to Use

  • Starting supervised ML project that requires labeled training data
  • Current model performance limited by insufficient labeled examples
  • Need to label text, images, audio, or video data
  • Want to measure and improve annotation quality
  • Managing team of annotators with different expertise levels
  • Implementing active learning to prioritize valuable examples
  • Need to track labeling progress and costs
  • Ensuring consistent labels across multiple annotators

Inputs

  • Required: Unlabeled dataset (images, text, audio, video)
  • Required: Label schema (classes, attributes, or annotation types)
  • Required: Labeling guidelines document
  • Optional: Pre-existing labels (for quality comparison)
  • Optional: Model predictions for pre-annotation
  • Optional: Budget and timeline constraints
  • Optional: Domain expert availability for difficult examples

Procedure

Step 1: Install and Configure Label Studio

Set up Label Studio as the labeling platform.

# Install Label Studio
pip install label-studio

# Or use Docker for production
docker pull heartexlabs/label-studio:latest

# Create project directory
mkdir -p labeling-project/{data,exports,config}
cd labeling-project

# Initialize Label Studio
label-studio init my_project

# Start Label Studio server
label-studio start my_project --port 8080

Access at http://localhost:8080 (default credentials: create on first visit).

For production deployment with Docker:

# docker-compose.yml
version: '3.8'

services:
  label-studio:
    image: heartexlabs/label-studio:latest
    ports:
      - "8080:8080"
# ... (see EXAMPLES.md for complete implementation)
docker-compose up -d

Expected: Label Studio running and accessible, PostgreSQL database initialized for production use.

On failure: If port 8080 already in use, change port in config, if Docker fails check Docker daemon is running, ensure sufficient disk space for data volumes, check firewall allows port 8080.

Step 2: Design Labeling Interface and Schema

Create labeling configuration for your task type.

# labeling-project/config/labeling_config.py
"""
Label Studio configuration templates for common tasks.
"""

# Text Classification (single label)
TEXT_CLASSIFICATION = """
<View>
# ... (see EXAMPLES.md for complete implementation)

Expected: Labeling interface configured with appropriate controls for task type, data imported successfully, interface accessible to annotators.

On failure: Validate XML config with Label Studio's config validator, check data file format (JSON or CSV), ensure image/audio URLs are accessible if using external storage, verify API key has correct permissions.

Step 3: Prepare Data and Implement Sampling Strategy

Format data for import and prioritize examples for labeling.

# labeling-project/prepare_data.py
import pandas as pd
import json
import random
from typing import List, Dict
from sklearn.cluster import KMeans
import numpy as np

# ... (see EXAMPLES.md for complete implementation)

Expected: Data formatted correctly for Label Studio import, sampling strategy prioritizes informative examples, tasks include metadata for tracking.

On failure: Verify JSON format with jq or Python json.load(), check that URLs are accessible if using remote images, ensure no special characters break JSON encoding, validate column names match config.

Step 4: Implement Quality Control and IAA Measurement

Set up processes to measure and improve annotation quality.

# labeling-project/quality_control.py
import pandas as pd
import numpy as np
from sklearn.metrics import cohen_kappa_score, confusion_matrix
from typing import Dict, List, Tuple
import logging

logging.basicConfig(level=logging.INFO)
# ... (see EXAMPLES.md for complete implementation)

Expected: Inter-annotator agreement measured (Cohen's Kappa > 0.6 is moderate, >0.8 is good), difficult tasks identified for review, annotator performance tracked.

On failure: If Kappa very low (<0.4), review labeling guidelines for clarity, retrain annotators, simplify label schema, check for ambiguous examples, consider using expert annotators for gold standard.

Step 5: Export and Integrate Labeled Data

Export labels and prepare for ML training.

# labeling-project/export_labels.py
import requests
import pandas as pd
import json
from typing import List, Dict
import logging

logger = logging.getLogger(__name__)
# ... (see EXAMPLES.md for complete implementation)

Expected: Annotations exported in training-ready format, label distribution balanced or documented, data quality validated before training.

On failure: Verify API key permissions, check export format compatibility with your ML framework, handle missing annotations gracefully, validate JSON structure matches expected format.

Step 6: Set Up Continuous Labeling Pipeline

Automate labeling workflow with active learning integration.

# labeling-project/active_learning_pipeline.py
import schedule
import time
import logging
from datetime import datetime
from prepare_data import DataSampler, prepare_label_studio_format
from export_labels import LabelStudioExporter, convert_to_training_format
import pandas as pd
# ... (see EXAMPLES.md for complete implementation)

Expected: Active learning selects informative examples automatically, labeling batches prepared weekly, model retrained when sufficient new labels available.

On failure: If uncertainty sampling doesn't improve model, try diversity sampling, if annotators can't keep up reduce batch size, monitor labeling queue length, implement backpressure if queue grows too large.

Validation

  • Label Studio accessible and responsive
  • Labeling interface intuitive (test with sample annotator)
  • Data import successful with correct format
  • Inter-annotator agreement (Cohen's Kappa) > 0.6
  • Quality control identifies problematic tasks
  • Labels export in training-ready format
  • Label distribution matches expected (or intentionally imbalanced)
  • Active learning pipeline runs without manual intervention
  • Annotation throughput meets project timeline

Common Pitfalls

  • Unclear guidelines: Ambiguous instructions cause inconsistent labels; invest in detailed guidelines with examples
  • Insufficient overlap: Can't measure IAA without multiple annotators per task; use 10-20% overlap
  • Ignoring difficult cases: Edge cases often skipped but critical for model robustness; flag for expert review
  • Batch effects: Annotator fatigue or learning causes temporal inconsistency; randomize task order
  • No quality feedback: Annotators don't improve without feedback; provide regular accuracy reports
  • Wrong sampling strategy: Random sampling wastes budget on easy examples; use uncertainty or diversity sampling
  • Labeling in isolation: Domain experts needed for complex tasks; pair novices with experts initially
  • Not tracking costs: Labeling expensive; monitor time per task and total budget consumption

Related Skills

  • version-ml-data - Version control for labeled datasets
  • track-ml-experiments - Track model performance as labels added

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Execute structural metamorphosis using strangler fig migration, chrysalis phases, and interface preservation. Covers transformation planning, parallel running, progressive cutover, rollback design, and post-metamorphosis stabilization for system architecture evolution. Use when assess-form has classified the system as READY for transformation, when migrating from monolith to microservices, when replacing a core subsystem while dependents continue operating, or when any architectural change must be gradual rather than big-bang.

日本語の概要は準備中です。原文の説明を表示しています。

pjt222/agent-almanac372026年10月10日 更新

adaptic

無料

Master skill composing the 5-step synoptic cycle for panoramic synthesis across multiple domains. Orchestrates meditate, expand-awareness, observe, awareness, integrate-gestalt, and express-insight into a coherent process that produces unified understanding rather than sequential compromise. Use when a problem genuinely spans 3+ domains and the interactions between domains matter more than depth in any one, when sequential analysis feels like compromise rather than integration, or before major architectural decisions affecting multiple stakeholders.

日本語の概要は準備中です。原文の説明を表示しています。

pjt222/agent-almanac372026年10月10日 更新

Scaffold a new puzzle type across all 10+ pipeline integration points in jigsawR. Creates the core puzzle module, wires it into the unified pipeline (generation, positioning, rendering, adjacency), adds ggpuzzle geom/stat layers, updates DESCRIPTION and config.yml, extends the Shiny app, and creates a comprehensive test suite. Use when adding a completely new puzzle type to the package or following the 10-point integration checklist to ensure nothing is missed end-to-end.

日本語の概要は準備中です。原文の説明を表示しています。

pjt222/agent-almanac372026年10月10日 更新

Add Rcpp or RcppArmadillo integration to an R package for high-performance C++ code. Covers setup, writing C++ functions, RcppExports generation, testing compiled code, and debugging. Use when an R function is too slow and profiling confirms a bottleneck, when you need to interface with existing C/C++ libraries, or when implementing algorithms (loops, recursion, linear algebra) that benefit from compiled code.

日本語の概要は準備中です。原文の説明を表示しています。

pjt222/agent-almanac372026年10月10日 更新

aikido

無料

Practice aikido as a defensive martial art emphasizing harmony, redirection, and controlled resolution. Covers centering and grounding, ukemi (safe falling and rolling), core techniques (irimi-nage, shiho-nage, kote-gaeshi, ikkyo), blending and tai sabaki (body movement), randori (multiple attacker practice), weapons awareness, and applying principles off the mat. Use when learning a defensive martial art that prioritizes de-escalation, developing the ability to redirect aggression without causing unnecessary harm, building safe falling skills, or cultivating calm centeredness under physical pressure.

日本語の概要は準備中です。原文の説明を表示しています。

pjt222/agent-almanac372026年10月10日 更新

Analyze an arbitrary codebase to identify functions, APIs, and data sources suitable for exposure as MCP tools, producing a tool specification document. Use when planning an MCP server for an existing project, auditing a codebase before wrapping it as an AI-accessible tool surface, comparing what a codebase can do versus what is already exposed via MCP, or generating a tool spec to hand off to scaffold-mcp-server.

日本語の概要は準備中です。原文の説明を表示しています。

pjt222/agent-almanac372026年10月10日 更新

pjt222 のスキルをすべて見る

このスキルの問題を報告する