deepmodeling / deepmodeling/dpti
[Code scan] Unknown remote scheduler statuses raise AttributeError
- Dominant language
- Python
- Stars
- 42
- Forks
- 27
- PR merge metrics
- No merged PRs in 30d
Description
Source: Codex global repository scan of deepmodeling/dpti at commit b719828e7eeb571bd26411430197cd74ea78e38c.
Project: https://github.com/orgs/deepmodeling/projects/27
Problem
`JobStatus` defines `unknow`, but the Slurm/PBS status checks return `JobStatus.unknown` for unrecognized scheduler state words. That branch raises `AttributeError` instead of returning a status.
Code references
https://github.com/deepmodeling/dpti/blob/b719828e7eeb571bd26411430197cd74ea78e38c/dpti/lib/RemoteJob.py#L12
https://github.com/deepmodeling/dpti/blob/b719828e7eeb571bd26411430197cd74ea78e38c/dpti/lib/RemoteJob.py#L323
https://github.com/deepmodeling/dpti/blob/b719828e7eeb571bd26411430197cd74ea78e38c/dpti/lib/RemoteJob.py#L455
Reproduction
Mock `squeue` or `qstat` output with an unexpected status word and call `check_status()`.
Expected result
The enum spelling and return branches should agree so unknown scheduler states are represented without crashing.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in dpti/lib/RemoteJob.py at the JobStatus definition and the Slurm/PBS status checks around lines 323 and 455. Mock squeue or qstat output containing an unexpected status word, then call check_status(). Done means the unknown-status branches agree with the enum spelling and return a status without raising AttributeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100