Skip to content

Location of billable_tres / Billing of Trackable Resources (TRES) in New API #342

Closed Answered by tazend
chriswasser asked this question in Q&A
Discussion options

You must be logged in to vote

Hey,

yes, getting the info via tres-alloc / tres-req is also an option, but luckily they provide a standalone-field in the C-API which I can just parse.
I just added this new field to the pyslurm.Job class. So now, you should be able to do:

import pyslurm

jobs = [job for job_id, job in pyslurm.Jobs.load().items()]
print("job", jobs[0].id, "is billed", jobs[0].billable_tres, "trackable resources")

I'd recommend directly using the 22.5.x branch for now: https://github.com/PySlurm/pyslurm/tree/22.5.x

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@chriswasser
Comment options

@tazend
Comment options

Answer selected by chriswasser
@chriswasser
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants