NVIDIA Data Center GPU Manager (DCGM) is a project for gathering telemetry and measuring the health of NVIDIA GPUs
373
stars
49
forks
source link
python dcgm_structs.DcgmJSONEncoder does not recursively follow arrays #107
Open
blackwer opened 12 months ago
As written, the
DcgmJSONEncoder
only decodes arrays if they're at the root level, otherwise they're ignored and stored as generic object handles. In the type conditionals the serializer currently only checks if the nested values are_PrintableStructure
to recurse, even thoughArray
is also considered a valid type at the root level. https://github.com/NVIDIA/DCGM/blob/4e0a87a8c7a9af99e0d911c491d9a65204f1a30e/testing/python3/dcgm_structs.py#L495This came up when serializing
dcgm_agent.dcgmJobGetStats(handle.handle, str(jobId))
A basic fix might be:
Happy to contribute as a PR if this is considered a bug and not a feature. Could possibly impact https://github.com/NVIDIA/DCGM/blob/4e0a87a8c7a9af99e0d911c491d9a65204f1a30e/dcgm_wsgi/dcgm_wsgi.py#L134