runner
¶
Classes:
StageRunner
¶
StageRunner(
skills: list[Skill] | None = None,
registry: SkillRegistry | None = None,
)
Each stage can be run independently, at any time, by any actor.
The primary API is run() for single-stage execution.
run_many() is a convenience for sequential batch execution.
attributes:
_skills:
type: list[Skill]
_registry:
description: Value for _registry.
_disabled_skill_names:
type: set[str]
Methods:
-
check_requirements– -
disabled– -
register– -
run– -
run_many– -
run_session–
Attributes:
Source code in src/hiperhealth/pipeline/runner.py
check_requirements
¶
check_requirements(
stage: str,
session: Session,
*,
disabled_skills: str | Collection[str] | None = None,
**kwargs: Any,
) -> list[Inquiry]
Builds a PipelineContext from the session, calls
skill.check_requirements() for every skill registered
on the given stage, and records events in the session file.
Inquiries are returned with three priority levels:
- required: must have before this stage can run
- supplementary: improves results, available now
- deferred: only available after a future pipeline step
parameters:
stage:
type: str
session:
type: Session
disabled_skills:
type: str | Collection[str] | None
kwargs:
type: Any
variadic: keyword
returns:
type: list[Inquiry]
Source code in src/hiperhealth/pipeline/runner.py
disabled
¶
Disabled skills stay registered and installed, but are skipped during runner operations while the context is active. parameters: skill_names: type: str | Collection[str] returns: type: Iterator[None]
Source code in src/hiperhealth/pipeline/runner.py
register
¶
Looks up the skill in the attached SkillRegistry using either a
built-in name, a canonical channel skill id such as
tm.ayurveda, or a legacy installed skill name; then it
instantiates the skill and adds it to the execution list.
Pass index to control execution order.
parameters:
name:
type: str
index:
type: int | None
Source code in src/hiperhealth/pipeline/runner.py
run
¶
run(
stage: str,
ctx: PipelineContext,
*,
disabled_skills: str | Collection[str] | None = None,
**kwargs: Any,
) -> PipelineContext
Extra keyword arguments (e.g. llm, llm_settings)
are stored in ctx.extras['_run_kwargs'] so skills can
access them.
parameters:
stage:
type: str
ctx:
type: PipelineContext
disabled_skills:
type: str | Collection[str] | None
kwargs:
type: Any
variadic: keyword
returns:
type: PipelineContext
Source code in src/hiperhealth/pipeline/runner.py
run_many
¶
run_many(
stages: list[str],
ctx: PipelineContext,
*,
disabled_skills: str | Collection[str] | None = None,
**kwargs: Any,
) -> PipelineContext
Source code in src/hiperhealth/pipeline/runner.py
run_session
¶
run_session(
stage: str,
session: Session,
*,
disabled_skills: str | Collection[str] | None = None,
**kwargs: Any,
) -> Session
Builds a PipelineContext from the session, runs the stage
with the existing run() method, then writes results
back to the session parquet.
parameters:
stage:
type: str
session:
type: Session
disabled_skills:
type: str | Collection[str] | None
kwargs:
type: Any
variadic: keyword
returns:
type: Session