report

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CategoryMNNVL

func CategoryMNNVL(cert *nvcrev1alpha1.Certification, i int) string

CategoryMNNVL returns the MNNVL label for the category at index i of the Certification's status: "Enabled", "Disabled", or "" when unknown. Per-category spec options take precedence over the global spec value.

func CertFailedNodeDetails added in v0.6.0

func CertFailedNodeDetails(ctx context.Context, c client.Client, cert *nvcrev1alpha1.Certification) []nvcrev1alpha1.FailedNode

CertFailedNodeDetails returns every distinct (node, reason, message) failure across all categories, resolved from each category's nodeResultsRef ConfigMap and sorted by node, reason, then message. It is the single walk behind both CertFailedNodes and the MCP list_failed_nodes tool, so the two cannot disagree on which nodes failed.

func CertFailedNodes

func CertFailedNodes(ctx context.Context, c client.Client, cert *nvcrev1alpha1.Certification) []string

CertFailedNodes returns the deduped union of failed node names across all categories: the unique names from CertFailedNodeDetails.

func FailedNodesFromRef

func FailedNodesFromRef(
	ctx context.Context, c client.Client, namespace string, ref *corev1.TypedLocalObjectReference,
) []nvcrev1alpha1.FailedNode

FailedNodesFromRef resolves a nodeResultsRef to its failed-nodes list by fetching the referenced ConfigMap and decoding the failed-nodes entry.

func PopulateCategoryFromWorkflow

func PopulateCategoryFromWorkflow(
	ctx context.Context, c client.Client, cat *CategoryReport, wf *nvcrev1alpha1.Workflow,
)

PopulateCategoryFromWorkflow fills in category metrics from a Workflow and its children.

func Print

func Print(w io.Writer, r *CertReport)

Print writes the formatted report to the given writer.

func PrintMulti

func PrintMulti(w io.Writer, reports []*CertReport)

PrintMulti writes one or more certification reports. A single cert uses the original layout; multiple certs get section separators.

func WriteJSON

func WriteJSON(path string, reports []*CertReport) error

WriteJSON serializes the report as JSON and writes it to the given path. Called when CRE_RESULTS_FILE is set, allowing programmatic consumers (e.g. k8s-platform-validator) to read structured results without log parsing.

Types

type BandwidthRow

type BandwidthRow struct {
	Size    string `json:"size"` // human-readable size
	AlgBW   string `json:"algBW"`
	BusBW   string `json:"busBW"`
	Samples int    `json:"samples"`
}

BandwidthRow holds bandwidth results for a single message size.

type CategoryReport

type CategoryReport struct {
	Domain        string `json:"domain"`
	Variant       string `json:"variant"`
	Status        string `json:"status"`
	FailureReason string `json:"failureReason,omitempty"` // populated from Workflow Failed condition message
	Runtime       string `json:"runtime,omitempty"`       // total runtime across all iterations
	TestScale     string `json:"testScale,omitempty"`
	NodesPerJob   int    `json:"nodesPerJob,omitempty"`
	Jobs          int    `json:"jobs,omitempty"`
	MNNVL         string `json:"mnnvl,omitempty"` // "Enabled", "Disabled", or "" (unknown)
	// FailedGroups lists groups that failed with their reason.
	FailedGroups []FailedGroupReport `json:"failedGroups,omitempty"`
	// Cliques lists topology domains with node counts and validation status.
	Cliques []CliqueReport `json:"cliques,omitempty"`
	// Training metrics grouped by topology domain.
	Domains []DomainReport `json:"domains,omitempty"`
	// Communication bandwidth results (single-group: one row per size).
	Bandwidth []BandwidthRow `json:"bandwidth,omitempty"`
	// Per-group bandwidth results (multi-group: one row per group).
	GroupBandwidth []GroupBandwidthRow `json:"groupBandwidth,omitempty"`
	// Diagnose results from adaptive fault isolation.
	Diagnose *DiagnoseReport `json:"diagnose,omitempty"`
	// Iterations shows per-iteration timing and outcome.
	Iterations []IterationReport `json:"iterations,omitempty"`
}

CategoryReport holds metrics for a single certification category.

type CertReport

type CertReport struct {
	Title      string `json:"title,omitempty"` // defaults to "Certification Report"
	Name       string `json:"name"`
	Platform   string `json:"platform"`
	GPU        string `json:"gpu"`
	TotalNodes int    `json:"totalNodes"`
	// ExcludedNodes lists nodes that matched the target but were left
	// untested, with ExclusionReason saying why. A run reports PASSED even
	// when it excludes nodes, so these keep that from being invisible.
	ExcludedNodes   []string           `json:"excludedNodes,omitempty"`
	ExclusionReason string             `json:"exclusionReason,omitempty"`
	Categories      []CategoryReport   `json:"categories"`
	FailedNodes     []string           `json:"failedNodes"`
	Result          string             `json:"result"` // "PASSED", "INCOMPLETE", "FAILED", or "RUNNING"
	NodeResults     []NodeResultReport `json:"nodeResults,omitempty"`
}

CertReport holds all data needed to render the certification report.

func Build

Build fetches Workflow and measurement data for a Certification (completed or running).

type CliqueReport

type CliqueReport struct {
	Name      string `json:"name"`
	Total     int    `json:"total"`     // total nodes in this clique
	Validated int    `json:"validated"` // nodes that passed
	Passed    bool   `json:"passed"`
}

CliqueReport holds per-clique validation status.

type DiagnoseReport

type DiagnoseReport struct {
	Stage                string                                         `json:"stage"`
	Rounds               int                                            `json:"rounds"`
	HealthyCount         int                                            `json:"healthyCount"`
	SuspectCount         int                                            `json:"suspectCount"`
	ConfirmedFaulty      []string                                       `json:"confirmedFaulty,omitempty"`
	InfrastructureFaults []nvcrev1alpha1.InfrastructureFault            `json:"infrastructureFaults,omitempty"`
	ScreeningResults     map[string]nvcrev1alpha1.DomainScreeningResult `json:"-"` // not serialized, used for rendering
	MaxBW                string                                         `json:"maxBW,omitempty"`
	MaxBWDomain          string                                         `json:"maxBWDomain,omitempty"`
	MaxBWNodeList        []string                                       `json:"maxBWNodes,omitempty"`
	MinBW                string                                         `json:"minBW,omitempty"`
	MinBWDomain          string                                         `json:"minBWDomain,omitempty"`
	MinBWNodeList        []string                                       `json:"minBWNodes,omitempty"`
	Tests                []DiagnoseTestRow                              `json:"tests,omitempty"`
}

DiagnoseReport holds results from the adaptive fault isolation algorithm.

type DiagnoseTestRow

type DiagnoseTestRow struct {
	Stage  string   `json:"stage"`            // screening, bisection, confirmation
	Name   string   `json:"name"`             // job name
	Nodes  []string `json:"nodes"`            // nodes in the group
	Domain string   `json:"domain,omitempty"` // clique/domain for screening tests
	BusBW  string   `json:"busBW"`            // peak bus bandwidth
	Passed bool     `json:"passed"`           // job succeeded
}

DiagnoseTestRow holds one test result from the diagnose algorithm.

type DomainReport

type DomainReport struct {
	Name      string `json:"name"` // e.g., "clique-0" or "" for no-topology case
	NodeCount int    `json:"nodeCount"`
	Goodput   string `json:"goodput"`  // runtime goodput ratio
	TFLOPs    string `json:"tflops"`   // avg TFLOPs per GPU
	StepTime  string `json:"stepTime"` // avg step time
}

DomainReport holds averaged training metrics for a topology domain.

type FailedGroupReport

type FailedGroupReport struct {
	Name       string            `json:"name"`
	NodeCount  int               `json:"nodeCount"`
	Nodes      []string          `json:"nodes,omitempty"`
	Reason     string            `json:"reason"` // e.g., "BackoffLimitExceeded (72 pods failed)"
	FailureLog *FailureLogReport `json:"failureLog,omitempty"`
}

FailedGroupReport holds details about a failed orchestration group.

type FailureLogReport added in v0.3.0

type FailureLogReport struct {
	PodName  string `json:"podName"`
	NodeName string `json:"nodeName"`
	ExitCode int32  `json:"exitCode,omitempty"`
	Reason   string `json:"reason,omitempty"`
	Tail     string `json:"tail,omitempty"`
}

FailureLogReport holds the diagnostic log captured from a failed workload pod.

type GroupBandwidthRow

type GroupBandwidthRow struct {
	GroupName string   `json:"groupName"` // e.g., "group-0" or "clique-0 (18 nodes)"
	Nodes     []string `json:"nodes"`     // node names in the group
	BusBW     string   `json:"busBW"`     // peak BusBW at largest message size
	BelowMin  bool     `json:"belowMin"`  // true if below minBusBandwidthGBps threshold
	Failed    bool     `json:"failed"`    // true if the group's Job failed
}

GroupBandwidthRow holds bandwidth for a single group in multi-group Workflows.

type IterationReport

type IterationReport struct {
	Number   int    `json:"number"`
	Status   string `json:"status"`   // Succeeded, Failed, Running
	Duration string `json:"duration"` // e.g., "5m 30s"
}

IterationReport holds per-iteration timing and outcome.

type NodeResultReport

type NodeResultReport struct {
	Name   string `json:"name"`
	Group  string `json:"group"`
	Rack   string `json:"rack,omitempty"`
	Status string `json:"status"` // "Passed" or "Failed"
}

NodeResultReport holds per-node pass/fail status for programmatic consumers.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL