vllm.distributed.ec_transfer.ec_connector.utils ¶
EC connector helper utilities.
Classes:
-
ECOutputAggregator–Merge every worker's EC connector output onto the single
-
PlaceholderMetadataResolver–Resolves which processed keys a model needs published per modality.
Functions:
-
collect_ec_item_metadata–Build one
ec_transfer_paramsentry per feature forrequest_finished().
ECOutputAggregator ¶
Merge every worker's EC connector output onto the single ModelRunnerOutput that reaches the scheduler.
Mirrors KVOutputAggregator: only output_rank's output is returned to the scheduler, but the EC connector may have run on any rank.
Source code in vllm/distributed/ec_transfer/ec_connector/utils.py
PlaceholderMetadataResolver ¶
Resolves which processed keys a model needs published per modality.
Reads MultiModalDataParser.embedding_fields, the same declaration the consumer's parser requires, so the two cannot drift. An empty set means the modality cannot be delivered out of band, and the consumer will process the media itself.
Source code in vllm/distributed/ec_transfer/ec_connector/utils.py
collect_ec_item_metadata(mm_features, resolver) ¶
Build one ec_transfer_params entry per feature for request_finished().
Keyed by mm_hash, each entry carries a metadata dict with whatever placeholder fields resolver says this model needs published for its modality, so a consumer can skip the image transform. data is None for items served from the processor cache, in which case the metadata is unavailable here and the consumer has to fall back to processing the media itself. A connector that also has transfer coordinates to report (e.g. NIXL peer_host/peer_port/size_bytes) merges those in alongside metadata, not into it.