← Back to events
ActiveAIRelease

trunk/1c9a207306db2d405aedde6ddc876d5148f6bd6c: Fix extract_scripts step-index zero-padding off-by-one (#187731)

Photo: PyTorch Releases

What happened

extract_scripts.py numbers each extracted step with a 1-based index ( enumerate(steps, start=1) ), so the indices run 1..len(steps) . The zero-pad width, however, is computed from len(steps) - 1 : index_chars = len ( str ( len ( steps ) - 1 )) for i , step in enumerate ( steps , start = 1 ): ... filename = f" { i :0{ index_chars } } { sanitized } { extension } " When a job has exactly a power-of-ten number of steps…

Summary assembled by rule from the sources below

Why it's spreading

Sources