Can not access instrumentation environment

230 views
Skip to first unread message

Grégoire Martinon

unread,
Feb 13, 2018, 9:18:05 AM2/13/18
to MOA users
Hi all,

I was playing with learningCurve and Measurement classes, in pretty much the same way as in moa.tasks.EvaluatePrequential.java. When I run the program, the following lines

learningCurve.insertEntry(new LearningEvaluation(
               
new Measurement[]{
                 
new Measurement("learning evaluation instances", instancesProcessed),
               
},
               evaluator
, learner));


trigger the following warning

Can not access instrumentation environment.
Please check if jar file containing SizeOfAgent class is
specified
in the java's "-javaagent" command line argument.

I am working on linux and to compile and run the program, I simply type

javac myProgram.java
java myProgram

I also have to mention that I have put in my .bash_profile the following line

export CLASSPATH=$CLASSPATH:path_to_moa/moa.jar

I don't understand:

- why I get this warning about the javaagent
- why this warning goes away when I don't use LearningCurve
- how can I deal properly with this warning and suppress it cleanly

I don't work in the MOA directory, so I am reluctant to use a java -javaagent:sizeofag command.

Jean Paul Barddal

unread,
Feb 14, 2018, 6:59:07 AM2/14/18
to MOA users
Hello Grégoire,

I believe this warning relates to the sizeofag.jar file, which is used to measure the memory consumption of our classifiers during experiments.
If sizeofag.jar is not being used, you should see 0s (zeroes) in the RAM-Hours column if the learning curve.
Can you please try to append this file in the classpath to see if the warning goes away and that actual memory consumption values are outputted?

Cheers!

Grégoire Martinon

unread,
Feb 15, 2018, 5:32:25 AM2/15/18
to MOA users

Thanks for your answer !

I tried to add the sizeofag.jar file in the classpath, but the warning did persist. As a workaround, I just created an alias of the java command with the right -javaagent option (but any other solution is welcome).
By the way, I do not measure the RAM-Hours (see code snippet in first post, the corresponding measurement is missing), so in my output file, there is no RAM-Hours column, intentionally.
Reply all
Reply to author
Forward
0 new messages