Skip to content

API reference

Auto-generated from source docstrings. The three entry points below cover most use; every task-type spec lives in sweep_tasks.schemas.

Runner

sweep_tasks.runner.TaskRunner

Bases: sweep_tasks.tasks.forward.ForwardRunnerMixin, sweep_tasks.tasks.fwi_freqsel.FreqselRunnerMixin, sweep_tasks.tasks.fwi.FWIRunnerMixin, sweep_tasks.tasks.fwi_plan_streaming.PlanStreamingFWIMixin, sweep_tasks.tasks.rtm.RTMRunnerMixin, sweep_tasks.tasks.lsrtm.LSRTMRunnerMixin

Synchronous local task runner. One-shot: instantiate and call .run(spec).

YAML I/O

sweep_tasks.yaml_io.load_task

load_task(path: str | Path) -> TaskSpec

Load and validate a task spec from a YAML file.

Raises pydantic.ValidationError on schema errors.

sweep_tasks.yaml_io.dump_task

dump_task(spec: Annotated, path: str | Path) -> Path

Serialise a task spec back to YAML.

Task schema (example)

sweep_tasks.schemas.FWISpec

Bases: sweep_tasks.schemas.BaseTaskSpec

model_config class-attribute

model_config = {'extra': 'forbid'}

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)