Open Guillawme opened 1 year ago
Related to #151 — would there be support for making the output epoch numbers start at 1 instead of 0 on top of this? That way epoch "0" could be reserved e.g. for pre-training, and the numbers would be more intuitive, with the last epoch having the same number as the number of epochs.
Either way, zero-padding will be added in an upcoming release!
I agree: it would also be convenient as a user if the final epoch number matched the total number of epochs requested in the job (this kind of offset absolutely always trips me up when I look at results).
We are still planning to update the epoch numbering along these lines for v4.0.0, which is due out by the end of the summer; in the meantime, it's occurred to me that you can also use sort -t \. -k 2 -g
to get the proper ordering in the situation @Guillawme discussed above:
ls -1
reconstruct.-1.mrc
reconstruct.0.mrc
reconstruct.1.mrc
reconstruct.10.mrc
reconstruct.11.mrc
reconstruct.2.mrc
reconstruct.3.mrc
reconstruct.4.mrc
reconstruct.5.mrc
reconstruct.6.mrc
reconstruct.7.mrc
reconstruct.8.mrc
reconstruct.9.mrc
ls | sort -t \. -k 2 -g
reconstruct.-1.mrc
reconstruct.0.mrc
reconstruct.1.mrc
reconstruct.2.mrc
reconstruct.3.mrc
reconstruct.4.mrc
reconstruct.5.mrc
reconstruct.6.mrc
reconstruct.7.mrc
reconstruct.8.mrc
reconstruct.9.mrc
reconstruct.10.mrc
reconstruct.11.mrc
Describe the bug This is not a bug report, but a request for a small improvement in user experience.
To Reproduce Run
cryodrgn train_vae
or any other reconstruction (abinit_het
, etc.). The output directory contains filesweights.*.pkl
,z.*.pkl
and sometimespose.*.pkl
, with*
being the epoch number. But this number is not zero-padded, so listing files results in epoch numbers being out of order:Expected behavior Navigating the output files would be easier if epochs 0-9 were zero-padded to 2 digits (or 3? would anybody ever run more than 99 epochs?), giving 00-09. With this numbering, output files would sort more naturally when listed:
Additional context Output files from
cryodrgn analyze
and other analysis commands already have zero-padded indices (for example the volume filesvol_012.mrc
, etc.).