Encode zero cacheable blocks explicitly

This commit is contained in:
2026-07-24 00:40:15 +08:00
parent 5c45944388
commit 8462afa56f
2 changed files with 50 additions and 2 deletions

View File

@@ -325,8 +325,13 @@ def materialize(args: argparse.Namespace, *, tokenizer: Any | None = None) -> di
"num_prefill_tokens": isl,
"num_decode_tokens": osl,
"session_id": sid,
"block_hash_ids": "|".join(
str(value) for value in cacheable_block_ids
# "[]" is the explicit no-cacheable-block encoding accepted
# by Frontier. An empty CSV field is treated as missing
# metadata and rejected before scheduling.
"block_hash_ids": (
"|".join(str(value) for value in cacheable_block_ids)
if cacheable_block_ids
else "[]"
),
}
)