HPC-CRI / EA2P

A flexible tool for accurate and multi device energy measurement
MIT License
3 stars 1 forks source link

ValueError: could not convert string to float: '9.419.74' #1

Open JJ opened 3 months ago

JJ commented 3 months ago

I have downloaded this in its latest version, using it as context:

from eckity.algorithms.simple_evolution import SimpleEvolution
from eckity.subpopulation import Subpopulation
from examples.treegp.non_sklearn_mode.symbolic_regression.sym_reg_evaluator import SymbolicRegressionEvaluator

from ea2p import PowerMeter

def main():
    algo = SimpleEvolution(Subpopulation(SymbolicRegressionEvaluator()))
    with PowerMeter() as meter:
        algo.evolve()
    print(f'algo.execute(x=2,y=3,z=4): {algo.execute(x=2, y=3, z=4)}')

Here's the config file:

{
    "devices_list": "cpu, gpu, ram",
    "sampling_freq": 1.0,
    "energy_unit": "J"
}

Pretty vanilla, uh?

This is the produced AMD powerlog file

# started on Tue May 28 10:25:25 2024

 Performance counter stats for 'system wide':

N0        1           9.419,74 Joules power/energy-pkg/                                           

     136,209799909 seconds time elapsed

I would say it's choking on the ES locale, could that be the reason?

nanaRoblex commented 1 month ago

Hello JJ

Thank you for your feedback.

You are right about the issue with the ES locale data representation. Initially, I didn't account for locale differences in the AMD parse_log function to extract energy data, which caused these issues. Linux Perf locale varies greatly from one system to another. For example, it returns "9.419,74 Joules" on your machine, "9 419,74 Joules" on mine, and "9,419,74 Joules" on another server I tested, all representing the same number.

I have now fixed the issue. Please test it again and let me know if it work on your machine when you get some times.

Thanks again for your feedback, and I apologize for the late reply. I was working on another project and didn't receive notifications about this issue in time.