app-backends
Operate AutoTrain Advanced FastAPI app/API, spacerunner, backend selection, auth, jobs, and safe route checks.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- app-backends
- license
- Apache 2.0
- metadata
- { "disco-role": "operating", "parent-skill": "autotrain-advanced" }
- description
- Operate AutoTrain Advanced FastAPI app/API, spacerunner, backend selection, auth, jobs, and safe route checks.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/backend-reference.md1.4 KB
- 参考文档references/troubleshooting.md1.9 KB
- 参考文档references/workflows.md2.0 KB
- 脚本scripts/check_app_api.py2.8 KB
03 SKILL.md 正文
AutoTrain app, API, and backends
Use this sub-skill for the local UI, training API, Space runner, backend keys, hosted backend auth, job/log inspection, and app/API task parameter routing.
Supported entry points
autotrain app --helpautotrain api --helpautotrain spacerunner --help- FastAPI app object:
autotrain.app.app:app - Training API object:
autotrain.app.training_api:api - Backend keys from
autotrain.backends.base.AVAILABLE_HARDWARE - App parameter helper:
autotrain.app.params.get_task_params(task, param_type)
Safe route checks
Use the bundled script to probe importable app routes without starting uvicorn:
python skills/disco/autotrain-advanced/sub-skills/app-backends/scripts/check_app_api.py
Expected safe checks include:
- main app
/redirecting toward/ui/; - main app
/api/versionreturning the package version; - training API route registration for
/and/healthwithout issuing requests to that app, because its lifespan hook starts training.
Backend families
- Local:
local,local-cli,local-ui - Hugging Face Spaces: keys beginning with
spaces- - Hugging Face endpoints: keys beginning with
ep- - NVIDIA GPU Cloud: keys beginning with
dgx- - NVIDIA Cloud Functions: keys beginning with
nvcf-
Use the root scripts/check_backends.py helper to print the available key list from the installed package.
Auth and environment signals
autotrain app --sharerequiresNGROK_AUTH_TOKEN.- Hosted backends usually need a Hugging Face username/token and Hub-accessible artifacts.
- Training API startup logs environment-derived values such as
AUTOTRAIN_USERNAME,PROJECT_NAME,TASK_ID,DATA_PATH, andMODEL. - In hosted Spaces,
SPACE_IDactivates OAuth attachment for the main app.
References
references/workflows.md— CLI service commands and app/API probes.references/backend-reference.md— backend key families and when to use them.references/troubleshooting.md— auth, route, job, ngrok, and hosted backend issues.
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).