Documentation
¶
Overview ¶
Package blisschemas is the entry point: it composes field-level validation with version-scoped rule validation over a complete set of documents.
The two layers stay visible in the result. A Report separates field problems from rule problems, because the two need different responses: a field problem is a malformed document and always the author's to fix, where a rule problem may mean the document is right and the engine version is wrong, or that a rule needs updating for a release it has not seen.
Field validation runs first and rule validation only if it passes. A rule reading a malformed document produces findings that are artifacts of the malformation, and a reader cannot tell those from real ones.
Index ¶
- func LoadChip(path string) (*hardware.Chip, error)
- func LoadCoefficientSet(path string) (*coefficient.Set, error)
- func LoadDeployment(path string) (*deployment.Deployment, error)
- func LoadEvaluationRun(path string) (*evaluation.Run, error)
- func LoadFabric(path string) (*hardware.Fabric, error)
- func LoadModelGraph(path string) (*model.Graph, error)
- func LoadModelIdentity(path string) (*model.Identity, error)
- func LoadScenario(path string) (*scenario.Scenario, error)
- func LoadStorageDevices(path string) ([]*hardware.StorageDevice, error)
- func LoadWorkload(path string) (*workload.Shape, error)
- type Bundle
- type Report
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadChip ¶
LoadChip reads a chip descriptor from blis-catalog's hardware namespace. The file carries no name — identity is the filename — so the loader stamps Chip.Name from the path stem. The Chip type tags Name `yaml:"-"`, so the stamp is the field's only source: there is no in-file name to prefer, hence no `if Name == ""` guard, and an in-file `name` is rejected under strict decode (#27).
func LoadCoefficientSet ¶
func LoadCoefficientSet(path string) (*coefficient.Set, error)
LoadCoefficientSet reads a coefficient set from blis-registry.
func LoadDeployment ¶
func LoadDeployment(path string) (*deployment.Deployment, error)
LoadDeployment reads a deployment document — the tunable configuration applied to a scenario. It does not validate; call Validate.
func LoadEvaluationRun ¶
func LoadEvaluationRun(path string) (*evaluation.Run, error)
LoadEvaluationRun reads a measured run.
func LoadFabric ¶
LoadFabric reads a fabric descriptor from blis-catalog's networks namespace, naming it from the filename as LoadChip does: the stamp is Fabric.Name's only source, and an in-file `name` is a rejected unknown field (#27).
func LoadModelGraph ¶
LoadModelGraph reads a derived model graph.
func LoadModelIdentity ¶
LoadModelIdentity reads a model entry's identity manifest, blis-catalog's models/<name>/model.yaml: the name the entry claims and the provenance of the vendor config beside it. Unlike a chip, a fabric or a workload, this file carries its name IN the document — the catalog requires that name to match the directory — so the loader does not stamp it; the caller checks it against the directory, as it does for a graph.
func LoadScenario ¶
LoadScenario reads a scenario document. It does not validate; call Validate.
func LoadStorageDevices ¶
func LoadStorageDevices(path string) ([]*hardware.StorageDevice, error)
LoadStorageDevices reads the offload-tier classes from blis-catalog's devices namespace.
The file is a mapping of tier name to device facts rather than a list, because a tier is referred to by name from a deployment's offload block. So this loader is not a plain decodeStrict: it walks the mapping and stamps each device's Name from its key, which is the only place that key survives into the loaded value.
Sorted by name on return, so two loads of one file yield the same order and a caller comparing kernels built from it is comparing configuration rather than map iteration.
func LoadWorkload ¶
LoadWorkload reads a traffic shape from blis-catalog's workloads namespace. The file carries no name — identity is the filename — so the loader stamps Shape.Name from the path stem. The Shape type tags Name `yaml:"-"`, so the stamp is the field's only source: there is no in-file name to prefer, hence no `if Name == ""` guard, and an in-file `name` is rejected under strict decode. Chip and Fabric now follow this same rule (#27), so the three by-filename entities are single-sourced identically.
Types ¶
type Bundle ¶
type Bundle struct {
Scenario *scenario.Scenario
Deployment *deployment.Deployment
Model *model.Graph
Chip *hardware.Chip
Fabric *hardware.Fabric
Devices []*hardware.StorageDevice
Coefficients []*coefficient.Set
Workload *workload.Shape
Evaluation *evaluation.Run
}
Bundle is a complete set of documents describing one run. Optional members are nil when a caller is validating a subset: a catalog contributor checks a chip alone, where a CI job checking a run supplies everything. The Scenario fixes the immutable problem and the Deployment the mutable configuration against it; validating both together is what checks that a deployment fits its cluster.
type Report ¶
type Report struct {
// Field holds structural problems: malformed documents, unrecognized vocabulary,
// arithmetic that does not close. These are version-independent.
Field *validate.Problems
// Rule holds version-scoped problems, each attributed to a named rule.
Rule *validate.Problems
// RulesApplied is the engine version whose pack ran, empty if none did.
RulesApplied string
}
Report is the outcome of validating a bundle, with the two layers kept apart.
func Validate ¶
Validate checks a bundle: every present document field-by-field, then the version-scoped rules if the field layer passed.
func ValidateAgainstCatalog ¶ added in v0.2.0
ValidateAgainstCatalog resolves every by-name reference a bundle's scenario makes against a catalog and registry on disk. It is separate from Validate on purpose: Validate is pure, and this repository deliberately does not vendor the catalog, so a caller without one checked out gets the pure checks and one with a catalog gets the references resolved too. The README's "two layers" split rests on that separation — keeping the shapes apart from the contents is what lets either side be validated in CI without the other being present — so resolution lives behind its own entry point rather than inside Validate.
It checks presence, not validity: that model names a directory the catalog has, that hardware, fabric and a workload shape name files it has, and that every storage tier and coefficient set a scenario names exists. The workload's Trace arm is excluded on purpose — it references an external capture by file path, not a catalog identity. Validating the resolved documents is Validate's job, reached by loading them into a Bundle; this answers the prior question of whether the names resolve at all, which nothing else does — `hardware: nvidia-h200` validates clean today and fails later, elsewhere, as a missing file rather than an invalid scenario.
Every failure names the path it looked for and enumerates what the catalog actually has, so the error teaches the naming convention in one turn rather than leaving a generator to guess: `hardware: nvidia-h200` → "looked for hardware/nvidia-h200.yaml; the catalog has [a100-80 a100-sxm b200 h100 h200 ...]".
A nil scenario resolves nothing and is reported as such rather than passing silently: a bundle with no scenario names no references, so there is nothing to resolve, but a caller that meant to pass one should not read an empty green as success. An empty catalogRoot or registryRoot is only an error when a reference of the corresponding kind is actually made.
Problems are recorded under dotted paths below "references." — references.hardware, references.coefficients[1] — matching how spec/ validators report, so a reader of a mixed report sees resolution findings in the same shape as field findings.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
validate-catalog
command
Command validate-catalog loads every committed artifact in a blis-catalog checkout and validates it against the schema.
|
Command validate-catalog loads every committed artifact in a blis-catalog checkout and validates it against the schema. |
|
validate-registry
command
Command validate-registry loads every committed coefficient set in a blis-registry checkout and validates it against the schema.
|
Command validate-registry loads every committed coefficient set in a blis-registry checkout and validates it against the schema. |
|
internal
|
|
|
registry
Package registry locates the committed coefficient-set files in a blis-registry checkout, with one discovery predicate shared by every blis-schemas surface that walks the registry — the validate-registry command and the committed-data test — so they cannot drift from each other or from the registry's own gate.
|
Package registry locates the committed coefficient-set files in a blis-registry checkout, with one discovery predicate shared by every blis-schemas surface that walks the registry — the validate-registry command and the committed-data test — so they cannot drift from each other or from the registry's own gate. |
|
validate
Package validate holds the reporting types every validator shares: a located, accumulating problem list rather than a first-error return.
|
Package validate holds the reporting types every validator shares: a located, accumulating problem list rather than a first-error return. |
|
Package kernel is the interface a cost model implements and a discrete-event simulator calls.
|
Package kernel is the interface a cost model implements and a discrete-event simulator calls. |
|
Package rules holds validation that depends on an engine version.
|
Package rules holds validation that depends on an engine version. |
|
v0_29
Package v0_29 is the rules pack for vLLM 0.29.x.
|
Package v0_29 is the rules pack for vLLM 0.29.x. |
|
spec
|
|
|
coefficient
Package coefficient defines a coefficient set: the learned numbers a cost estimate depends on, each recording where it came from and where it holds.
|
Package coefficient defines a coefficient set: the learned numbers a cost estimate depends on, each recording where it came from and where it holds. |
|
deployment
Package deployment describes the mutable configuration a user — or an optimizer sweeping a configuration space — chooses against a fixed Scenario: how a model is laid out across the available hardware (pools, each a role at a parallelism layout with its own engine settings), the KV offload hierarchy below HBM, and prefill-to-decode KV transfer.
|
Package deployment describes the mutable configuration a user — or an optimizer sweeping a configuration space — chooses against a fixed Scenario: how a model is laid out across the available hardware (pools, each a role at a parallelism layout with its own engine settings), the KV offload hierarchy below HBM, and prefill-to-decode KV transfer. |
|
evaluation
Package evaluation describes a measured serving run: the record a prediction is compared against.
|
Package evaluation describes a measured serving run: the record a prediction is compared against. |
|
hardware
Package hardware defines the three catalog entities that describe physical resources: a chip, an inter-node fabric, and a storage device class.
|
Package hardware defines the three catalog entities that describe physical resources: a chip, an inter-node fabric, and a storage device class. |
|
model
Package model defines a model as a directed acyclic graph of cost primitives.
|
Package model defines a model as a directed acyclic graph of cost primitives. |
|
scenario
Package scenario describes the immutable problem a user is handed: which model, on which available hardware, measured against which workload (a distributional shape or a concrete captured trace), and fitted against which coefficient and engine-version references.
|
Package scenario describes the immutable problem a user is handed: which model, on which available hardware, measured against which workload (a distributional shape or a concrete captured trace), and fitted against which coefficient and engine-version references. |
|
workload
Package workload describes the traffic a deployment is measured against.
|
Package workload describes the traffic a deployment is measured against. |
|
Package vocab holds the closed vocabularies every schema draws on: units, evidence methods, scope keys, provenance.
|
Package vocab holds the closed vocabularies every schema draws on: units, evidence methods, scope keys, provenance. |