Skip to content

analysis_submission

Pydantic models for the analysis submissions from the API --> AnalysisController.

AnalysisSubmission pydantic-model

Bases: AnalysisRequest

Analysis submission information.

Fields:

Validators:

analysis_hours pydantic-field

The number of hours of signal that were processed by the analysis. This is used for cost estimation and setting usage limits.

container_image pydantic-field

The full image name of the container to be used for the analysis including registry, repository, and tag.

docker_volumes pydantic-field

The volumes to be mounted in the docker container. The keys are the host paths or docker volume names and the values are dictionaries with parameters 'bind' and 'mode'.

id pydantic-field

Unique identifier of the analysis

manifest pydantic-field

The document the container receives: inputs by path with their description, the resolved channels, slots, typed parameters, the resource claim and the output path. The container reads this and nothing else.

max_sample_rate_hz = None pydantic-field

Maximum NATIVE sample rate (Hz) across the resolved channel selection. Feeds the per-kHz term of the memory formula (see ResourceRequirements) so recordings sampled above an analysis's working rate are provisioned proportionally more memory. Always populated on submissions built by the current api-server (every ingested channel carries a sample rate — EDF is the only supported format and its parser computes the rate from required header fields). Optional ONLY so that submissions persisted as JSONB before this field existed still validate when re-dispatched after deploy (e.g. an analysis queued on unresolved dependencies); consumers must substitute a conservative assumed rate for None rather than 0, which would silently under-size the claim.

priority = 0 pydantic-field

Priority of the analysis. Higher priority analyses are executed first.

remote_file_mappings pydantic-field

A list of remote file mappings for the analysis submission. The mappings specify how the input and output files should be mapped to/from the local file system of the analysis container.

resolved_resources = None pydantic-field

The resource claim resolved for THIS submission from resource_requirements and the submission's hours, resolved channel count and native sample rate. Resolved once at submission so the container's memory hint and the orchestrator's cgroup ceiling are two renderings of one number rather than two independent derivations. Optional ONLY so that submissions persisted as JSONB before this field existed still validate when re-dispatched after deploy (e.g. an analysis queued on unresolved dependencies); consumers must fall back to deriving the claim from the coefficients for None rather than treating it as a zero claim, which would leave the analysis unbounded.

resource_requirements pydantic-field

The resource requirement COEFFICIENTS for the analysis, snapshotted from the analysis config at submission so a later re-calibration cannot rewrite what an existing analysis ran under. These are rates; resolved_resources holds the quantities they produced for this submission.

DockerVolumeDict pydantic-model

Bases: BaseModel

A dictionary with the parameters 'bind' and 'mode' for a docker volume.

Fields:

bind pydantic-field

The path on the host machine to be mounted in the docker container.

mode pydantic-field

The mode in which the volume is mounted in the docker container.

RemoteFileMapping pydantic-model

Bases: BaseModel

Represents a remote file mapping for the analysis submission.

A remote file mapping is used to map how a remotely located input or output file should be mapped to/from the local file system of the analysis container by a controller.

For instance, an input file may be stored in s3 and should be downloaded to the local file system of the analysis container before the analysis is run. The output file of an analysis may similarly be requested to be stored in s3 after the analysis is run.

Fields:

Validators:

container_path pydantic-field

The path in the container where the file should be mounted. This is the path where the file will be available in the analysis container. Can be absolute or relative.

remote_url pydantic-field

The URL to the original file location. Must be an https, s3 bucket or file URL.

size_bytes = None pydantic-field

Size of the remote file in bytes, when known at submission build time. Lets consumers (disk-space planning, runners) skip a per-file storage lookup. None when unknown — e.g. output files that do not exist yet.

type pydantic-field

The type of the file mapping. Can be either 'input' or 'output'. Input files must be downloaded before the analysis is run and mounted in the container. Output files must be uploaded after the analysis is run.

validate_remote_url(url) pydantic-validator

Validate the remote URL to ensure it is a s3 URL (currently only supported scheme).

ResolvedResourceClaim pydantic-model

Bases: BaseModel

The resources one submission claims, resolved once, in canonical MiB.

:class:ResourceRequirements carries the coefficients; this carries the numbers those coefficients produce for a particular submission's hours, channel count and native sample rate. Every field is a resolved quantity, not a rate.

The claim is consumed twice, in different units: the container is told what to budget for itself (in MiB, in the manifest's resources), while the orchestrator enforces a ceiling (a cgroup, in MB). Both are rendered from this one resolved claim.

The disk figure is kept only here, because the container is never given one.

Fields:

Validators:

  • _one_cpu_unit

cpu_cores = None pydantic-field

Whole CPU cores reserved for the run; rendered to the container as --cpus and the thread-count environment variables, and to the orchestrator as its CPU reservation. None only on claims persisted before the unit changed from MHz, which carry cpu_mhz.

cpu_mhz = None pydantic-field

Legacy CPU floor in MHz on claims persisted before cores became the unit. Not written by current versions; read only to re-dispatch an old submission.

disk_mib pydantic-field

Resolved disk in MiB — output artifacts plus the input files that must be materialised into the runtime. Never passed to the container, which is why this model exists.

gpu_memory_mib = 0 pydantic-field

Resolved peak GPU memory in MiB. 0 when no GPU is claimed.

gpus = 0 pydantic-field

Number of GPUs claimed. 0 when the analysis runs on CPU.

system_memory_mib pydantic-field

Resolved peak system memory in MiB. Rendered to the container as its memory hint and to the orchestrator as the cgroup ceiling; under-claiming this is what gets an analysis OOM-killed.

wall_clock_seconds = None pydantic-field

How long this run may take before the platform stops it, resolved at submission from the platform's default for the recording's length and the configuration's ceiling, whichever is higher. None on a submission that predates the bound.