Sub-minute job timeouts are reported as zero minutes
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
Research direction
The issue is in packages/syft-job/src/syft_job/job_runner.py. Look for the print statement that reports the timeout. You need to change the formatting to show seconds for timeouts under 60 seconds. Run a job with SYFT_DEFAULT_JOB_TIMEOUT_SECONDS=30 to reproduce the bug and verify the fix.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Python
- Stars
- 10k
- Forks
- 2k
- Avg merge
- 23h 19m
- Merged PRs (30d)
- 21
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OpenMined/PySyft
-
Type: Bug :bug:
Difficulty 3/5 1-2 days Newbie friendliness 65/100
-
Enclave pkg:syft-enclave
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
Type: Testing :test_tube:
Difficulty 3/5 1-2 days Newbie friendliness 38/100
-
Type: Bug :bug:
-
Type: Improvement :chart_with_upwards_trend:
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in OpenMined/PySyft
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
stephrobert/dsoxlab#238 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
sublimehq/package_control#1780 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
nwg-piotr/nwg-displays#145 ·