Skip to content

Conversation

amirafzali
Copy link
Member

Summary:
With SLURM <= 23.02, job_state was a string and not a list. Even with the list we only use the first element.
Added support for string type

https://slurm.schedmd.com/archive/slurm-23.02-latest/rest_api.html#v0_0_39_job_state

Differential Revision: D83690140

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 1, 2025
@facebook-github-bot
Copy link
Contributor

@amirafzali has exported this pull request. If you are a Meta employee, you can view the originating Diff in D83690140.

@codecov-commenter
Copy link

codecov-commenter commented Oct 1, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.66%. Comparing base (3b5df3a) to head (5cfebe7).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1137   +/-   ##
=======================================
  Coverage   91.65%   91.66%           
=======================================
  Files          83       83           
  Lines        6422     6427    +5     
=======================================
+ Hits         5886     5891    +5     
  Misses        536      536           
Flag Coverage Δ
unittests 91.66% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kiukchung
Copy link
Contributor

please fix torchx/schedulers/slurm_scheduler.py:76:26 Missing parameter annotation [2]: Parameter jobmust have a type other thanAny`. pyre error before landing

@amirafzali
Copy link
Member Author

amirafzali commented Oct 1, 2025

please fix torchx/schedulers/slurm_scheduler.py:76:26 Missing parameter annotation [2]: Parameter jobmust have a type other thanAny`. pyre error before landing

hm it's a loaded json (https://github.com/meta-pytorch/torchx/blob/main/torchx/schedulers/slurm_scheduler.py#L654-L663), do we have an existing type for this?

@kiukchung
Copy link
Contributor

please fix torchx/schedulers/slurm_scheduler.py:76:26 Missing parameter annotation [2]: Parameter jobmust have a type other thanAny`. pyre error before landing

hm it's a loaded json (https://github.com/meta-pytorch/torchx/blob/main/torchx/schedulers/slurm_scheduler.py#L654-L663), do we have an existing type for this?

pyre doesn't like it when public functions use Any. For json repr, you can use dict[str, object]

Summary:

With SLURM <= 23.02, job_state was a string and not a list. Even with the list we only use the first element.
Added support for string type

https://slurm.schedmd.com/archive/slurm-23.02-latest/rest_api.html#v0_0_39_job_state

Reviewed By: kiukchung

Differential Revision: D83690140
@facebook-github-bot facebook-github-bot merged commit 303736a into meta-pytorch:main Oct 2, 2025
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants