neuralset.base.Chain¶
- pydantic model neuralset.base.Chain[source][source]¶
A sequence of processing steps executed in order.
A
Chaingroups multipleStepobjects (such asStudyandEventsTransform) into a single cohesive pipeline. Because aChainis itself aStep, it can be nested inside other chains or used anywhere aStepis expected. When you call.run(), it passes the output of each step as the input to the next.- Parameters:
steps (list of Step or dict of str to Step) – The ordered sequence of steps to execute. Pydantic will coerce each entry from a dict (strongly recommended over instantiated objects for simplicity).
infra (exca.steps.Backend, optional) – Caching and execution infrastructure inherited from
Step. If provided, it determines how the final output of the chain is cached (e.g. using theCachedbackend) or executed remotely (e.g. viaSlurm).
Examples
chain = ns.Chain(steps=[ {"name": "MyStudy", "path": "/data", "infra": {"backend": "Cached", "folder": "/cache"}}, {"name": "QueryEvents", "query": "timeline_index < 5"}, ]) events = chain.run()