Skip to content

Commit e17eb3d

Browse files
committed
docs: clarify trace replay dataset examples and explanations
Signed-off-by: Vincent Gimenes <vincent.gimenes@gmail.com>
1 parent 6d7eac5 commit e17eb3d

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

docs/guides/datasets.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ GuideLLM supports various file formats for datasets, including text, CSV, JSON,
141141
{"prompt": "What is your name?", "output_tokens_count": 3, "additional_column": "baz", "additional_column2": "qux"}
142142
```
143143

144-
- **Trace files (`.jsonl` with `trace_synthetic` type)**: Specialized JSONL files for replay benchmarking with `timestamp`, `input_length`, and `output_length` fields. Used with `--profile replay` to replay trace events using each row's timestamp and token lengths. Timestamps may be absolute or monotonic values; GuideLLM sorts them and converts them to offsets from the first event before scheduling. See [Trace Replay Benchmarking](../getting-started/benchmark.md#trace-replay-benchmarking).
144+
- **Trace files (`.jsonl` with `trace_synthetic` type)**: Specialized JSONL files for replay benchmarking with `timestamp`, `input_length`, and `output_length` fields. Used with `--profile replay` to replay trace events using each row's timestamp and token lengths. Timestamps must be numbers expressed in seconds on a shared timeline with any consistent zero point; GuideLLM sorts them and converts them to offsets from the first event before scheduling. Date strings are not parsed yet, so provide timestamps as numbers. See [Trace Replay Benchmarking](../getting-started/benchmark.md#trace-replay-benchmarking).
145145

146146
```json
147147
{"timestamp": 1234500.0, "input_length": 256, "output_length": 128}
@@ -150,18 +150,27 @@ GuideLLM supports various file formats for datasets, including text, CSV, JSON,
150150

151151
In this example, the second request is scheduled 0.5 seconds after the first request. Trace rows are ordered by timestamp before GuideLLM schedules requests and generates synthetic payloads. This keeps each scheduled event aligned with the prompt and output token lengths from the same row.
152152

153-
Use `--data-args '{"type_": "trace_synthetic"}'` to enable trace loading:
153+
Use `--data-args type_=trace_synthetic` to enable trace loading:
154154

155-
```bash
155+
```console
156156
guidellm benchmark \
157-
--target "http://localhost:8000" \
157+
--target http://localhost:8000 \
158158
--profile replay \
159159
--rate 1.0 \
160-
--data "path/to/trace.jsonl" \
161-
--data-args '{"type_": "trace_synthetic"}'
160+
--data path/to/trace.jsonl \
161+
--data-args type_=trace_synthetic
162162
```
163163

164-
If your trace uses different column names, configure them with `timestamp_column`, `prompt_tokens_column`, and `output_tokens_column`.
164+
If your trace uses different column names, configure them with `timestamp_column`, `prompt_tokens_column`, and `output_tokens_column`:
165+
166+
```console
167+
guidellm benchmark \
168+
--target http://localhost:8000 \
169+
--profile replay \
170+
--rate 1.0 \
171+
--data replay.jsonl \
172+
--data-args type_=trace_synthetic,timestamp_column=timestamp,prompt_tokens_column=input_length,output_tokens_column=output_length
173+
```
165174

166175
For replay, `--rate` is a time scale for the intervals between trace events rather than requests per second. Use `--data-samples` to limit how many trace rows are loaded and replayed. Use `--max-requests` only as a runtime completion constraint; it does not limit the trace rows loaded from the file.
167176

0 commit comments

Comments
 (0)