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

bad float/int [MachineAttrGPUs_GlobalMemoryMb0] #25

Open
alemsh opened this issue Sep 28, 2023 · 1 comment
Open

bad float/int [MachineAttrGPUs_GlobalMemoryMb0] #25

alemsh opened this issue Sep 28, 2023 · 1 comment
Assignees
Labels

Comments

@alemsh
Copy link
Contributor

alemsh commented Sep 28, 2023

Seeing the following in logs

INFO root : bad float/int [MachineAttrGPUs_GlobalMemoryMb0]: classad.classad.Value.Undefined
Traceback (most recent call last):
  File "/monitoring/condor_utils.py", line 633, in filter_keys
    data[k] = float(data[k])
classad.ClassAdValueError: Unable to convert expression to numeric type.

It seems that these are a classad expression, and could probably be evaluated like

data[k] = float(data[k].eval())

which would reduce the amount of errors that clog the logs

@alemsh alemsh added the bug label Sep 28, 2023
@alemsh alemsh self-assigned this Sep 28, 2023
@dsschult
Copy link
Collaborator

dsschult commented Sep 28, 2023

So, you should compare the value with classad.Value.Undefined before using it.

As an example:

if data['MachineAttrGPUs_GlobalMemoryMb0'] != classad.Value.Undefined:
  gpumem = float(data['MachineAttrGPUs_GlobalMemoryMb0'])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants