fedformer
Routes FEDformer training, comparison, and sweep workflows for the FEDformer subrepo, including Fourier and Wavelets variants, model-selection knobs, and the bundled CUDA smoke check.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- fedformer
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Routes FEDformer training, comparison, and sweep workflows for the FEDformer subrepo, including Fourier and Wavelets variants, model-selection knobs, and the bundled CUDA smoke check.
- disable-model-invocation
- true
02 资源文件 7
- 参考文档references/cli-reference.md6.3 KB
- 参考文档references/data-layout.md2.3 KB
- 参考文档references/model-overview.md4.2 KB
- 参考文档references/troubleshooting.md4.9 KB
- 参考文档references/workflows.md5.1 KB
- 脚本scripts/run_fedformer.py2.5 KB
- 脚本scripts/smoke_fedformer.py3.8 KB
03 SKILL.md 正文
FEDformer
Use this route when the task is about the FEDformer subrepo entry point FEDformer/run.py, the FEDformer model stack in FEDformer/exp, FEDformer/models, FEDformer/layers, FEDformer/utils, or the FEDformer sweep scripts.
Natural triggers:
- FEDformer
- Fourier
- Wavelets
mode_selectmodesLbasecross_activation- compare FEDformer against Autoformer, Informer, or Transformer within this subrepo
What this sub-skill covers
- The native CLI in
FEDformer/run.py. - The FEDformer architecture variants implemented in
FEDformer/models/FEDformer.py. - The exp, layer, and utility trees that support training, testing, and prediction.
- Dataset loading and shape alignment for the FEDformer entry point.
- The sweep patterns encoded in
FEDformer/scripts/LongForecasting.shandFEDformer/scripts/LookBackWindow.sh. - CUDA-only smoke validation for the Fourier or Wavelets path.
What it does not cover
- The repo-wide Linear, DLinear, and NLinear benchmark routes.
- Statistical baseline workflows.
- Pyraformer workflows.
- Maintainer-only or release-only tasks.
If the user really means the root long-forecasting benchmark, the statistical baselines, or Pyraformer, route them to the sibling route for that workflow instead of staying here.
Start here
Read these bundled files first:
scripts/run_fedformer.pyfor a safe wrapper that resolves a checkout and builds a FEDformer command.scripts/smoke_fedformer.pyfor a tiny CUDA forward pass on synthetic data.references/cli-reference.mdfor the FEDformer CLI flags and the arguments that matter most.references/model-overview.mdfor Fourier vs. Wavelets, embedding choices, and comparison guidance.references/data-layout.mdwhen the CSV format, split rule, or channel counts are unclear.references/workflows.mdfor one-off runs, sweep recipes, and comparison loops.references/troubleshooting.mdwhen the run fails, the parser defaults look suspicious, or the dataset layout does not match.
Environment expectations
This route is verified for a CUDA build of PyTorch 1.9.0+cu111 on GPU hardware.
Wavelets also needs sympy, einops, and scipy in addition to the standard FEDformer stack.
Common decisions
- Use
--model FEDformerfor the FEDformer family. - Use
--version Fourierwhen you want mode selection over frequency bins. - Use
--version Waveletswhen you want the multiresolution branch withL,base, andcross_activation. - Use
--model Autoformer,Informer, orTransformeronly when the comparison is still anchored in this subrepo. - Keep the dataset, lengths, and feature mode fixed when comparing model families.
- Leave the
--moving_avgparser default alone unless you are programmatically building a real Python list.
Key runtime outputs
A successful run usually writes checkpoints and evaluation artifacts under the current working directory, including:
checkpoints/<setting>/checkpoint.pthresults/<setting>/metrics.npyresults/<setting>/pred.npyresults/<setting>/true.npytest_results/<setting>/
Troubleshooting shortcut
Before debugging a failed FEDformer run, check these first:
- CUDA is available in the active environment.
--modelis set explicitly; the parser default is not a valid FEDformer family member.root_path,data_path,features, and channel counts match the dataset.- You are not relying on the pred-only or test-only path without checking its caveats.
- The version-specific knobs match the selected
--version.
See references/troubleshooting.md for the full failure map.
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).