diff --git a/scripts/e2e/long_session.py b/scripts/e2e/long_session.py index 25785197..90a7a184 100644 --- a/scripts/e2e/long_session.py +++ b/scripts/e2e/long_session.py @@ -8,6 +8,7 @@ TTFT and the decode rate. Output: $E2E_OUT_DIR/long-session.json (never the prom long_session.py [--src DIR] [--turns N] [--target-tokens N] [--max-output N] """ import argparse +import hashlib import json import os import sys @@ -98,7 +99,9 @@ def stream(base, key, model, items, max_out): "output_tokens": usage.get("output_tokens"), "status": status, } - return info, "".join(text) + reply = "".join(text) + info["reply_sha256"] = hashlib.sha256(reply.encode()).hexdigest()[:16] # lets two configurations be compared without storing the text + return info, reply def main():