Skip to main content

Module spec

Module spec 

Source
Expand description

The job envelope optimization.job/0.1: its types and rules, its input files, and the Request that also accepts the legacy format (the guide’s section Envelope).

Structs§

Input
A named input file of a job: an LP model, or data a registered model reads.
JobSpec
A job envelope optimization.job/0.1 (the guide’s section Envelope).
Limits
The time limits of a job.
Resources
The CPU slots of a job: outer_workers * inner_threads <= cpu_slots <= 1024 (the guide’s section Eight CPU slots).

Enums§

Request
A submitted job, in the current envelope or in the legacy format.

Constants§

MAX_INPUT_BYTES
The largest input file, 64 MiB.
PROTOCOL
The worker protocol of this build. It adds the result contract 0.2 (evidence, refutations, objective bounds and the infeasibility and certified claims) to the process protocol of 0.1.
PROTOCOLS
Worker protocols the runner accepts. Every 0.1 result record is a valid 0.2 record, so 0.1 workers keep working; a 0.1 runner rejects 0.2 workers at registration instead of failing on their journals.
SCHEMA
The schema version of the job envelope, the value of JobSpec::schema_version.

Functions§

checked_input
Reads input relative to base. Fails if its path leaves base, also through a symbolic link, if the file exceeds MAX_INPUT_BYTES, or if its SHA-256 differs from input.sha256.
protocol_supported
True if the runner accepts a worker that describes itself with protocol.
safe_name
True for a plain name of 1 to 80 bytes of ASCII letters, digits, -, _ and ., other than . and ... Worker IDs and the names of inputs, artifacts and work counters are safe names.
stage_inputs
Copies the inputs of s from from into to/inputs, each checked by checked_input and synced, and points each input’s file at its copy.