Skip to content

Commit 9a08c65

Browse files
authored
Fix outputs documentation with correct parameter syntax (#508)
Correct the --outputs parameter examples to show comma-separated values instead of space-separated, which doesn't work in all environments. The parameter supports comma-separated format aliases or multiple flags. ## Summary The documentation for the --outputs parameter incorrectly showed space-separated values (e.g., --outputs json csv html) which doesn't work in all environments. This PR updates all examples to use the correct comma-separated syntax (e.g., --outputs json,csv,html) or multiple flags approach, ensuring users can successfully generate multiple output formats. ## Details Updated "Specifying Output Formats" section in docs/guides/outputs.md to clarify correct syntax ## Test Plan Verify the examples work in different environments: Direct CLI: guidellm benchmark --outputs "json,csv,html" ... Multiple flags: guidellm benchmark --outputs json --outputs csv --outputs html ... Docker/Podman with env vars: -e GUIDELLM_OUTPUTS="json,csv,html" Confirm all three output files (JSON, CSV, HTML) are generated in the output directory - ## Related Issues N/A (Documentation correction) --- - [x] "I certify that all code in this PR is my own, except as noted below." ## Use of AI - [x] Includes AI-assisted code completion - [ ] Includes code generated by an AI application - [ ] Includes AI-generated tests (NOTE: AI written tests should have a docstring that includes `## WRITTEN BY AI ##`)
2 parents ead5889 + cc80859 commit 9a08c65

File tree

1 file changed

+68
-2
lines changed

1 file changed

+68
-2
lines changed

docs/guides/outputs.md

Lines changed: 68 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,73 @@ GuideLLM supports saving benchmark results to files in various formats, includin
6666
- **Output Formats**: Use the `--outputs` argument to specify which formats or exact file names (with supported file extensions, e.g. `benchmarks.json`) to generate. By default, JSON, CSV, and HTML are generated.
6767
- **Sampling**: To limit the size of the output files and number of detailed request samples included, you can configure sampling options using the `--sample-requests` argument.
6868

69-
Example command to save results in specific formats:
69+
#### Example commands to save results in specific formats:
70+
71+
The `--outputs` parameter accepts output formats in the following ways:
72+
73+
**Command Line:**
74+
75+
```bash
76+
# Comma-separated format aliases (recommended)
77+
--outputs json,csv,html
78+
79+
# Or using multiple flags
80+
--outputs json --outputs csv --outputs html
81+
```
82+
83+
**Environment Variables:**
84+
85+
```bash
86+
# Comma-separated values for environment variables
87+
-e GUIDELLM_OUTPUTS=json,csv,html
88+
```
89+
90+
#### Examples
91+
92+
**Example 1: Comma-separated format aliases (recommended)**
93+
94+
```bash
95+
guidellm benchmark \
96+
--target "http://localhost:8000" \
97+
--profile sweep \
98+
--max-seconds 30 \
99+
--data "prompt_tokens=256,output_tokens=128" \
100+
--output-dir "results/" \
101+
--outputs json,csv,html \
102+
--sample-requests 20
103+
```
104+
105+
**Example 2: Multiple flags for each format**
106+
107+
```bash
108+
guidellm benchmark \
109+
--target "http://localhost:8000" \
110+
--profile sweep \
111+
--max-seconds 30 \
112+
--data "prompt_tokens=256,output_tokens=128" \
113+
--output-dir "results/" \
114+
--outputs json \
115+
--outputs csv \
116+
--outputs html \
117+
--sample-requests 20
118+
```
119+
120+
**Example 3: Using environment variables with Docker/Podman**
121+
122+
```bash
123+
podman run --rm -it --network=host \
124+
-v "/tmp/results:/results:z" \
125+
-e GUIDELLM_TARGET=http://localhost:8000 \
126+
-e GUIDELLM_PROFILE=sweep \
127+
-e GUIDELLM_MAX_SECONDS=30 \
128+
-e GUIDELLM_DATA="prompt_tokens=256,output_tokens=128" \
129+
-e GUIDELLM_OUTPUT_DIR=/results \
130+
-e GUIDELLM_OUTPUTS=json,csv,html \
131+
-e GUIDELLM_SAMPLE_REQUESTS=20 \
132+
ghcr.io/vllm-project/guidellm:latest
133+
```
134+
135+
**Example 4: Single output format**
70136

71137
```bash
72138
guidellm benchmark \
@@ -75,7 +141,7 @@ guidellm benchmark \
75141
--max-seconds 30 \
76142
--data "prompt_tokens=256,output_tokens=128" \
77143
--output-dir "results/" \
78-
--outputs json csv \
144+
--outputs json \
79145
--sample-requests 20
80146
```
81147

0 commit comments

Comments
 (0)