gluonts
Use GluonTS for probabilistic time-series forecasting data pipelines, transformations, PyTorch/local models, evaluation, backtesting, shell deployment, and optional adapters.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- gluonts
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Use GluonTS for probabilistic time-series forecasting data pipelines, transformations, PyTorch/local models, evaluation, backtesting, shell deployment, and optional adapters.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/package-overview.md4.4 KB
- 参考文档references/repo-provenance.md2.6 KB
- 参考文档references/repo-routing-metadata.json314 B
- 参考文档references/troubleshooting.md5.2 KB
- 脚本scripts/check_gluonts_env.py5.8 KB
03 SKILL.md 正文
GluonTS repo skill
Use this skill when a task involves GluonTS time-series forecasting: PandasDataset, ListDataset, DataEntry fields, train/test windows, transformations, Estimator/Predictor, PyTorch forecasting models, forecast evaluation metrics, gluonts.shell, or optional forecasting adapters.
Start here
- Check the package snapshot and selected scope in references/repo-provenance.md when freshness matters.
- Read references/package-overview.md for install commands, extras, backend boundaries, and route selection.
- Run the environment diagnostic when imports or extras are uncertain:
python scripts/check_gluonts_env.py --check-torch --check-shell
For public package installs, use the smallest extra set required by the task:
pip install gluonts
pip install "gluonts[torch]" # PyTorch estimator workflows
pip install "gluonts[shell]" # gluonts.shell train/serve workflows
Route by task
| Task signal | Read |
|---|---|
| DataFrames, long dataframes, item/static/dynamic columns, list/file datasets, JSON Lines, optional Arrow, or train/test windows | sub-skills/data-pipelines/SKILL.md |
Transformation chains, time features, lag lists, missing-value indicators, samplers, or InstanceSplitter configuration |
sub-skills/transforms-features/SKILL.md |
| Estimator/Predictor concepts, local baselines, PyTorch estimators, forecast objects, persistence, CPU/GPU trainer kwargs | sub-skills/forecasting-models/SKILL.md |
make_evaluation_predictions, Evaluator, item metrics, aggregate metrics, backtesting, or gluonts.ev metric questions |
sub-skills/evaluation-backtesting/SKILL.md |
python -m gluonts, python -m gluonts.shell, SageMaker-style train/serve payloads, batch transform JSON Lines, or optional extension adapters |
sub-skills/deployment-extensions/SKILL.md |
| Cross-cutting install/import/data/backend problems | references/troubleshooting.md |
Common workflow skeleton
Use this sequence for end-to-end forecasting tasks:
- Build a dataset with
PandasDatasetorListDatasetusing the data-pipelines sub-skill. - Split the trailing horizon with
split(dataset, offset=-prediction_length)or a date-based split. - Add transformations/time features only when a model workflow requires manual preprocessing; many estimators construct their own transformations internally.
- Choose a local predictor for a quick baseline or a PyTorch estimator for learned global forecasting.
- Generate forecasts with
predictor.predict(...)ormake_evaluation_predictions(...). - Evaluate with
Evaluatororbacktest_metricsand inspect item metrics before trusting aggregates. - Persist or deploy only after the predictor and data schema are verified on a tiny local case.
Bundled checks
| Helper | Use |
|---|---|
scripts/check_gluonts_env.py |
Imports GluonTS core and selected optional extras; can report optional CUDA availability. |
sub-skills/data-pipelines/scripts/dataset_split_smoke.py |
Validates PandasDataset + split behavior on deterministic local data. |
sub-skills/transforms-features/scripts/transform_feature_smoke.py |
Validates missing-value indicators, time features, lags, and instance splitting. |
sub-skills/forecasting-models/scripts/predictor_persistence_smoke.py |
Serializes/reloads a local predictor and compares deterministic forecasts. |
sub-skills/forecasting-models/scripts/torch_forecast_smoke.py |
Checks PyTorch estimator construction and, when requested, a tiny bounded train/predict path. |
sub-skills/evaluation-backtesting/scripts/evaluate_synthetic_forecast.py |
Runs a deterministic forecast evaluation/backtest smoke and optional item-metrics CSV output. |
sub-skills/deployment-extensions/scripts/shell_payload_validator.py |
Validates SageMaker-style JSON inference payloads before shell/serve use. |
Boundaries and cautions
- CPU is sufficient for the verified required workflows. CUDA is optional acceleration for PyTorch training and must be probed before claiming GPU execution.
- MXNet workflows are legacy/unverified in this generated skill. If the user explicitly asks for MXNet, prepare a separate compatible environment and verify it before use.
- Optional adapters such as Prophet, R forecast, statsforecast, hierarchicalforecast, and rotbaum require their documented extras and sometimes external runtimes.
- Keep smoke tests deterministic and small. Avoid network datasets, benchmark-scale notebooks, Docker builds, AWS calls, long training, or credentialed services unless the user explicitly asks and the environment is prepared.
- Runtime guidance in this skill is self-contained. Do not require the original GluonTS repository files for ordinary package use.
04 同仓库更多 Skills
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.
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.
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.
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.
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.
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).