Print job complete percentage in manager (if available) - #302
Conversation
dorian-K
commented
Jun 11, 2026
There was a problem hiding this comment.
Pull request overview
This PR enhances the manager’s running-job status line to show a job’s completion percentage when the job provides a completed_fraction() value, improving at-a-glance progress visibility during execution.
Changes:
- Extend
Manager.print_job_state()to appendcompleted_fraction()as a[xx.x%]suffix for running jobs (when available). - Preserve existing behavior of appending
job.info()output for running jobs.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I want to raise the question "should we really do this?"
into which improves readability. Maybe even put some code in a separate function and then just And all of this just for the tiny additional information about some estimated finish time (which I think is irrelevant as I anyway cannot change it and the job finishes when it does 🤷 ) |
No. Not more files than before are being opened. This is only for jobs which support the You are right that the LR file that is opened by So I'm not sure this is really such an issue. |
|
I've read through your comments and i agree with most of them. I actually already noticed a slight slowdown with only 30 running jobs, as before the print was instant, and now it printed line-by-line for maybe 100-200ms until it was done. So for thousands of jobs this may get super annoying. This and the slurm-specific issue could likely be improved by using the file's metadata ("birthtime"), but this is, at the moment, not easily accessible in python without external libraries or subprocess calls. And anyways it would still be a crude estimate and be wildly inaccurate for interrupted/rescheduled jobs as you've said above. So i have decided to remove the ETA thing again and only keep the percentage. Probably better to implement this feature individually for some (long running) jobs in their |
Python 3.12+ populates this on compatible Linux systems Or Python 3.11 and Older: info = os.statx(os.AF_DECNET, path, mask=os.STATX_BIRTHTIME)
# Check if the filesystem actually returned the birthtime
if info.stx_mask & os.STATX_BIRTHTIME:
birthtime = info.stx_btime.tv_sec |
|
|
The command |
|
Ok I guess then we would need a better way to get the job start time. Maybe extending the engine API or so. Or storing it explicitly in a file when the job starts. |
Yes. But in the case of interrupted jobs that need multiple submissions to finish (i.e. training jobs), this would again be inaccurate, just like the previous approach. Perhaps we should leave it for now But anyways, I believe this pull request is ready to be merged? |
michelwi
left a comment
There was a problem hiding this comment.
I believe this pull request is ready to be merged?
yes, we can merge as is and work on a better implementation for the ETA later.
