Configuration and behavior reference
This page lists every user-visible switch and the artifacts MatEnsemble writes, so you can debug a run without spelunking the source.
Pipeline constructor
basedir(optionalstr)If omitted, the workflow root directory is created under
pathlib.Path.cwd(). If provided, the stampedmatensemble_workflow-…directory is created inside this path. The parent of the stamped directory is what gets added toPYTHONPATHfor Python chores (see Design and execution model).
Pipeline.chore decorator factory
Each optional argument becomes part of Resources and affects the Flux jobspec.
nameIf set, chore IDs look like
chore-<name>-NNNN; otherwisechore-<funcname>-NNNN.num_tasks,cores_per_task,gpus_per_taskPassed directly to
flux.job.JobspecV1.from_command(). All must satisfy the validations inResources(for examplenum_tasks >= 1).mpiWhen true, MatEnsemble sets the Flux shell option
mpi=pmi2on the chorespec. Your MPI launcher and site modules must match what Flux expects.envExtra environment variables merged on top of the base environment. For Python chores, MatEnsemble also injects or prepends
PYTHONPATHpointing at the source root (parent of the workflow directory).inherit_envIf true (the default in code), the chorespec starts from
os.environin the submitting process and appliesenvoverrides; if false, only the keys inenvare sent (still including MatEnsemble’sPYTHONPATHtweaks for Python chores).
Nesting restriction: decorated callables must be module-level functions (or other importable
qualified names). Closures and nested defs raise ValueError because "<locals>" appears
in the qualified name.
Pipeline.exec
Creates a Chore with EXECUTABLE. The command
may be a string (split with shlex) or a pre-split argv list. No automatic PYTHONPATH injection
occurs unless you pass it through env. There is no dependency tracking for executable chores; use
a Python chore if you need DAG edges.
Pipeline.submit
write_restart_freq(intorNone; default100)After every N successful completions, strategies call
_make_restart(). Checkpointing is not implemented yet and the method raisesNotImplementedError. Until a release ships with working restart files, passwrite_restart_freq=Noneto disable this hook on long runs.buffer_time(float; default1.0)Passed to
concurrent.futures.wait()as thetimeoutwhen draining Flux futures; also used as atime.sleep()after each individual submission. Set to0.0for minimal spacing.log_delay(float; default5.0)The amount of time the logging thread will wait before updating the logs. Dafaults to every
5.0seconds.set_cpu_affinity/set_gpu_affinity(defaultTrue/False)Control Flux shell options
cpu-affinityandgpu-affinity(GPU option only applies when the chore requests GPUs).adaptive(defaultTrue)If true (and no custom
processing_strategyis given), useAdaptiveStrategyso newly ready chores can be submitted inside the completion loop. If false,NonAdaptiveStrategyonly drains futures.dynoproReserved flag threaded through to
run(); currently unused by the core manager loop. Prefer explicit mentions in release notes when this changes.processing_strategySupply your own
FutureProcessingStrategyto replace adaptive / non-adaptive selection entirely.dashboard(defaultFalse)When true, starts uvicorn on
0.0.0.0:8000serving the packaged static UI and JSON status (seematensemble.utils.setup_dashboard()).
status.json schema
Written atomically (temp file + rename) by StatusWriter. Keys:
Key |
Meaning |
|---|---|
|
Free Flux node count after draining broker rank 0. |
|
|
|
|
|
Chores waiting in ready + blocked queues (sum of not-yet-finished backlog). |
|
Chores with active Flux futures. |
|
Successful chore IDs recorded in order. |
|
Count of failures recorded in the manager. |
|
Current free resources as reported by Flux at the last loop iteration. |
The dashboard’s GET /api/status returns the same object, or zeros if the file is missing.
Per-chore artifacts
stdout/stderrStandard streams from Flux. MatEnsemble appends human-readable blocks to
stderrwhen futures raise Python exceptions or return non-zero shell exit codes.metadata.jsonDebug snapshot of id, chore_type, argv, resource struct, function import path, dependency IDs, and serialized arguments
chore.picklePickle written at submit time; the worker reloads this file.
result.picklePython return value. Downstream chores load
../<dep_chore_id>/result.pickleviamatensemble.runtime_worker._load_dep_result().
Failure reason strings (internal)
Recorded in _record_failure() entries:
chore_exceeds_allocation— resources larger than the Flux allocation; chore is skipped and dependents fail.submit_exception—submit()raised before a future was registered.exception— future completion raised (wrapper or process error surfaced as an exception).nonzero_exit:<rc>— future returned a non-zero integer exit code.dependency_failed— cascaded skip because an upstream chore failed.
Redis helper (optional)
matensemble.redis.service.RedisService can launch redis-server under flux run for streaming /
timeseries-style workflows. It is orthogonal to Pipeline and is mainly
used from dynamics/analysis integrations. There is no requirement to run Redis for basic DAG workflows.