HIF integration¶
HyperBench uses HIF (Hypergraph Interchange Format) to represent hypergraphs.
Supported inputs:
- .json (plain HIF).
- .json.zst (Zstandard-compressed HIF).
Load built-in datasets¶
Many datasets are available as built-ins (downloaded and cached automatically):
from hyperbench.data import AlgebraDataset, SamplingStrategy
dataset = AlgebraDataset(sampling_strategy=SamplingStrategy.HYPEREDGE)
print(dataset.stats())
Built-in dataset classes include AlgebraDataset, AmazonDataset, CoraDataset, CourseraDataset, IMDBDataset, and more. See the Data API reference for the complete list.
Load a dataset from a local file¶
from hyperbench.data import Dataset
dataset = Dataset.from_path("path/to/hypergraph.json.zst")
print(dataset.stats())
Load a dataset from a URL¶
from hyperbench.data import Dataset
dataset = Dataset.from_url("https://example.com/hypergraph.json.zst")
print(dataset.stats())
Validate HIF files¶
If you have a plain .json file and want to validate it against the HIF schema:
from hyperbench.utils import validate_hif_json
is_valid = validate_hif_json("path/to/hypergraph.json")
print(is_valid)
How HIF maps into HyperBench¶
When loaded, HIF data is processed into an HData object (see HData API reference for details).
Next steps¶
- Model selection/customization: Models.
- Training loop (callbacks, devices, etc.): Training.
- Comparing multiple models consistently: Benchmarking.
- Outputs and logging: Loggers.
- Visualizing runs: TensorBoard.