autoweka
Class Wrapper

java.lang.Object
  extended by autoweka.Wrapper
Direct Known Subclasses:
IRaceWrapper, SMACWrapper, SubProcessWrapper

public class Wrapper
extends java.lang.Object

Generic class that gets called from an SMBO method, completes the evaluation, and returns the result back up to the SMBO method. The command line arguments for these wrappers consist of two portions, a number of options that specify seeds/properties that relate to the wrapper itself, followed by the -wrapper argument. Depending on the SMBO method, this is where you specify the datasetString that you want to pass off to the InstanceGenerator, along with any other options that are required. The remainder of the arguments after the sub classes have processed the -wrapper are going to be passed off to the classifier runner for evaluation. There are a number of 'events' that occur during the run of a wrapper - if you need to do something special here you should just be able to override these and inject the correct behaviour as needed


Field Summary
protected  java.lang.String mExperimentSeed
           
protected  java.lang.String mInstance
           
protected  java.util.Properties mProperties
           
protected  java.lang.String mResultMetric
           
protected  ClassifierRunner mRunner
           
protected  java.lang.String mSeed
           
protected  float mTimeout
           
 
Constructor Summary
Wrapper()
           
 
Method Summary
protected  ClassifierResult _doRun(java.util.List<java.lang.String> runnerArgs)
          Actually does the run of the Classifier Runner.
protected  void _postRun()
          Called just after _doRun();
protected  void _preRun()
          Called just before _doRun();
protected  void _processParameter(java.lang.String arg, java.util.Queue<java.lang.String> args)
          Override this when you want to get at parameters before the -wrapper.
protected  void _processResults(ClassifierResult res)
          Called once the run has completed (or been terminated), the results should be sent back to the SMBO method here
protected  void _processWrapperParameterStart(java.util.Queue<java.lang.String> args)
          Override this when you want to get at parameters as soon as you hit the -wrapper.
 void run(java.lang.String[] argsArray)
          Runs the wrapper with the given command line arguments - see the class description for full details
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mSeed

protected java.lang.String mSeed

mExperimentSeed

protected java.lang.String mExperimentSeed

mInstance

protected java.lang.String mInstance

mTimeout

protected float mTimeout

mRunner

protected ClassifierRunner mRunner

mProperties

protected java.util.Properties mProperties

mResultMetric

protected java.lang.String mResultMetric
Constructor Detail

Wrapper

public Wrapper()
Method Detail

run

public void run(java.lang.String[] argsArray)
Runs the wrapper with the given command line arguments - see the class description for full details


_doRun

protected ClassifierResult _doRun(java.util.List<java.lang.String> runnerArgs)
Actually does the run of the Classifier Runner. You should only override this if you need to do a number of different runs for each wrapper invocation


_processWrapperParameterStart

protected void _processWrapperParameterStart(java.util.Queue<java.lang.String> args)
Override this when you want to get at parameters as soon as you hit the -wrapper. Consume any extra arguments from the Queue that should not be passed on to the ClassifierRunner


_processParameter

protected void _processParameter(java.lang.String arg,
                                 java.util.Queue<java.lang.String> args)
Override this when you want to get at parameters before the -wrapper. Consume any extra arguments from the Queue that you don't want to process again


_preRun

protected void _preRun()
Called just before _doRun();


_postRun

protected void _postRun()
Called just after _doRun();


_processResults

protected void _processResults(ClassifierResult res)
Called once the run has completed (or been terminated), the results should be sent back to the SMBO method here