models

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicNodeAttributes added in v0.4.0

type BasicNodeAttributes struct {
	NVLink string `yaml:"nvlink,omitempty"`
}

type CapacityBlock

type CapacityBlock struct {
	Nodes      []string            `yaml:"nodes"`
	Attributes BasicNodeAttributes `yaml:"attributes"`
}

type GPU added in v0.4.0

type GPU struct {
	Index     int    `yaml:"index"`
	PCIBusID  string `yaml:"pci_bus_id"`
	UUID      string `yaml:"uuid"`
	Model     string `yaml:"model"`
	MemoryMiB int    `yaml:"memory_mib"`
}

type Model

type Model struct {
	Switches       map[string]*Switch       `yaml:"switches"`
	Nodes          map[string]*Node         `yaml:"nodes"`
	CapacityBlocks map[string]CapacityBlock `yaml:"capacity_blocks"`

	// derived
	Instances []topology.ComputeInstances `yaml:"-"`
}

func NewModelFromData added in v0.3.0

func NewModelFromData(data []byte, fname string) (*Model, error)

func NewModelFromFile

func NewModelFromFile(fname string) (*Model, error)

func (*Model) ToGraph

func (model *Model) ToGraph() (*topology.Graph, map[string]string)

func (*Model) UnmarshalYAML added in v0.4.0

func (m *Model) UnmarshalYAML(value *yaml.Node) error

type Node

type Node struct {
	Name          string         `yaml:"name,omitempty"`
	Attributes    NodeAttributes `yaml:"attributes"`
	CapacityBlock string         `yaml:"capacity_block_id"`

	Metadata  map[string]string `yaml:"-"`
	NetLayers []string          `yaml:"-"`
}

func (*Node) String

func (n *Node) String() string

type NodeAttributes added in v0.4.0

type NodeAttributes struct {
	BasicNodeAttributes `yaml:",inline"`
	Status              string `yaml:"status,omitempty"`
	Timestamp           string `yaml:"timestamp,omitempty"`
	GPUs                []GPU  `yaml:"gpus,omitempty"`
}

type Switch

type Switch struct {
	Name     string            `yaml:"name,omitempty"`
	Metadata map[string]string `yaml:"metadata"`
	Switches []string          `yaml:"switches"`
	Nodes    []string          `yaml:"nodes"`
}

Jump to

Keyboard shortcuts

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