moruna.run#
moruna.run(
source, kernels, sink, *, budget=None, cpu=None, trace=None,
staging_dir=None, staging_limit=None, on_error="terminate",
ordered=False, sizer="rule", profiles_dir=None, storage=None,
host_profile=None, allow_gil=False, checkpoint=True,
checkpoint_interval=5.0, keep_checkpoint=False, resume=None,
) -> moruna.RunReport
Runs the source through each kernel and writes results to the sink. kernels may be one kernel or a list in execution order. A plain callable is wrapped with the defaults of moruna.kernel; an empty list copies the source.
Parameter |
Type and default |
Meaning |
|---|---|---|
|
source handle, required |
Built-in source or |
|
kernel or list, required |
|
|
sink handle, required |
Built-in sink or |
|
|
Whole-process memory ceiling in bytes or a size string such as |
|
|
CPU quota; |
|
|
File or directory for a per-morsel trace. |
|
|
Directory for staged data and checkpoints. |
|
|
Maximum staging bytes; default is 20% of available space. |
|
|
|
|
|
Deliver results to the sink in source order. |
|
|
|
|
|
Profile directory; defaults to |
|
|
Connection settings for remote object-store URLs. |
|
|
Reserved. A non- |
|
|
Permit Python kernels on a GIL-enabled interpreter. |
|
|
Write checkpoints while running. |
|
|
Seconds between checkpoints. |
|
|
Keep checkpoint files after success. |
|
|
|
Returns: RunReport. Raises: ConfigError, PlanError, BudgetError, KernelError, IoError, ResumeError, or Cancelled as appropriate. Runtime exceptions may carry a partial report. Size strings accept binary units (KiB through TiB) and decimal units (KB through TB). Numeric values outside supported ranges may be clamped; report.notes records the change.
import moruna
report = moruna.run(
moruna.ParquetSource("orders.parquet", columns=["order_id", "amount"]),
[moruna.std.filter("amount > 0")],
moruna.ParquetSink("clean-orders"),
budget="2GiB",
)
print(report.run_id, report.stages[0]["rows_out"])