Make the example's __main__ actually run

It claimed to run the pipeline with no engine involved, and could not: the
node bodies it called save and load artifacts, which raise outside a node by
design. Each node is now a thin wrapper over a plain function — make_rows,
train_curve, score — and __main__ calls those, which is the split the sandbox
already demonstrates and the one worth copying.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-26 22:57:36 +02:00
co-authored by Claude Opus 5
parent 4f3eaf950c
commit 8f71b638b6
5 changed files with 45 additions and 19 deletions
+7 -4
View File
@@ -1,7 +1,10 @@
"""A research package that knows nothing about Fluksio, except where it says so.
Everything here is ordinary Python: `prepare`, `fit` and `evaluate` are called
directly by `python -m myresearch.pipeline`, and the decorators on them only
say what a node of each would look like. `fluksio sync examples/myresearch` is
what turns that into a flow.
Each node is a thin wrapper over a plain function: `prepare` stores what
`make_rows` made, `fit` yields what `train_curve` computed, `evaluate` reports
what `score` worked out. That split is the point — `fluksio.save_artifact` and
`load_artifact` only work *inside* a node, so a body calling them cannot be run
by hand, while `python -m myresearch.pipeline` runs the arithmetic beside them
with no engine anywhere. `fluksio sync examples/myresearch` is what turns the
wrappers into a flow.
"""