pyRAPL icon indicating copy to clipboard operation
pyRAPL copied to clipboard

@pyRAPL.measure in demo code returns error: AttributeError: module 'pyRAPL' has no attribute 'measure'

Open stephbuon opened this issue 2 years ago • 1 comments

Hi,

When I try your demo code (from PyPI and this repo):

import pyRAPL

pyRAPL.setup() 

@pyRAPL.measure
def foo():
		# Instructions to be evaluated.

    foo()

I get an attribute error: AttributeError: module 'pyRAPL' has no attribute 'measure'.

Can I please request guidance?

Thank you! Steph

stephbuon avatar Feb 18 '22 14:02 stephbuon

Hi!

I hope you solved your problem since you asked but I'll answer anyway to others who might have the same problem. It appears the README on the repo is not up to date (or just incorrect). The actual decorator to use is @pyRAPL.measureit, as described in the docs: https://pyrapl.readthedocs.io/en/latest/quickstart.html

It solved the problem for me.

adhooge avatar Mar 29 '22 12:03 adhooge