Skip to content

Challenge in accessing GPU metric #792

Open
@gitvicky

Description

@gitvicky

This is with the latest version of simvue using python 3.11

Exception in thread Thread-2 (_heartbeat):
Traceback (most recent call last):
File "/home/ir-gopa2/rds/rds-ukaea-ap001/ir-gopa2/Conda/envs/torch_environment/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
self.run()
File "/home/ir-gopa2/rds/rds-ukaea-ap001/ir-gopa2/Conda/envs/torch_environment/lib/python3.11/threading.py", line 982, in run
self._target(*self._args, **self._kwargs)
File "/home/ir-gopa2/rds/rds-ukaea-ap001/ir-gopa2/Conda/envs/torch_environment/lib/python3.11/site-packages/simvue/run.py", line 427, in _heartbeat
self._get_internal_metrics(system_metrics_step=sys_step)
File "/home/ir-gopa2/rds/rds-ukaea-ap001/ir-gopa2/Conda/envs/torch_environment/lib/python3.11/site-packages/simvue/run.py", line 369, in _get_internal_metrics
_current_system_measure.to_dict(),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ir-gopa2/rds/rds-ukaea-ap001/ir-gopa2/Conda/envs/torch_environment/lib/python3.11/site-packages/simvue/metrics.py", line 164, in to_dict
_metrics[f"{RESOURCES_METRIC_PREFIX}/gpu.utilisation.percent.{i}"] = gpu[
^^^^
TypeError: tuple indices must be integers or slices, not str

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions