Lightweight workbench flows
Small synchronous helpers in
alphaswarm.ml.flowsthat let users iterate on a dataset without spinning up a fullExperiment. Surfaced atPOST /ml/flows/{flow}/preview,POST /ml/flows/{flow}/preview-task(Celery), andGET /ml/flows(catalog).
Catalog
| Flow | Purpose | Backend |
|---|---|---|
linear | Ridge / Lasso / ElasticNet / BayesianRidge with IC + RMSE / MAE | sklearn |
decomposition | STL trend / seasonal / residual | statsmodels |
forecast | Prophet / sktime-naive / ARIMA / ETS / Theta / AutoARIMA | mixed |
regression_diagnostics | OLS coef table, R^2, F-stat, Durbin-Watson | statsmodels |
unit_root | ADF / KPSS unit-root tests | statsmodels |
acf_pacf | Auto- and partial-autocorrelation series | statsmodels |
granger_causality | Granger causality between two columns | statsmodels |
cointegration | Engle-Granger pair cointegration | statsmodels |
garch | GARCH(p, q) volatility model + horizon | arch |
change_point | PELT / RBF kernel change points | ruptures |
clustering | KMeans / DBSCAN / HDBSCAN on the feature matrix | sklearn / hdbscan |
pca_summary | PCA variance + factor loadings | sklearn |
REST surface
# List every flow + its parameter schema
curl http://localhost:8000/ml/flows | jq
# Sync run a flow
curl -XPOST http://localhost:8000/ml/flows/linear/preview \
-d '{"dataset_cfg": {...}, "estimator": "ridge", "alpha": 1.0}' \
-H 'content-type: application/json'
# Background run via Celery (returns TaskAccepted)
curl -XPOST http://localhost:8000/ml/flows/garch/preview-task \
-d '{"dataset_cfg": {...}, "column": "close", "p": 1, "q": 1, "horizon": 10}' \
-H 'content-type: application/json'
Webui workbench drawer
The ML Experiment Builder
(/ml/builder) ships an
"Interactive Workbench" drawer on its toolbar. Pick a flow, fill in
the per-flow form (auto-generated from GET /ml/flows), and submit —
the result table renders inline so you never leave the canvas.
Tutorials
Adding a new flow
- Implement
run_<flow>_flow(...)inalphaswarm/ml/flows.pyreturning aFlowResult. - Add a dispatch branch in
run_flow(flow, payload). - Add an entry in
list_flows()so the webui form reflects the new parameters automatically. - (Optional) Wrap as a notebook helper in
alphaswarm/ml/adhoc/.