Description
When a job timeout is configured below 60 seconds, the job runner reports that the job timed out after 0 minutes.
The timeout handlers in packages/syft-job/src/syft_job/job_runner.py format the duration using integer division:
print(f" Job {job_name} timed out after {timeout // 60} minutes")
For example, a valid timeout of 30 seconds is displayed as 0 minutes.
How to Reproduce
-
Set the job timeout to 30 seconds:
export SYFT_DEFAULT_JOB_TIMEOUT_SECONDS=30
-
Run a job that takes longer than 30 seconds.
-
Wait for the job to time out.
-
Observe the following message:
Job <job_name> timed out after 0 minutes
Expected Behavior
Sub-minute timeouts should be reported in seconds, for example:
Job <job_name> timed out after 30 seconds
All job-execution timeout paths should use consistent, human-readable duration formatting.
Screenshots
Not applicable. The problem appears in the job runner’s console output.
System Information
- OS: Platform-independent
- OS Version: Not applicable
- Language Version: Python
- Package Manager Version: Not applicable
- Browser: Not applicable
- Browser Version: Not applicable
Additional Context
The same timeout // 60 formatting is used in multiple timeout-handling paths in job_runner.py. Tests should cover at least one timeout below 60 seconds and one timeout of 60 seconds or more.
Description
When a job timeout is configured below 60 seconds, the job runner reports that the job timed out after
0 minutes.The timeout handlers in
packages/syft-job/src/syft_job/job_runner.pyformat the duration using integer division:For example, a valid timeout of 30 seconds is displayed as
0 minutes.How to Reproduce
Set the job timeout to 30 seconds:
export SYFT_DEFAULT_JOB_TIMEOUT_SECONDS=30Run a job that takes longer than 30 seconds.
Wait for the job to time out.
Observe the following message:
Expected Behavior
Sub-minute timeouts should be reported in seconds, for example:
All job-execution timeout paths should use consistent, human-readable duration formatting.
Screenshots
Not applicable. The problem appears in the job runner’s console output.
System Information
Additional Context
The same
timeout // 60formatting is used in multiple timeout-handling paths injob_runner.py. Tests should cover at least one timeout below 60 seconds and one timeout of 60 seconds or more.