Documentation
¶
Index ¶
Constants ¶
View Source
const WEIGHT_FILE = "weights.json"
View Source
const WEIGHT_FILE_SIZE_EXCLUSION = 1024 * 1024
View Source
const WEIGHT_FILE_SIZE_INCLUSION = 128 * 1024 * 1024
Variables ¶
View Source
var WEIGHT_FILE_EXCLUSIONS = []string{
".gif",
".ipynb",
".jpeg",
".jpg",
".log",
".mp4",
".png",
".svg",
".webp",
}
View Source
var WEIGHT_FILE_INCLUSIONS = []string{
".ckpt",
".h5",
".onnx",
".pb",
".pbtxt",
".pt",
".pth",
".safetensors",
".tflite",
}
Functions ¶
func FindWeights ¶
func FindWeights(fw FileWalker) ([]string, []string, error)
Types ¶
type FileWalker ¶
FileWalker is a function type that walks the file tree rooted at root, calling walkFn for each file or directory in the tree, including root.
type Manifest ¶ added in v0.8.3
Manifest contains metadata about weights files in a model
func LoadManifest ¶ added in v0.8.3
LoadManifest loads a manifest from a file
func (*Manifest) AddFile ¶ added in v0.8.3
AddFile adds a file to the manifest, calculating its CRC32 checksum
type Metadata ¶ added in v0.8.3
type Metadata struct { // CRC32 is the CRC32 checksum of the file encoded as a hexadecimal string CRC32 string `json:"crc32"` }
Metadata contains information about a file
type Weight ¶ added in v0.14.0
type Weight struct { Path string `json:"path"` Digest string `json:"digest"` Timestamp time.Time `json:"timestamp"` Size int64 `json:"size"` }
func FindFastWeights ¶ added in v0.14.0
func ReadFastWeights ¶ added in v0.14.0
type WeightManifest ¶ added in v0.14.4
Click to show internal directories.
Click to hide internal directories.