We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b1592f commit d6a384dCopy full SHA for d6a384d
tensorrt_llm/_utils.py
@@ -1014,12 +1014,15 @@ def to_json_str(cls, event):
1014
if event_serialize_func is None:
1015
raise ValueError(f"Unknown KVCache event data type: {event_type}")
1016
1017
- return {
+ json_str = {
1018
"event_id": event.event_id,
1019
"data": event_serialize_func(event.data),
1020
"window_size": event.window_size,
1021
- "attention_dp_rank": event.attention_dp_rank,
1022
}
+ if event.attention_dp_rank is not None:
1023
+ json_str["attention_dp_rank"] = event.attention_dp_rank
1024
+
1025
+ return json_str
1026
1027
@staticmethod
1028
def _created_to_json(data):
0 commit comments