You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following code snippet running on Ubuntu 20.04 on Windows Subsystem for Linux (WSL).
from pyJoules.energy_meter import measure_energy
@measure_energy
def foo():
print("HERE")
foo()
I get the following stack trace error:
WARNING:root:pynvml not found you can't use NVIDIA devices
HERE
Traceback (most recent call last):
File "test.py", line 7, in <module>
foo()
File "/home/kshivvy/venv/lib/python3.8/site-packages/pyJoules/energy_meter.py", line 298, in wrapper_measure
handler.process(energy_meter.get_trace())
File "/home/kshivvy/venv/lib/python3.8/site-packages/pyJoules/energy_meter.py", line 160, in get_trace
return self._generate_trace()
File "/home/kshivvy/venv/lib/python3.8/site-packages/pyJoules/energy_meter.py", line 169, in _generate_trace
domains = self._get_domain_list()
File "/home/kshivvy/venv/lib/python3.8/site-packages/pyJoules/energy_meter.py", line 166, in _get_domain_list
return reduce(operator.add, [device.get_configured_domains() for device in self.devices])
TypeError: reduce() of empty sequence with no initial value
Doe pyJoules support WSL? Would I need to do a full Linux partition on my laptop or buy a machine with Linux preinstalled? Or is there an alternative way to profile energy used by specific lines of code?
Thanks,
Keshav
The text was updated successfully, but these errors were encountered:
I'm afraid that pyJoules does not support WSL. IHMO, it is because WSL does not provide the sysfs, which is the pseudo filesystem that allows pyJoules to measure the energy consumption, i.e. read RAPL. However, I'm not an expert, and contributors might confirm.
I think that it would be better, or easier would be more accurate, to have a complete Linux running directly on the machine.
@altor @rouvoy @chakib-belgaid @danglotb
I have the following code snippet running on Ubuntu 20.04 on Windows Subsystem for Linux (WSL).
I get the following stack trace error:
Doe pyJoules support WSL? Would I need to do a full Linux partition on my laptop or buy a machine with Linux preinstalled? Or is there an alternative way to profile energy used by specific lines of code?
Thanks,
Keshav
The text was updated successfully, but these errors were encountered: