e2e: long_session records a hash of each reply so two configurations can be compared
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
63e496a8df
commit
b145a3d261
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user