JuliusBrussee/caveman · error
cachebench: malformed Hugging Face rows object
Error message
cachebench: malformed Hugging Face rows object
What it means
Error "cachebench: malformed Hugging Face rows object" thrown in JuliusBrussee/caveman.
Source
Thrown at cacheengine/cachebench/corpus.go:288
}
var wire hfRowWire
if err := decodeOneJSON(raw, &wire); err != nil {
return nil, fmt.Errorf("cachebench: decode Hugging Face row: %w", err)
}
row, err := validateCorpusWire(wire.Row, wire.RowIndex, limits)
if err != nil {
return nil, fmt.Errorf("cachebench: Hugging Face row %d: %w", wire.RowIndex, err)
}
if err := appendCorpusRow(&rows, sessions, &retainedBytes, row, limits); err != nil {
return nil, fmt.Errorf("cachebench: Hugging Face row %d: %w", wire.RowIndex, err)
}
}
if end, err := decoder.Token(); err != nil || end != json.Delim(']') {
return nil, errors.New("cachebench: malformed Hugging Face rows array")
}
}
if end, err := decoder.Token(); err != nil || end != json.Delim('}') {
return nil, errors.New("cachebench: malformed Hugging Face rows object")
}
var trailing any
if err := decoder.Decode(&trailing); err != io.EOF {
return nil, errors.New("cachebench: trailing JSON after Hugging Face rows object")
}
if !foundRows {
return nil, errors.New("cachebench: Hugging Face response has no rows field")
}
return rows, nil
}
func decodeOneJSON(raw []byte, destination any) error {
if !validUniqueJSONObject(raw) {
return errors.New("duplicate or invalid JSON")
}
decoder := json.NewDecoder(bytes.NewReader(raw))
if err := decoder.Decode(destination); err != nil {
return errView on GitHub (pinned to 27d5a3981a)
Solutions
- Fix the malformed Hugging Face rows object JSON.
When it happens
Trigger: Thrown at cacheengine/cachebench/corpus.go:288 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
AI-assisted analysis of JuliusBrussee/caveman@27d5a3981a (2026-08-15).
Data as JSON: /api/errors/f2ea2b3f791b2120.
Report an issue: GitHub.