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-10-08
- Stars
- ★ 11
- Forks
- 3
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 资源文件 7
- 参考文档references/cli-arguments.md3.9 KB
- 参考文档references/data-formats.md3.2 KB
- 参考文档references/installation-and-environment.md4.6 KB
- 参考文档references/model-catalog.md3.6 KB
- 参考文档references/repo-provenance.md1.4 KB
- 参考文档references/repo-routing-metadata.json513 B
- 参考文档references/troubleshooting.md4.0 KB
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
- 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 - For command/data debugging, create a tiny local
customCSV 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 - 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. - Prefer
--no_use_gpu, tiny custom data,--train_epochs 1, and--num_workers 0for 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.mdforrun.pyarguments, dataset names, local-vs-Hugging Face fallback behavior, GPU flags, result/checkpoint folders, and safe data validation. - Forecasting workflows: use
sub-skills/forecasting/SKILL.mdfor 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.mdfor 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.mdfor dynamic model discovery, Mamba and large time-series model dependencies, augmentation flags, custommodels/<Name>.pyfiles, 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_nameselects the experiment class, not just reporting labels.--dataselects a loader family;--root_pathand--data_pathmust match that family.--modelmust match a Python file undermodels/;Exp_Basicscans that directory dynamically.- Many upstream shell scripts export
CUDA_VISIBLE_DEVICESand 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.mdexplains public installation choices, optional dependencies, and safe smoke checks.references/cli-arguments.mdsummarizes the unifiedrun.pyargument families and task dispatch.references/data-formats.mddocuments CSV, M4, anomaly, and UEA layouts plus local-vs-Hub behavior.references/model-catalog.mdlists model families, dynamic discovery, and optional dependency surfaces.references/troubleshooting.mdcovers cross-cutting install/import, data, CLI, GPU, output, and source-tree issues.references/repo-provenance.mdrecords the source revision and evidence baseline.
Helpers
scripts/check_tslib_environment.pychecks Python imports, selected models,run.py --help, and optional torch CUDA status without training; pass--repo-rootfor the user's TSLib checkout.scripts/create_tiny_tslib_dataset.pycreates a small localcustomCSV with adatecolumn 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/.../*.shcommand without checking itsCUDA_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
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
python-api
Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP/mAP semantics, and source-style import diagnostics.
file-evaluation
Folder-based PASCAL VOC AP/mAP evaluation from ground-truth and detection text files.
object-detection-metrics
Guides legacy Object-Detection-Metrics PASCAL VOC AP/mAP evaluation from detection text folders and direct Python API classes.
nx-workspace-patterns
Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.