Jakal-au commited on
Commit
709f280
·
verified ·
1 Parent(s): b9fd6b1

[agent:cc] benchmarks: allow null tok_s_prefill/power_w for concurrency>1 rows

Browse files
Files changed (1) hide show
  1. validate.py +6 -0
validate.py CHANGED
@@ -114,8 +114,14 @@ def row_errors(row: dict[str, Any], line_no: int) -> list[str]:
114
  if value not in allowed:
115
  errors.append(f"line {line_no}: {field}={value!r} not in {sorted(allowed)}")
116
 
 
 
 
 
117
  for field in NUMERIC:
118
  value = row.get(field)
 
 
119
  if not isinstance(value, (int, float)) or isinstance(value, bool):
120
  errors.append(f"line {line_no}: {field} must be numeric")
121
  elif value < 0:
 
114
  if value not in allowed:
115
  errors.append(f"line {line_no}: {field}={value!r} not in {sorted(allowed)}")
116
 
117
+ # tok_s_prefill / power_w may be null (JSON null) on concurrency>1 rows where they are
118
+ # NOT separately measured - the row's headline is tok_s_decode (the aggregate). A null is
119
+ # the honest sentinel there; an arbitrary borrowed single-stream value would be misleading.
120
+ nullable_numeric = {"tok_s_prefill", "power_w"}
121
  for field in NUMERIC:
122
  value = row.get(field)
123
+ if value is None and field in nullable_numeric:
124
+ continue
125
  if not isinstance(value, (int, float)) or isinstance(value, bool):
126
  errors.append(f"line {line_no}: {field} must be numeric")
127
  elif value < 0: