test/list.bend relies on unsafe/foreign
raw source on the hub · import bend-safetensors-reader@0.1.0.0/test/list.bend as MList
Prints one line a tensor (name, dtype, shape, data_offsets as hex) for the file given as the argument, sorted by offset, then the metadata count and the data size; or the reason the file is refused. test/check_list.py compares the output with Python's json reading of the same header.
4 imports
import Base import ../w64.bend as W import ../header.bend as H import ../st.bend as ST
Definitions
def dims source · line 9 · raw
@xs:List<&2, U32> -> String
def line source · line 18 · raw
@e:0xd8619c297e019f1c512e443a1b7ff426/header.Ent -> String
def show_all source · line 23 · raw
@es:List<&2, 0xd8619c297e019f1c512e443a1b7ff426/header.Ent> -> IO(Unit)
def len source · line 32 · raw
@xs:List<&2, 0xd8619c297e019f1c512e443a1b7ff426/header.KV> -> @+n:U32 -> U32
def report source · line 39 · raw
@r:Result<&2, &2, String, 0xd8619c297e019f1c512e443a1b7ff426/st.St> -> IO(Unit)
def arg source · line 48 · raw
@xs:List<&1, String> -> IO(Unit)
def main source · line 57 · raw
IO(Unit)