stdout : vertical align outputs for better readibility
This commit is contained in:
parent
489537e6cf
commit
3173a62eb9
2 changed files with 10 additions and 9 deletions
|
@ -951,8 +951,9 @@ class OutputFile:
|
|||
|
||||
ndarrays = bounded_parallel_map(do_item, model.items(), concurrency=8)
|
||||
for i, ((name, lazy_tensor), ndarray) in enumerate(zip(model.items(), ndarrays)):
|
||||
size = ' x '.join(map(str, lazy_tensor.shape))
|
||||
print(f"[{i+1}/{len(model)}] Writing tensor {name}, size {size}...")
|
||||
size = ' x '.join(f"{dim:6d}" for dim in lazy_tensor.shape)
|
||||
padi = len(str(len(model)))
|
||||
print(f"[{i+1:{padi}d}/{len(model)}] Writing tensor {name:38s} | size {size:16} | type {lazy_tensor.data_type}")
|
||||
of.write_tensor_header(name, lazy_tensor.shape, lazy_tensor.data_type)
|
||||
ndarray.tofile(of.fout)
|
||||
of.fout.close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue