技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
pytorch-forecasting【数据与研究】Use PyTorch Forecasting for tabular time-series datasets, deep forecasting models, multi-horizon losses, tuning, beta API-v2 workflows, and custom components.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill when a task involves the pytorch-forecasting package or its
Python import pytorch_forecasting: tabular time-series data contracts,
TimeSeriesDataSet, Lightning-backed forecasting models, probabilistic or
quantile losses, Optuna tuning, beta API-v2 workflows, or package-specific
custom model/metric components.
Do not use this skill for generic PyTorch/Lightning training that does not use PyTorch Forecasting APIs, generic statistical forecasting outside this package, or release/changelog automation.
Verify the active environment can import the package:
import pytorch_forecasting as pf
from pytorch_forecasting import TimeSeriesDataSet, TemporalFusionTransformer, QuantileLoss
print(pf.__version__)
If imports, optional extras, or backend status are unclear, run the bundled read-only diagnostic:
python scripts/check_environment.py
python scripts/check_environment.py --json
Read references/repo-provenance.md before deciding whether this skill matches a current checkout or should be refreshed.
Read references/package-overview.md for the v1/v2 API split, public model/metric families, optional extras, and routing summary.
Use references/troubleshooting.md for install/import/backend/optional-dependency failures before routing into a workflow-specific troubleshooting page.
Use sub-skills/data-pipeline/SKILL.md when
the user has a pandas-like table and needs to declare time_idx, target,
group_ids, static/known/unknown covariates, encoders, normalizers, missing-timestep handling, train/validation/prediction datasets, or dataloaders.
Typical triggers: TimeSeriesDataSet, from_dataset, to_dataloader,
GroupNormalizer, NaNLabelEncoder, allow_missing_timesteps, target NaNs,
short series, unknown categoricals, or inference datasets with future known
covariates.
Use sub-skills/forecasting-models/SKILL.md
when the user needs model selection, .from_dataset(), Lightning Trainer
setup, checkpointing, prediction, interpretation, or plotting for stable v1
model families such as TemporalFusionTransformer, NBeats, NHiTS,
DeepAR, RecurrentNetwork, DecoderMLP, TiDEModel, TimeXer, xLSTMTime,
or Baseline.
Typical triggers: choosing a model for covariates, long horizons, uncertainty,
training that freezes, predict(return_index=True), checkpoint loading,
mode="raw", or interpretation helpers.
Use sub-skills/metrics-and-tuning/SKILL.md
when the task is about SMAPE, MAE, QuantileLoss, distribution losses,
MultiLoss, aggregated objectives, model output_size, non-finite losses,
learning-rate finder setup, MQF2DistributionLoss, or Optuna
optimize_hyperparameters().
Install optional extras only when needed: pytorch-forecasting[mqf2] for MQF2
and pytorch-forecasting[tuning] for Optuna tuning.
Use sub-skills/api-v2-workflows/SKILL.md
only when the request explicitly mentions API-v2, D1/D2/M/P layers, v2
TimeSeries, EncoderDecoderTimeSeriesDataModule, TslibDataModule,
TFT_pkg_v2, config dictionaries, or fit()/predict() package wrappers.
API-v2 is beta/WIP in this source snapshot. For production-facing workflows, prefer the stable v1 data/model sub-skills unless the user explicitly selects v2.
Use sub-skills/custom-components/SKILL.md when editing a PyTorch Forecasting checkout to add custom metrics/losses, v1 or v2 model classes, package wrappers, data modules, registry tags, or focused estimator tests.
Do not route ordinary package usage here; it is for component implementation and focused repository-development tasks, not release management or full CI.
scripts/check_environment.py checks package imports, dependency versions,
optional extras, and torch backend status without training or downloading.This skill was generated for PyTorch Forecasting 1.8.0 at the commit recorded in references/repo-provenance.md. Refresh if the model list, v2 stability, optional extras, constructor signatures, public exports, or major data/model tests changed.