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 --help
autotrain api --help
autotrain 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/version returning the package version;
- training API route registration for
/ and /health without 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 --share requires NGROK_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, and MODEL.
- In hosted Spaces,
SPACE_ID activates 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.
1---2name: app-backends3description: "Operate AutoTrain Advanced FastAPI app/API, spacerunner, backend4 selection, auth, jobs, and safe route checks."5disable-model-invocation: true6metadata:7 source: https://skillmd.com/skills/vectorspacelab/app-backends8 disco-role: operating9 parent-skill: autotrain-advanced10license: Apache 2.011---1213# AutoTrain app, API, and backends1415Use 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.1617## Supported entry points1819- `autotrain app --help`20- `autotrain api --help`21- `autotrain spacerunner --help`22- FastAPI app object: `autotrain.app.app:app`23- Training API object: `autotrain.app.training_api:api`24- Backend keys from `autotrain.backends.base.AVAILABLE_HARDWARE`25- App parameter helper: `autotrain.app.params.get_task_params(task, param_type)`2627## Safe route checks2829Use the bundled script to probe importable app routes without starting uvicorn:3031```bash32python skills/disco/autotrain-advanced/sub-skills/app-backends/scripts/check_app_api.py33```3435Expected safe checks include:3637- main app `/` redirecting toward `/ui/`;38- main app `/api/version` returning the package version;39- training API route registration for `/` and `/health` without issuing requests to that app, because its lifespan hook starts training.4041## Backend families4243- Local: `local`, `local-cli`, `local-ui`44- Hugging Face Spaces: keys beginning with `spaces-`45- Hugging Face endpoints: keys beginning with `ep-`46- NVIDIA GPU Cloud: keys beginning with `dgx-`47- NVIDIA Cloud Functions: keys beginning with `nvcf-`4849Use the root `scripts/check_backends.py` helper to print the available key list from the installed package.5051## Auth and environment signals5253- `autotrain app --share` requires `NGROK_AUTH_TOKEN`.54- Hosted backends usually need a Hugging Face username/token and Hub-accessible artifacts.55- Training API startup logs environment-derived values such as `AUTOTRAIN_USERNAME`, `PROJECT_NAME`, `TASK_ID`, `DATA_PATH`, and `MODEL`.56- In hosted Spaces, `SPACE_ID` activates OAuth attachment for the main app.5758## References5960- `references/workflows.md` — CLI service commands and app/API probes.61- `references/backend-reference.md` — backend key families and when to use them.62- `references/troubleshooting.md` — auth, route, job, ngrok, and hosted backend issues.