diff options
author | Georgi Gerganov <ggerganov@gmail.com> | 2023-04-16 13:58:48 +0300 |
---|---|---|
committer | Georgi Gerganov <ggerganov@gmail.com> | 2023-04-16 13:59:27 +0300 |
commit | 3173a62eb9f90b94fb3184131032c1c8b7aa8d86 (patch) | |
tree | a73941c26cbcbe9b42d12bd25f8b059c9c92fe09 /convert.py | |
parent | 489537e6cf6c93b74a029a11533dbcaa89791dcc (diff) |
stdout : vertical align outputs for better readibility
Diffstat (limited to 'convert.py')
-rw-r--r-- | convert.py | 5 |
1 files changed, 3 insertions, 2 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() |