界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
效率与协作 · SKILL.md

torch-and-foundation-models

torch-and-foundation-models

【效率与协作】Use Darts PyTorch forecasting models and foundation wrappers with explicit backend, checkpoint, and cache/download boundaries.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: torch-and-foundation-models description: "Use Darts PyTorch forecasting models and foundation wrappers with explicit backend, checkpoint, and cache/download boundaries." disable-model-invocation: true metadata: disco-role: operating license: Apache 2.0

Torch and foundation models

Use this sub-skill when the user needs Darts neural forecasting models, darts[torch], PyTorch Lightning trainer kwargs, CPU/GPU verification, checkpoints, or foundation model wrapper planning.

Read first

Route by task

  • Install or validate neural Darts: check darts[torch], torch, and pytorch_lightning; run torch_model_smoke.py before real training.
  • Tiny CPU prototype: use small input_chunk_length, output_chunk_length, n_epochs, and CPU pl_trainer_kwargs.
  • GPU/TPU request: verify the exact backend in the target environment. CPU torch import is not GPU proof.
  • Covariates for neural models: validate spans in ../data-processing-and-covariates/, then map them to model-specific chunk/covariate support here.
  • Foundation wrappers: require explicit local cache/model path or approved network downloads before constructing wrappers that may fetch weights.
  • Metrics or explainability: route forecast evaluation to ../evaluation-and-explainability/.

Safe check

python scripts/torch_model_smoke.py          # imports and constructs a tiny CPU TCNModel
python scripts/torch_model_smoke.py --train  # optional one-epoch generated-data CPU training smoke

Use an explicit temporary or user-approved work directory for checkpoints/logs. Do not write training artifacts into the skill directory.

Boundaries

This sub-skill documents optional CUDA/foundation behavior but the baseline verification only proved CPU torch. Do not claim accelerator or foundation model execution until separately verified with the required hardware, wheel, cache, and memory in the user's environment.

我的收藏