stilt.Model#
- class stilt.Model(project: str | pathlib.Path | None = None, receptors: stilt.receptors.Receptor | collections.abc.Iterable | str | pathlib.Path | None = None, config: stilt.config.model.ModelConfig | None = None, output_dir: str | pathlib.Path | None = None, compute_root: str | pathlib.Path | None = None, runtime: stilt.config.runtime.RuntimeSettings | None = None, **kwargs)[source]#
Science-facing STILT project interface.
Modelis the primary Python entry point for configuring a STILT project, running one-off simulations, and loading simulation results. It also owns the output project index used by batch, HPC, and cloud execution.Pull-mode workers and streaming consumers operate against the model’s output index directly when the configured index supports claims. Claim-worker control is exposed primarily through the CLI and
stilt.execution.pull_simulations()for advanced Python use.
Parameters
projectstr or Path or None, optionalLocal project root or cloud URI used to identify the model.
receptorsReceptor or iterable or str or Path or None, optionalIn-memory receptors or a path to a receptor CSV.
configModelConfig or None, optionalIn-memory project config. When omitted, config is loaded lazily from storage.
output_dirstr or Path or None, optionalOutput root. Defaults to
project.compute_rootstr or Path or None, optionalLocal parent directory where worker simulation directories are created.
runtimeRuntimeSettings or None, optionalRuntime-only deployment settings such as cache roots and DB URLs.
**kwargsForwarded to
ModelConfigwhen config is not provided. Any validModelConfigfield name is accepted (e.g.n_hours=-48,numpar=500). Mutually exclusive with config — passing both raisesTypeError.
Methods#
|
Persist model inputs and register one batch of pending work. |
|
Register pending work and start workers to drain it. |
Return grouped aggregate counts for each registered scene. |
|
|
Return cheap aggregate counts for the current project registry. |
Attributes#
|
Project |
|
Footprint accessor namespace for named footprint outputs. |
|
Output simulation registry for this model. |
|
Named met streams, resolved from config. |
|
Plotting namespace for this model (e.g. |
|
Sequence-like receptor accessor for this project. |
|
Lazy simulation collection for registered simulations. |
|
Trajectory accessor for querying and loading simulation outputs. |