I've started using Dagster in our ML pipeline, and am running into some basic issues that I'm wondering if I'm missing something trivial here or if this is just how it is...
Say I have a simple ML pipepline:
Load raw data --> Process data into table --> Split train / test --> train model --> evaluate model.
A linear model is straight forward in Dagster. But what if I want to add a little loop, say for cross-validation purposes:
Load raw data --> Process data into table --> Split into k folds, and for each fold:
- fold 1: train model --> evaluate
- fold 2: train model --> evaluate
- fold 3: train model --> evaluate
--> summarize cross validation results.
Is there a nice & clean way to do this in Dagster? The way I've been doing things is:
Load raw data --> Process data into table --> Split into K folds --> choose fold k --> train model --> evaluate model
With the fold "k" as an input parameter for the pipeline. And then running the pipeline K times.
What am I missing here?