-
Notifications
You must be signed in to change notification settings - Fork 2
Configuration Files
Abdullah edited this page Jan 19, 2026
·
20 revisions
Guide to GraphBrew configuration files for automated experiments.
Configuration files control automated experiments via Python scripts:
scripts/config/
├── brew/ # Standard GraphBrew configs
│ ├── run.json # Benchmark run settings
│ ├── convert.json # Format conversion
│ └── label.json # Graph labeling
│
├── gap/ # GAP suite compatible
│ └── ...
│
└── test/ # Quick testing
└── ...
The main configuration for running experiments.
{
"description": "Experiment description",
"paths": {
"graphs_dir": "../../graphs",
"output_dir": "../../results",
"bin_dir": "../../bench/bin"
},
"benchmarks": ["pr", "bfs", "cc", "sssp", "bc", "tc"],
"algorithms": [0, 7, 12, 15, 20],
"trials": 5,
"options": {
"symmetrize": true,
"verify": false,
"timeout": 3600,
"root_vertex": -1
},
"filters": {
"min_nodes": 100,
"max_nodes": 100000000,
"extensions": [".el", ".mtx", ".gr"]
},
"output": {
"format": "csv",
"include_raw": true,
"include_summary": true
}
}| Field | Description | Default |
|---|---|---|
graphs_dir |
Directory containing graph files | Required |
output_dir |
Where to save results | ./results |
bin_dir |
Location of benchmark binaries | ../../bench/bin |
List of benchmarks to run:
"benchmarks": ["pr", "bfs", "cc", "sssp", "bc", "tc"]List of reordering algorithm IDs:
"algorithms": [0, 7, 12, 15, 20]See Command-Line-Reference for all IDs.
| Option | Description | Default |
|---|---|---|
symmetrize |
Make graphs undirected | true |
verify |
Verify results | false |
timeout |
Max seconds per run | 3600 |
root_vertex |
BFS/SSSP root (-1 = random) | -1 |
| Filter | Description | Default |
|---|---|---|
min_nodes |
Skip small graphs | 0 |
max_nodes |
Skip huge graphs | ∞ |
extensions |
File types to include | [".el"] |
{
"graphs_dir": "./graphs",
"benchmarks": ["pr"],
"algorithms": [0, 7],
"trials": 3
}{
"description": "Quick functionality test",
"paths": {
"graphs_dir": "../../test/graphs"
},
"benchmarks": ["pr", "bfs"],
"algorithms": [0, 7, 12],
"trials": 1,
"options": {
"symmetrize": true,
"verify": true,
"timeout": 60
}
}{
"description": "Complete benchmark suite",
"paths": {
"graphs_dir": "../../graphs",
"output_dir": "../../results/full_benchmark"
},
"benchmarks": ["pr", "bfs", "cc", "sssp", "bc", "tc"],
"algorithms": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 16, 17, 18, 19, 20],
"trials": 10,
"options": {
"symmetrize": true,
"verify": false,
"timeout": 7200
},
"filters": {
"min_nodes": 1000,
"extensions": [".el", ".mtx"]
}
}{
"description": "Test Leiden-based algorithms",
"benchmarks": ["pr", "tc"],
"algorithms": [0, 12, 16, 17, 18, 19, 20],
"trials": 5
}Settings for converting between graph formats.
{
"description": "Graph format conversion settings",
"input": {
"formats": ["csv", "tsv", "mtx", "gr"],
"delimiter": "auto"
},
"output": {
"format": "el",
"dir": "./converted"
},
"transformations": {
"remove_self_loops": true,
"remove_multi_edges": true,
"to_zero_indexed": true,
"symmetrize": false
}
}| Option | Description | Default |
|---|---|---|
remove_self_loops |
Remove edges v→v | true |
remove_multi_edges |
Keep only first edge | true |
to_zero_indexed |
Convert 1-indexed to 0-indexed | true |
symmetrize |
Add reverse edges | false |
Settings for generating graph metadata.
{
"description": "Graph labeling configuration",
"metrics": [
"num_nodes",
"num_edges",
"density",
"avg_degree",
"max_degree",
"modularity",
"diameter",
"clustering_coefficient"
],
"output": {
"format": "json",
"file": "graph_metadata.json"
},
"options": {
"compute_modularity": true,
"sample_diameter": true,
"sample_size": 100
}
}cd scripts/brew
python3 run_experiment.py --config ../config/brew/run.json# Override trials
python3 run_experiment.py \
--config ../config/brew/run.json \
--trials 3
# Override output
python3 run_experiment.py \
--config ../config/brew/run.json \
--output ./my_results# Run test first
python3 run_experiment.py --config ../config/test/run.json
# Then full benchmark
python3 run_experiment.py --config ../config/brew/run.jsonConfigs can reference environment variables:
{
"paths": {
"graphs_dir": "${GRAPHS_DIR}",
"output_dir": "${OUTPUT_DIR:-./results}"
}
}Usage:
export GRAPHS_DIR=/data/large_graphs
python3 run_experiment.py --config run.jsoncp config/brew/run.json config/my_experiment.json# Edit with your favorite editor
vim config/my_experiment.jsonpython3 -c "import json; json.load(open('config/my_experiment.json'))"python3 run_experiment.py --config config/my_experiment.jsongraph,benchmark,algorithm,trial,time,metric,reorder_time
facebook.el,pr,0,1,0.0234,,0
facebook.el,pr,0,2,0.0231,,0
facebook.el,pr,7,1,0.0189,,0.045
facebook.el,bfs,0,1,0.0012,76.9,0{
"experiment": "Full Benchmark",
"date": "2024-01-15",
"config": "run.json",
"results": {
"facebook.el": {
"pr": {
"0": {"mean": 0.0232, "std": 0.0002},
"7": {"mean": 0.0189, "std": 0.0003}
}
}
}
}# Check path
ls -la config/brew/run.json
# Use absolute path
python3 run_experiment.py --config /full/path/to/run.json# Validate and find error
python3 -m json.tool config/my_config.jsonCheck graphs_dir path and filters.extensions.
- Running-Benchmarks - Command-line usage
- Python-Scripts - Script documentation
- Command-Line-Reference - All options