인터페이스는 현지화되어 있으며, Skill 소개와 설명 문서는 선택한 언어로 AI가 자동 번역합니다. 코드·명령어·경로·전문 용어는 원문을 유지하며 원작자 문서가 우선합니다.
Skills 둘러보기
생산성 및 협업 · SKILL.md

torchmetrics

torchmetrics

Use TorchMetrics to choose, inspect, and combine metric families for PyTorch evaluation, including core API, domain metrics, model-based metrics, and wrappers.

Independent GitHub snapshot · Automated classification · Original documentation governs

Skill 문서

GitHub

name: torchmetrics description: "Use TorchMetrics to choose, inspect, and combine metric families for PyTorch evaluation, including core API, domain metrics, model-based metrics, and wrappers." disable-model-invocation: true metadata: disco-role: operating license: Apache 2.0

TorchMetrics

TorchMetrics is a metric library for PyTorch evaluation. Use this skill when the request is about choosing, calling, combining, or debugging TorchMetrics APIs rather than about training a model itself.

Start here

Route map

  • core-api — Metric, functional versus module metrics, update / compute / forward / reset, custom metric state, Lightning logging, DDP behavior, persistence.
  • basic-metric-domains — classification, regression, retrieval, clustering, nominal, and other tensor-only metric families.
  • vision-detection-metrics — image quality, segmentation, detection, and panoptic metrics.
  • audio-text-metrics — audio and speech quality metrics plus no-download text metrics such as ROUGE, WER, CER, BLEU, SacreBLEU, and Perplexity.
  • model-based-metrics — BERTScore, InfoLM, CLIPScore, CLIP-IQA, FID/KID/LPIPS/DISTS/ARNIQA/PPL, DNSMOS, NISQA, VMAF, and similar metrics that need pretrained assets or external model planning.
  • collections-wrappers-plotting — MetricCollection, wrappers, trackers, and plotting.

How to choose

  1. If the task is about implementing or debugging a custom Metric, start with core-api.
  2. If the task names a familiar metric family such as accuracy, F1, MSE, nDCG, or Cramer's V, use the sub-skill that owns that family.
  3. If the task is about combining metrics, renaming outputs, tracking metrics over epochs, or plotting results, use collections-wrappers-plotting.
  4. If the metric may instantiate a pretrained model, feature extractor, or large optional asset, route to model-based-metrics.
  5. If a request spans families, choose the primary metric family first, then follow the route back to core-api or collections-wrappers-plotting as needed.

Install guidance

TorchMetrics has no verified console CLI. Install it from Python:

pip install torchmetrics

Then add only the extra that matches the route you chose when needed, for example torchmetrics[audio], torchmetrics[image], torchmetrics[text], torchmetrics[detection], torchmetrics[multimodal], torchmetrics[video], torchmetrics[visual], or torchmetrics[clustering]. Avoid torchmetrics[all] unless you truly need a very broad evaluation environment.

Fast checks

  • python -c "import torchmetrics; print(torchmetrics.__version__)"
  • python scripts/check_torchmetrics_environment.py --device auto

Common signals

  • Metric, add_state, compute_with_cache, LightningModule, or DDP -> core-api
  • Accuracy, F1, MSE, nDCG, ClusterAccuracy, or CramersV -> basic-metric-domains
  • PSNR, DiceScore, MeanAveragePrecision, or PanopticQuality -> vision-detection-metrics
  • SNR, PESQ, WER, ROUGE, or Perplexity -> audio-text-metrics
  • BERTScore, CLIPScore, FID, LPIPS, DNSMOS, or VMAF -> model-based-metrics
  • MetricCollection, ClasswiseWrapper, MetricTracker, or .plot() -> collections-wrappers-plotting
저장한 Skills