MCP HubMCP Hub
스킬 목록으로 돌아가기

label-training-data

pjt222
업데이트됨 Yesterday
17
2
17
GitHub에서 보기
디자인aiautomationdesigndata

정보

이 기술은 Label Studio와 같은 도구를 사용하여 체계적인 데이터 라벨링 워크플로우를 설정하는 데 도움을 줍니다. 품질 관리, 주석 작성자 일치도 측정, 라벨링 팀 관리, 라벨링된 데이터를 ML 파이프라인에 통합하는 기능을 구현합니다. 지도 학습 ML 프로젝트를 시작할 때, 라벨링된 예시가 부족한 경우, 또는 텍스트, 이미지, 오디오, 비디오 데이터에 대한 능동 학습을 구현할 때 사용하세요.

빠른 설치

Claude Code

추천
기본
npx skills add pjt222/agent-almanac -a claude-code
플러그인 명령대체
/plugin add https://github.com/pjt222/agent-almanac
Git 클론대체
git clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/label-training-data

Claude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요

문서

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 Use

  • Starting supervised ML project requiring labeled training data
  • Current model performance limited by insufficient labeled examples
  • Need to label text, images, audio, 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, 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

Steps

Step 1: Install and Configure Label Studio

Set up Label Studio as 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

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

If fail: Port 8080 already in use? Change port in config. Docker fails? Check Docker daemon running, ensure sufficient disk space for data volumes, check firewall allows port 8080.

Step 2: Design Labeling Interface and Schema

Create labeling configuration for 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)

Got: Labeling interface configured with appropriate controls for task type. Data imported successfully. Interface accessible to annotators.

If fail: Validate XML config with Label Studio's config validator. Check data file format (JSON or CSV). Ensure image/audio URLs accessible if using external storage. Verify API key has correct permissions.

Step 3: Prepare Data and Implement Sampling Strategy

Format data for import. 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)

Got: Data formatted correctly for Label Studio import. Sampling strategy prioritizes informative examples. Tasks include metadata for tracking.

If fail: Verify JSON format with jq or Python json.load(). Check URLs 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)

Got: Inter-annotator agreement measured (Cohen's Kappa > 0.6 = moderate, >0.8 = good). Difficult tasks identified for review. Annotator performance tracked.

If fail: 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. 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)

Got: Annotations exported in training-ready format. Label distribution balanced or documented. Data quality validated before training.

If fail: Verify API key permissions. Check export format compatibility with 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)

Got: Active learning selects informative examples automatically. Labeling batches prepared weekly. Model retrained when sufficient new labels available.

If fail: Uncertainty sampling doesn't improve model? Try diversity sampling. Annotators can't keep up? Reduce batch size. Monitor labeling queue length. Implement backpressure if queue grows too large.

Checks

  • 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

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

See Also

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

GitHub 저장소

pjt222/agent-almanac
경로: i18n/caveman/skills/label-training-data
0
agentsagentskillsai-assisted-developmentclaude-codeskillsteams

연관 스킬

executing-plans

디자인

executing-plans 스킬은 검토 체크포인트가 포함된 통제된 배치로 실행할 완전한 구현 계획이 있을 때 사용합니다. 이 스킬은 계획을 불러와 비판적으로 검토한 후, 소규모 배치(기본값 3개 작업)로 작업을 실행하면서 각 배치 사이에 진행 상황을 아키텍트 검토를 위해 보고합니다. 이를 통해 내재된 품질 관리 체크포인트를 갖춘 체계적인 구현이 보장됩니다.

스킬 보기

requesting-code-review

디자인

이 스킬은 코드 변경 사항을 요구 사항에 따라 분석하기 위해 코드 리뷰어 하위 에이전트를 호출합니다. 작업 완료 후, 주요 기능 구현 후, 또는 메인 브랜치에 병합하기 전에 사용해야 합니다. 이 리뷰는 현재 구현체와 원래 계획을 비교하여 문제를 조기에 발견하는 데 도움이 됩니다.

스킬 보기

connect-mcp-server

디자인

이 스킬은 개발자들이 HTTP, stdio 또는 SSE 전송 방식을 통해 MCP 서버를 Claude Code에 연결하는 포괄적인 가이드를 제공합니다. GitHub, Notion 및 사용자 정의 API와 같은 외부 서비스를 통합하기 위한 설치, 구성, 인증 및 보안을 다룹니다. MCP 통합 설정, 외부 도구 구성 또는 Claude의 모델 컨텍스트 프로토콜 작업 시 활용하세요.

스킬 보기

web-cli-teleport

디자인

이 스킬은 작업 분석을 기반으로 개발자가 Claude Code 웹 인터페이스와 CLI 인터페이스 중 선택할 수 있도록 돕고, 두 환경 간 원활한 세션 텔레포트를 가능하게 합니다. 웹, CLI 또는 모바일 환경 전환 시 세션 상태와 컨텍스트를 관리하여 워크플로를 최적화합니다. 다양한 단계에서 서로 다른 도구가 필요한 복잡한 프로젝트에 사용하세요.

스킬 보기