Saltar al contenido principal

Lightweight workbench flows

Small synchronous helpers in alphaswarm.ml.flows 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'

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

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