Reads a platform-built dataset version into aligned Image, PictureIdentity and [BoundingBox] streams, with a fourth [String] stream naming each box's class. Use real training pictures as inputs to image editing while preserving their source clip and labels. Each process emits one pass, then stays alive and silent.
Typical backends
Select real training pictures of a class for mask-guided editing.
Caveats
- I/O contractBind the built version's archive file to
dataset, as a trainer receives its dataset. The platform mounts the unpacked bundle. COCO, YOLO and class-folder layouts use the same _pipelogic/images.jsonl index and record.json. An archive without the index is refused at startup as not built by the platform's builder. Missing records, malformed lines, invalid labels, duplicate paths, unsafe paths and archive-member symlinks stop startup, even in partitions excluded by the filters. Index and record errors name the file and physical line, and the image path when known. A missing file or open failure reports line 1. Image decoding errors name the image path. - I/O contractA version stored as a manifest of its files arrives as a small bundle listing every file by SHA-256; the platform sets
dataset_blobs_url and dataset_blobs_token for it. Before reading, the worker copies each listed file out of the team's dataset cache on the node, which the trainers' runs share, into a tree of its own, fetching the files the cache lacks and checking each one's size and SHA-256. The tree is then read exactly as an archive version's tree, and removed once the pass is emitted or the worker stops. An invalid manifest, a refused or failed fetch, or bytes that are not the listed file stop startup before any picture is emitted; no fetch is retried. An archive version is read in place, as before. - CostA manifest version's files the node's cache lacks are downloaded at startup, up to 16 at a time, and the run's tree takes the version's size again on disk beside the cache unless the file system shares extents. Least recently used cached files are evicted to keep the cache within its bound; a version larger than the bound is still read whole.
- I/O contractOnly record 3 is read, as the platform's builder and review derivation write it. Its labels are canonical objects in stored-image pixels: class_id is the export index of record.json's label_schema and class_uid must be that export class; a label's box is its box, else its bbox, else the bounds of its polygons or mask. A line's coordinate_space must be image_pixels. A filmed picture's frame_index, position_ns and sequence_index, and each ancestor's frame_index and position_ns, are canonical unsigned decimal strings, as every uint64 of the record is, so no identity loses precision in a JavaScript reader; numbers there stop startup. Records 1 and 2 stop startup: rebuild or derive the version to record 3 first.
- I/O contractOutputs 0 through 3 carry one message each per selected picture: BGR pixels, the original clip name, SHA-256, frame index and source time, the recorded made_id and crop_id, sequence and ancestors, every label as a pixel-corner box, and the corresponding class names in box order. Box IDs are export indices of record.json's label_schema, the positions of its class_names. The registered box carries an ID and confidence (a label's prediction score, 1 without one), with names on the fourth output. A label without geometry in a classification version covers the whole image; detection and segmentation labels must have geometry. Segmentation masks and review history are not output ports.
- I/O contractPixels, recorded dimensions and boxes use encoded image coordinates. JPEG EXIF orientation is ignored: the reader does not rotate or mirror pixels into display orientation. Boxes stay aligned with the stored pixels.
- Parameter interaction
classes selects images without removing labels; Nothing includes unlabelled images and Just [] selects none. Names absent from the version match nothing. split and made combine by intersection. Made status is exactly nonempty made_id. Every line flag must agree; a source marked made must contain only made pictures. Mixed sources are supported. All summaries are checked before filters; replay never recomputes hashes or graph lineage. - I/O contractA filmed picture's line carries made_id and crop_id strings and every ancestor names both. Its clip_name is descriptive: the builder omits an empty one, emitted as an empty clip_name. Durable IDs, sequence_id, sequence_index and source time are copied unchanged. sequence_index is a UInt64 fixed-point coordinate (output ordinal times 2^32 for new clips). Real endpoints have empty sequence_id and zero index; made intermediates in real footage have empty sequence_id and fractional index below 2^32. An uploaded picture's line names no clip and no identity field: a selected one is emitted as its own one-frame clip, clip_sha256 the SHA-256 of its bytes, clip_name its path, frame and time 0, empty IDs, sequence and ancestors. A selected uploaded picture its line or source marks made fails startup, since it has no made_id to keep it made. The flat derived_from array is an ordered set of at most 64 known ancestor keys and times, all immediate parents first, then their histories in input order. Self references, repeated keys, invalid fields, nested objects and overflow fail before filtering. Each position emits this set unchanged in ancestors; descriptive parent paths stay in the saved record. The reader mints only a fresh transient pass_id per traversal. Empty IDs mean real and whole respectively; nonempty IDs must be canonical lowercase, non-nil UUIDv4. Old records, missing IDs and removed integer fields fail before filtering. The reader never assigns or repairs durable identity. The builder must resolve every made or cropped parent from incoming or team-saved records; filmed whole-frame parents need no saved record. Replay has no team-store access and permits empty external paths, including made parents resolved at build time. Every parent present locally is checked before filtering for matching key, path, time and inherited ancestry.
- Hard constraintEvery image in the archive must have a distinct complete key of clip SHA-256, frame index, made_id and crop_id. Duplicate keys fail before filtering and name both paths. Reused made IDs must agree on root and frame; reused crop IDs must agree on parent. Crops of made pictures retain both IDs.
- State lifetimeSelected images are sorted by their complete key: clip SHA-256, frame index, made_id, crop_id. This is the order
resume_after and the platform's proposal runs count in; it is a deterministic replay order, not the order pictures were made in, and the fresh pass_id resets arrival-order sampling regardless of UUID order. A feeder reads and decodes behind the virtual input; the graph function emits only prepared messages. At most one prepared picture waits for graph delivery before the next file is read. After the last picture the stream stays open and silent until the deployment stops. An empty selection stays silent from startup. There is no looping, pacing or end-of-stream signal: a source closing its stream would make downstream containers exit and fail the deployment. One pass prevents repeated image edits; saved shards compare repeats in open or committing shards, and a version build rejects duplicate complete picture keys. A fresh process replays the selection from resume_after, so restarting an editing run can generate the same edits again; a proposal sink drops the repeats of what its container already committed. - Hard constraintThe deployment owner must track downstream completion and stop the deployment after all expected results are saved. Consumers that wait for end of input will wait indefinitely. In a dataset-shard flow, inactivity commits the open shard and stopping the deployment starts its closing-shard commit; wait for image editing and saving to finish before stopping.
- CostExhaustion leaves the deployment running and potentially billable until it is stopped. The idle reader emits no further messages and does not repeat expensive downstream work.
- Hard constraintFile and decode failures stop the worker without retries or skipped images. Pictures already delivered stay delivered if a later file fails. Shutdown releases a feeder waiting for graph delivery, but filesystem calls, a running decode and the startup scan finish before the feeder can stop. The bound bundle must stay unchanged: identities are rechecked by index offset; only an uploaded picture, whose identity is its bytes, is hashed again to detect changed bytes.
- CostStartup scans the index once, checking each line and referenced file, and reads every selected uploaded picture whole to hash it. A line is limited to 16 MiB, matching the platform record format; longer lines fail with the index path and line number. Opinions and unused history are parsed without retaining their JSON trees; a line keeps its labels' box, bbox, polygons and mask while it is read. Labels are checked and discarded per line, then reread by byte offset for each emitted picture. Startup memory grows with all paths and set overhead for duplicate detection, selected path bytes and sort keys, class/source metadata, and one bounded line's parsing workspace. After startup only selected paths, sort keys and offsets plus class metadata remain; the feeder adds one line, its labels and pixels and one prepared picture pending delivery. Runtime queues and downstream outputs also consume memory. Sorting is not constant-memory: very large selections or path inventories can still exceed available RAM. A selected image that cannot be decoded or whose dimensions differ from its record stops the worker with its path; no file is silently skipped.
- I/O contractStartup hashes every selected uploaded picture, and each is hashed again when it is emitted, so changed bytes stop the worker. Two selected uploaded pictures of the same bytes are one frame and refuse the selection, naming both paths. A review mark names a decision or a basis.
- Parameter interaction
split all reads the train, valid and test partitions together. resume_after Just (clip_sha256, frame_index, made_id, crop_id) keeps only the selected pictures whose key comes strictly after it in emission order, so a proposal run restarted from the last picture it accounted for goes on where it stopped; the bound need not name a picture of the version, but its clip_sha256 must be 64 lowercase hex digits and its IDs empty or canonical UUIDv4s. The refusals of selected uploaded pictures (made, or two of the same bytes) apply only to the pictures after the bound. Line validation still covers the whole index. - Parameter interaction
pictures Just [(clip_sha256, frame_index, made_id, crop_id), ...] reads only the listed pictures of the version, each named by the same key as resume_after and the PictureIdentity this reader emits; an uploaded picture's key is the SHA-256 of its bytes, frame_index 0 and empty made_id and crop_id. They come out in the usual emission order, never the order of the list. Nothing, the default, reads every selected picture; Just [] reads none. It combines by intersection with split, classes, made and resume_after: the listed pictures after the resume bound are emitted. A listed key that is not a picture the version holds among those split, classes and made select fails startup before any picture is emitted, naming the key as pictures names ("clip_sha256", frame_index, "made_id", "crop_id"), which the version does not hold among the pictures split, classes and made select. A key listed twice or malformed (clip_sha256 not 64 lowercase hex digits, an ID neither empty nor a canonical UUIDv4) fails startup the same way; a listed key at or before the resume_after bound is held and left out. The whole index is still validated at startup, and the list is held in memory, so a long list costs memory in proportion to its length.