Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handling non-numeric TRES #10

Open
paciorek opened this issue Sep 20, 2023 · 0 comments
Open

handling non-numeric TRES #10

paciorek opened this issue Sep 20, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@paciorek
Copy link
Collaborator

When a TRES value is not numeric (e.g., mem=512M), sq errors:

(Pdb) qos_df['GrpTRES']
102    cpu=1120,mem=5151200M
Name: GrpTRES, dtype: object
(Pdb) qos_df['GrpTRES'].values[0]
'cpu=1120,mem=5151200M'
(Pdb) parse_tres(qos_df['GrpTRES'].values[0])
*** ValueError: invalid literal for int() with base 10: '5151200M'

I think a simple fix is to use str() instead of int() in parse_tres:

tres[key] = str(value) #  int(value)

I don't think the values produced by parse_tres really need to be numeric, but it would be good to think more about it.

@paciorek paciorek added the bug Something isn't working label Sep 20, 2023
@paciorek paciorek self-assigned this Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant