Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
8868aaa
Add files
SkiHatDuckie Jun 30, 2026
75371ff
Update field description
SkiHatDuckie Jun 30, 2026
e049ce8
Add stubs
SkiHatDuckie Jun 30, 2026
dc1920e
Add missing trailing whitespace
SkiHatDuckie Jun 30, 2026
a965b40
Implement trace format & args
SkiHatDuckie Jun 30, 2026
60cfcbd
Add tests
SkiHatDuckie Jul 1, 2026
2e1d969
Test prompts matching or bordering block size
SkiHatDuckie Jul 1, 2026
f28a347
Update tests
SkiHatDuckie Jul 1, 2026
1c37aaf
Update trace format docs
SkiHatDuckie Jul 1, 2026
7fef74a
Update trace_replay.md
SkiHatDuckie Jul 1, 2026
3450fc3
Reapir tests
SkiHatDuckie Jul 13, 2026
4edc5da
Indicate private functions
SkiHatDuckie Jul 15, 2026
58d8dab
Update trace_replay.md
SkiHatDuckie Jul 15, 2026
581f89b
Make mdformat happy
SkiHatDuckie Jul 15, 2026
4d7f58d
Add json utils + impl in trace_common
SkiHatDuckie Jul 21, 2026
ee391f0
Refactor
SkiHatDuckie Jul 21, 2026
16758aa
Handle unserializable python dicts
SkiHatDuckie Jul 21, 2026
fdb864f
Improve json_unwrap tests
SkiHatDuckie Jul 22, 2026
4aec222
Improve trace_common test coverage
SkiHatDuckie Jul 22, 2026
8310217
Handle multi-conversation datasets
SkiHatDuckie Jul 27, 2026
c1e2312
Store token blocks as tuples
SkiHatDuckie Jul 27, 2026
8622c0d
Repair tests
SkiHatDuckie Jul 28, 2026
9d04e2b
Tolerate partially filled hash ID
SkiHatDuckie Jul 28, 2026
a8872bb
Improve test coverage
SkiHatDuckie Jul 28, 2026
de082bb
Fix linting
SkiHatDuckie Jul 28, 2026
a833784
Update docs
SkiHatDuckie Jul 28, 2026
5fe0d30
Fix typo
SkiHatDuckie Jul 28, 2026
7ee289d
Set conv_start_ts outside the loop
SkiHatDuckie Jul 30, 2026
23129dc
Move create_prompt_from_hash_ids to trace_common
SkiHatDuckie Jul 30, 2026
f7d9c93
Update docs
SkiHatDuckie Jul 30, 2026
4afe96f
Rename ColumnSearchResult field
SkiHatDuckie Jul 30, 2026
d53490c
Update guide
SkiHatDuckie Jul 30, 2026
dfa94c6
Try loading json columns if type `str`
SkiHatDuckie Jul 30, 2026
a1002d1
Handle final prompt if `prompt` is empty
SkiHatDuckie Jul 30, 2026
f44b6fd
Change final prompt again
SkiHatDuckie Jul 30, 2026
0cabc16
Change defaults to WEKA spec names
SkiHatDuckie Jul 30, 2026
387b5fb
Patch dataset edge cases
SkiHatDuckie Jul 31, 2026
b08662b
Remove debug print
SkiHatDuckie Jul 31, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/guides/datasets.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The following arguments configure datasets and their processing:
- `synthetic_text` — generates synthetic prompts on the fly. Required field: `prompt_tokens`. Optional: `output_tokens`, `turns`, `prefix_tokens`, `prefix_count`, `prefix_buckets`, and distribution controls (`prompt_tokens_stdev`, `output_tokens_stdev`, etc.).
- `huggingface` (alias `hf`) — loads from HuggingFace Hub or a local directory/file. Required field: `source` (dataset ID or path). Pass dataset loading arguments (for example `split`, `name`) via `load_kwargs`.
- `json_file`, `csv_file`, `text_file`, `parquet_file`, `arrow_file`, `hdf5_file`, `db_file`, `tar_file` — loads from a local file. Required field: `path`.
- `trace_synthetic`, `mooncake` — loads a JSONL, JSON, CSV, or Parquet trace file for replay benchmarking. Required field: `path`. Optional: `timestamp_column` (default: `timestamp`), `prompt_tokens_column` (default: `input_length`), `output_tokens_column` (default: `output_length`).
- `trace_synthetic`, `mooncake`, `weka` — loads a JSONL, JSON, CSV, or Parquet trace file for replay benchmarking. Required field: `path`. Optional: `timestamp_column` (default: `timestamp`), `prompt_tokens_column` (default: `input_length`), `output_tokens_column` (default: `output_length`).

In addition, you can specify additional arguments to the dataset loading with the data argument `load_kwargs`:

Expand Down
33 changes: 29 additions & 4 deletions docs/guides/trace_replay.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ Detailed use of the replay profile and file-based datasets as a whole is explain
These are passed to the `--data` argument as `kind=format`:

- `trace_synthetic`: A trace format that does the bare minimum needed to complete a fully functioning trace replay benchmark with synthetic prompt generation
- `mooncake`: The trace format used by the serving platform Mooncake, as defined in [https://doi.org/10.48550/arXiv.2407.00079](https://doi.org/10.48550/arXiv.2407.00079)
- `mooncake`: The trace format used by the serving platform *Mooncake*, as defined in [https://doi.org/10.48550/arXiv.2407.00079](https://doi.org/10.48550/arXiv.2407.00079)
- `weka`: The trace format used by WEKA's *Augmented Memory Grid*, as specified [in the original research repository](https://github.com/callanjfox/agentic-coding-analysis/blob/master/docs/TRACE_FORMAT.md)

## Format-Agnostic Data Arguments

Expand All @@ -24,8 +25,8 @@ All trace formats can accept the following optional data arguments:
These are passed through the `--data` argument like below:

```bash
guidellm benchmark \
--target http://localhost:8000 \
guidellm run \
--backend kind=openai_http,target=http://localhost:8000 \
--profile kind=replay \
--data "kind=trace_synthetic,path=replay.jsonl,timestamp_column=ts,prompt_tokens_column=input_tokens,output_tokens_column=generated_tokens"
```
Expand All @@ -36,9 +37,33 @@ guidellm benchmark \

### `mooncake`

The Mooncake format expects an additional column for hash IDs. During prompt generation, hash IDs sharing the same previous ID are required to represent distinct blocks of token ids.
The Mooncake format expects an additional column for prefix-based cache hash IDs. During prompt generation, hash IDs sharing the same previous ID are required to represent distinct blocks of token ids.

| Argument | Default | Description |
| -------------------- | ---------- | --------------------------------------------------- |
| `hash_ids_column` | "hash_ids" | Column name for lists of hash IDs in the trace file |
| `hash_id_block_size` | 512 | Amount of tokens represented by one hash ID |

### `weka`

**NOTE:** :construction: While the format is accepted, some features such as subagent conversations, tool call events and non-linear histories are still in active development. The results from datasets including these features will be unreliable.

The WEKA format expects a column with conversation UUIDs that is not wrapped within another column. The timestamp, input token length, output token length and hash IDs columns must either be top level columns, or must all be wrapped inside the same JSON column (ex. "requests").

Similar to Mooncake, WEKA uses prefix-based cache hash IDs. The original [specification](https://github.com/callanjfox/agentic-coding-analysis/blob/master/docs/TRACE_FORMAT.md) for the trace requires hash IDs to be 1 or greater, and for trailing hash IDs to be dropped if there are not enough input tokens to fill the hash ID block size. To accommodate for datasets which may not follow the specification exactly (ex. [semianalysisai/cc-traces-weka-no-subagents-051226](https://huggingface.co/datasets/semianalysisai/cc-traces-weka-no-subagents-051226)), GuideLLM will accept any non-negative integer as a valid hash ID, and will drop partially filled hash IDs if they exist.

GuideLLM will generate prompts starting from the first conversation. When the conversation ends, the next conversation will be used. Hash IDs and relative timestamps are local to the conversation. After a conversation ends, the hash ID tree is reset and the relative timestamp returns to 0.0.

| Argument | Default | Description |
| ------------------------ | ---------- | ---------------------------------------------------- |
| `conversation_id_column` | "id" | Column name for conversation UUIDs in the trace file |
| `hash_ids_column` | "hash_ids" | Column name for lists of hash IDs in the trace file |
| `hash_id_block_size` | 64 | Amount of tokens represented by one hash ID |

Modified defaults:

| Argument | New Default |
| ---------------------- | ----------- |
| `timestamp_column` | "t" |
| `prompt_tokens_column` | "in" |
| `output_tokens_column` | "out" |
4 changes: 4 additions & 0 deletions src/guidellm/data/deserializers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@
TraceDatasetDeserializer,
TraceFormatBase,
TraceFormatRegistry,
create_prompt_from_hash_ids,
decode_prompt,
generate_token_ids,
)
from .trace_minimal import MinimalTraceFormatArgs
from .trace_mooncake import MooncakeTraceFormatArgs
from .trace_weka import WEKATraceFormatArgs

__all__ = [
"ArrowFileDatasetDeserializer",
Expand Down Expand Up @@ -85,6 +87,8 @@
"TraceDatasetDeserializer",
"TraceFormatBase",
"TraceFormatRegistry",
"WEKATraceFormatArgs",
"create_prompt_from_hash_ids",
"decode_prompt",
"generate_token_ids",
]
Loading