runtraj.execution.BackendConfig#

class runtraj.execution.BackendConfig(*, cpus: Annotated[int, Ge(ge=1)] = 1, fetch: bool | runtraj.execution.config.FetchConfig = False) → None[source]#

A backend’s block under execution: the settings of one place a project runs.

LocalConfig, SlurmConfig and KubernetesConfig subclass it, and so does the block of a backend in another package (runtraj.execution.Backend). Every block has cpus, the releases a task runs at once, and fetch, whether the met files are got once before the releases run. tasks is how many tasks share the releases, and check() refuses a block its backend cannot run with.

Parameters#

Parameter

Description

Default

cpus

Releases a task runs at once.

1

fetch

Get the met files a met with download lacks once, before the releases run.

False

Attributes#

tasks

The number of tasks that share the releases (one, unless a subclass says more).

Methods#

check()

Raise ValueError when the block lacks a setting its backend needs.