@@ -64,7 +64,7 @@ func (v *VLLMAdapter) ShardingKey(msg *kvevents.RawMessage) string {
6464func (v * VLLMAdapter ) ParseMessage (msg * kvevents.RawMessage ) (string , string , kvevents.EventBatch , error ) {
6565 podID , modelName := parseTopic (msg .Topic )
6666
67- var vllmBatch msgpackVLLMEventBatch
67+ var vllmBatch msgpackEventBatch
6868 if err := msgpack .Unmarshal (msg .Payload , & vllmBatch ); err != nil {
6969 return "" , "" , kvevents.EventBatch {}, fmt .Errorf ("failed to decode vLLM event batch: %w" , err )
7070 }
@@ -79,22 +79,14 @@ func (v *VLLMAdapter) ParseMessage(msg *kvevents.RawMessage) (string, string, kv
7979 }
8080
8181 batch := kvevents.EventBatch {
82- Timestamp : vllmBatch .TS ,
83- Events : genericEvents ,
82+ Timestamp : vllmBatch .TS ,
83+ Events : genericEvents ,
84+ DataParallelRank : vllmBatch .DataParallelRank ,
8485 }
8586
8687 return podID , modelName , batch , nil
8788}
8889
89- // vLLM msgpack event batch structure.
90- // This struct uses array encoding to match vLLM's msgspec array_like=True format.
91- type msgpackVLLMEventBatch struct {
92- _ struct {} `msgpack:",array"`
93- TS float64
94- Events []msgpack.RawMessage
95- DataParallelRank * int `msgpack:",omitempty"`
96- }
97-
9890// decodeVLLMEvent decodes a single vLLM event from msgpack bytes and dispatches
9991// it to the matching converter. Map-encoded events are first normalized to the
10092// positional []any layout the converters consume.
0 commit comments