Saltar al contenido principal

Lightweight workbench flows

Small synchronous helpers in alphaswarm_models.flows (the alphaswarm_models sibling repo — conceptually still "alphaswarm.ml") that let users iterate on a dataset without spinning up a full Experiment. Surfaced at POST /ml/flows/{flow}/preview, POST /ml/flows/{flow}/preview-task (Celery), and GET /ml/flows (catalog).

Catalog​

FlowPurposeBackend
linearRidge / Lasso / ElasticNet / BayesianRidge with IC + RMSE / MAEsklearn
decompositionSTL trend / seasonal / residualstatsmodels
forecastProphet / sktime-naive / ARIMA / ETS / Theta / AutoARIMAmixed
regression_diagnosticsOLS coef table, R^2, F-stat, Durbin-Watsonstatsmodels
unit_rootADF / KPSS unit-root testsstatsmodels
acf_pacfAuto- and partial-autocorrelation seriesstatsmodels
granger_causalityGranger causality between two columnsstatsmodels
cointegrationEngle-Granger pair cointegrationstatsmodels
garchGARCH(p, q) volatility model + horizonarch
change_pointPELT / RBF kernel change pointsruptures
clusteringKMeans / DBSCAN / HDBSCAN on the feature matrixsklearn / hdbscan
pca_summaryPCA variance + factor loadingssklearn

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'

Web UI​

The ML Experiment Builder (/ml/builder, in the alphaswarm_client repo) currently does not ship an "Interactive Workbench" drawer on its toolbar — see alphaswarm_docs/ml-builder.md for its current canvas and dispatch behaviour. This catalog's REST surface (GET /ml/flows, POST /ml/flows/{flow}/preview[-task]) is still live and usable directly.

Tutorials​

(These live in the alphaswarm_models repo's configs/tutorials/, not the monolith's configs/.)

Adding a new flow​

  1. Implement run_<flow>_flow(...) in alphaswarm_models/flows.py returning a FlowResult.
  2. Add a dispatch branch in run_flow(flow, payload).
  3. Add an entry in list_flows() so any form built from GET /ml/flows reflects the new parameters automatically.
  4. (Optional) Wrap as a notebook helper in alphaswarm_models/adhoc/.