nemo_automodel.components.distributed.pipelining.media
nemo_automodel.components.distributed.pipelining.media
Consume explicitly staged pipeline media in microbatch order.
Module Contents
Classes
Functions
API
One microbatch’s views of staged image and video tensors.
Absent or empty staged tensors become None; every nonempty field aliases its staged tensor unchanged.
Per-image metadata with images on axis 0: patch grids [images, 2] (height, width) or [images, 3] (time, height, width), original sizes [images, 2], or per-patch positions [images, max_patches, 2].
Tensor of shape [batch] with each sample’s crop-patch count (Step3 stages one image per sample); it indexes patch_pixel_values and patch_newline_mask.
Tensor of shape [patches] marking patch-row newline positions.
Crop patches of shape [patches, channels, height, width], concatenated in image order.
Image pixels in processor layout with images or patches on axis 0: complete images [images, channels, height, width], padded patches [images, max_patches, features], flat patch rows [patches, patch_features], or patch-major [patches, channels, patch_height, patch_width].
Video pixels with patches on axis 0, e.g. flat patch rows [patches, patch_features] in video order.
Tensor of shape [videos, 3] storing each video’s (time, height, width) patch grid.
Advance staged media once, including for a text-only microbatch.
Parameters:
Pipeline stage carrying image/video chunk lists. Pixel tensors retain their image/patch-major layouts; metadata is [media, coordinates]. Optional patch pixels retain [patches, channels, height, width], patch counts [images], and newline masks [patches] for patch-based consumers.
Returns: VlmMediaChunk | None
The next chunk with original nonempty tensor views, or None when no media
Raises:
ValueError: If a media or grid list is exhausted before the schedule.