AGENT SKILL

time-series-library

Use Time-Series-Library (TSLib) to configure, run, debug, and adapt deep time-series forecasting, imputation, anomaly detection, classification, zero-shot, and model-customization workflows.

License 许可
MIT
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
time-series-library
license
MIT
metadata
{ "disco-role": "operating" }
description
Use Time-Series-Library (TSLib) to configure, run, debug, and adapt deep time-series forecasting, imputation, anomaly detection, classification, zero-shot, and model-customization workflows.
disable-model-invocation
true

02 资源文件 9

03 SKILL.md 正文

Time-Series-Library (TSLib)

Use this skill when the task names Time-Series-Library, TSLib, run.py, TimesNet, TimeXer, iTransformer, PatchTST, DLinear, M4, ETT, UEA, PSM/MSL/SMAP/SMD/SWAT, long-term forecasting, short-term forecasting, time-series imputation, anomaly detection, classification, zero-shot forecasting, or adapting a model/script inside a TSLib-style checkout.

Start Here

  1. Confirm the environment and source layout before running training-scale work. From this skill directory, pass the user's TSLib checkout as --repo-root:
    python scripts/check_tslib_environment.py --repo-root /path/to/Time-Series-Library --check-torch --check-core-imports
    
  2. For command/data debugging, create a tiny local custom CSV in the user's checkout instead of downloading benchmark data:
    python scripts/create_tiny_tslib_dataset.py --output /path/to/Time-Series-Library/dataset/tiny-custom/tiny.csv
    
  3. Use the route map below. TSLib has one unified CLI (python run.py ...), but each task has different data layouts, output files, metrics, and failure modes.
  4. Prefer --no_use_gpu, tiny custom data, --train_epochs 1, and --num_workers 0 for smoke checks. Treat upstream benchmark scripts as templates, not as safe default commands.

Route by Task

  • Data layout, CLI flags, outputs, and preflight checks: use sub-skills/data-and-cli/SKILL.md for run.py arguments, dataset names, local-vs-Hugging Face fallback behavior, GPU flags, result/checkpoint folders, and safe data validation.
  • Forecasting workflows: use sub-skills/forecasting/SKILL.md for long-term forecasting, short-term/M4 forecasting, exogenous/TimeXer recipes, zero-shot forecast routing, metrics, M4 summary behavior, and forecast command construction.
  • Imputation, anomaly detection, and classification: use sub-skills/imputation-anomaly-classification/SKILL.md for masked reconstruction, reconstruction-threshold anomaly detection, UEA classification, task metrics, and dataset-specific troubleshooting.
  • Model catalog, optional dependencies, and customization: use sub-skills/foundation-models-and-customization/SKILL.md for dynamic model discovery, Mamba and large time-series model dependencies, augmentation flags, custom models/<Name>.py files, and contribution-style script additions.

Core Mental Model

TSLib is a source-tree benchmark framework rather than a packaged library with console entry points. The normal flow is:

choose a task and bash/script template -> run python run.py with explicit flags ->
run.py dispatches to exp/Exp_* -> data_provider builds datasets/loaders ->
models/<Name>.py is lazy-imported -> train/test writes checkpoints, metrics, and result files

Important consequences:

  • --task_name selects the experiment class, not just reporting labels.
  • --data selects a loader family; --root_path and --data_path must match that family.
  • --model must match a Python file under models/; Exp_Basic scans that directory dynamically.
  • Many upstream shell scripts export CUDA_VISIBLE_DEVICES and run full benchmark settings. Remove or change those exports for your machine and use smoke settings first.
  • Several optional model families need extra packages or model downloads; do not assume a basic TSLib environment can import every file in models/.

References

  • references/installation-and-environment.md explains public installation choices, optional dependencies, and safe smoke checks.
  • references/cli-arguments.md summarizes the unified run.py argument families and task dispatch.
  • references/data-formats.md documents CSV, M4, anomaly, and UEA layouts plus local-vs-Hub behavior.
  • references/model-catalog.md lists model families, dynamic discovery, and optional dependency surfaces.
  • references/troubleshooting.md covers cross-cutting install/import, data, CLI, GPU, output, and source-tree issues.
  • references/repo-provenance.md records the source revision and evidence baseline.

Helpers

  • scripts/check_tslib_environment.py checks Python imports, selected models, run.py --help, and optional torch CUDA status without training; pass --repo-root for the user's TSLib checkout.
  • scripts/create_tiny_tslib_dataset.py creates a small local custom CSV with a date column and target column for smoke commands.

Operating Rules

  • Do not run benchmark-scale scripts or download large datasets/model weights unless the user explicitly wants that cost.
  • Do not recommend a raw upstream scripts/.../*.sh command without checking its CUDA_VISIBLE_DEVICES, dataset path, epochs, model dependencies, and output folders.
  • Use local tiny fixtures for CLI/data validation; use real benchmark data only for final experiment work.
  • Treat Mamba/MambaSL and large time-series model files as optional dependency routes. First decide whether the user's task requires them; otherwise choose a core model such as DLinear, TimesNet, TimeXer, PatchTST, or Transformer for smoke checks.
  • Keep generated commands generic and portable across TSLib checkouts; never rely on a particular local checkout path.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351