def __init__(self,<EOL>modelID,<EOL>jobID,<EOL>params,<EOL>predictedField,<EOL>reportKeyPatterns,<EOL>optimizeKeyPattern,<EOL>jobsDAO,<EOL>modelCheckpointGUID,<EOL>logLevel=None,<EOL>predictionCacheMaxRecords=None):
super(OPFDummyModelRunner, self).__init__(modelID=modelID,<EOL>jobID=jobID,<EOL>predictedField=predictedField,<EOL>experimentDir=None,<EOL>reportKeyPatterns=reportKeyPatterns,<EOL>optimizeKeyPattern=optimizeKeyPattern,<EOL>jobsDAO=jobsDAO,<EOL>modelCheckpointGUID=modelCheckpointGUID,<EOL>logLevel=logLevel,<EOL>predictionCacheMaxRecords=None)<EOL>self._predictionCacheMaxRecords = predictionCacheMaxRecords<EOL>self._streamDef = copy.deepcopy(self._DUMMY_STREAMDEF)<EOL>self._params = copy.deepcopy(self._DEFAULT_PARAMS)<EOL>if '<STR_LIT>' in paramsand '<STR_LIT>' in params['<STR_LIT>']:<EOL><INDENT>self.modelIndex=params['<STR_LIT>']['<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>self.modelIndex = OPFDummyModelRunner.modelIndex<EOL>OPFDummyModelRunner.modelIndex += <NUM_LIT:1><EOL><DEDENT>self._loadDummyModelParameters(params)<EOL>self._logger.debug("<STR_LIT>", self._params)<EOL>self._busyWaitTime = self._params['<STR_LIT>']<EOL>self._iterations = self._params['<STR_LIT>']<EOL>self._doFinalize = self._params['<STR_LIT>']<EOL>self._delay = self._params['<STR_LIT>']<EOL>self._sleepModelRange = self._params['<STR_LIT>']<EOL>self._makeCheckpoint = self._params['<STR_LIT>']<EOL>self._finalDelay = self._params['<STR_LIT>']<EOL>self._exitAfter = self._params['<STR_LIT>']<EOL>self.randomizeWait = self._params['<STR_LIT>']<EOL>if self._busyWaitTime is not None:<EOL><INDENT>self.__computeWaitTime()<EOL><DEDENT>if self._params['<STR_LIT>'] is not Noneand self._params['<STR_LIT>'] is not None:<EOL><INDENT>raise RuntimeError("<STR_LIT>""<STR_LIT>")<EOL><DEDENT>self.metrics = None<EOL>self.metricValue = None<EOL>if self._params['<STR_LIT>'] is not None:<EOL><INDENT>self.metrics = eval(self._params['<STR_LIT>'])<EOL><DEDENT>elif self._params['<STR_LIT>'] is not None:<EOL><INDENT>self.metricValue = float(self._params['<STR_LIT>'])<EOL><DEDENT>else:<EOL><INDENT>self.metrics = OPFDummyModelRunner.metrics[<NUM_LIT:0>]<EOL><DEDENT>if self._params['<STR_LIT>'] is not None:<EOL><INDENT>self._model = self.__createModel(self._params['<STR_LIT>'])<EOL>self.__fieldInfo = self._model.getFieldInfo()<EOL><DEDENT>self._sysExitModelRange = self._params['<STR_LIT>']<EOL>if self._sysExitModelRange is not None:<EOL><INDENT>self._sysExitModelRange = [int(x) for x in self._sysExitModelRange.split('<STR_LIT:U+002C>')]<EOL><DEDENT>self._delayModelRange = self._params['<STR_LIT>']<EOL>if self._delayModelRange is not None:<EOL><INDENT>self._delayModelRange = [int(x) for x in self._delayModelRange.split('<STR_LIT:U+002C>')]<EOL><DEDENT>self._errModelRange = self._params['<STR_LIT>']<EOL>if self._errModelRange is not None:<EOL><INDENT>self._errModelRange = [int(x) for x in self._errModelRange.split('<STR_LIT:U+002C>')]<EOL><DEDENT>self._computModelDelay()<EOL>self._jobFailErr = self._params['<STR_LIT>']<EOL>self._logger.debug("<STR_LIT>", self._modelID, self._params)<EOL>
Parameters:
-------------------------------------------------------------------------
modelID:    ID of this model in the models table

jobID:

params:     a dictionary of parameters for this dummy model. The
            possible keys are:

              delay:          OPTIONAL-This specifies the amount of time
                              (in seconds) that the experiment should wait
                              before STARTING to process records. This is
                              useful for simulating workers that start/end
                              at different times

              finalDelay:     OPTIONAL-This specifies the amount of time
                              (in seconds) that the experiment should wait
                              before it conducts its finalization operations.
                              These operations include checking if the model
                              is the best model, and writing out checkpoints.

              waitTime:       OPTIONAL-The amount of time (in seconds)
                              to wait in a busy loop to simulate
                              computation time on EACH ITERATION

              randomizeWait:  OPTIONAL-([0.0-1.0] ). Default:None
                              If set to a value, the above specified
                              wait time will be randomly be dithered by
                              +/- <randomizeWait>% of the specfied value.
                              For example, if randomizeWait=0.2, the wait
                              time will be dithered by +/- 20% of its value.

              iterations:     OPTIONAL-How many iterations to run the model
                              for. -1 means run forever (default=1)

              metricFunctions: OPTIONAL-A list of single argument functions
                               serialized as strings, which return the metric
                               value given the record number.

                               Mutually exclusive with metricValue

              metricValue:    OPTIONAL-A single value to use for the metric
                              value (used to debug hypersearch).

                              Mutually exclusive with metricFunctions

              finalize:       OPTIONAL-(True/False). Default:True
                              When False, this will prevent the model from
                              recording it's metrics and performing other
                              functions that it usually performs after the
                              model has finished running

              permutationParams: A dict containing the instances of all the
                                  variables being permuted over

              experimentDirectory: REQUIRED-An absolute path to a directory
                                   with a valid description.py file.

                                   NOTE: This does not actually affect the
                                   running of the model or the metrics
                                   produced. It is required to create certain
                                   objects (such as the output stream)

              makeCheckpoint:     True to actually write a checkpoint out to
                                  disk (default: False)

              sysExitModelRange: A string containing two integers 'firstIdx,
                              endIdx'. When present, if we are running the
                              firstIdx'th model up to but not including the
                              endIdx'th model, then do a sys.exit() while
                              running the model. This causes the worker to
                              exit, simulating an orphaned model.

              delayModelRange: A string containing two integers 'firstIdx,
                              endIdx'. When present, if we are running the
                              firstIdx'th model up to but not including the
                              endIdx'th model, then do a delay of 10 sec.
                              while running the model. This causes the
                              worker to run slower and for some other worker
                              to think the model should be orphaned.

              exitAfter:      The number of iterations after which the model
                              should perform a sys exit. This is an
                              alternative way of creating an orphaned model
                              that use's the dummmy model's modelIndex
                              instead of the modelID

              errModelRange: A string containing two integers 'firstIdx,
                              endIdx'. When present, if we are running the
                              firstIdx'th model up to but not including the
                              endIdx'th model, then raise an exception while
                              running the model. This causes the model to
                              fail with a CMPL_REASON_ERROR reason

              sleepModelRange: A string containing 3 integers 'firstIdx,
                              endIdx: delay'. When present, if we are running
                              the firstIdx'th model up to but not including
                              the endIdx'th model, then sleep for delay
                              seconds at the beginning of the run.

              jobFailErr: If true, model will raise a JobFailException
                          which should cause the job to be marked as
                          failed and immediately cancel all other workers.

predictedField:     Name of the input field for which this model is being
                    optimized

reportKeyPatterns:  list of items from the results dict to include in
                    the report. These can be regular expressions.
optimizeKeyPattern: Which report item, if any, we will be optimizing for.
                    This can also be a regular expression, but is an error
                    if it matches more than one key from the experiment's
                    results.

jobsDAO:            Jobs data access object - the interface to the
                    jobs database which has the model's table.

modelCheckpointGUID:
                    A persistent, globally-unique identifier for
                    constructing the model checkpoint key

logLevel:           override logging level to this value, if not None
predictionCacheMaxRecords:
                    Maximum number of records for the prediction output cache.
                    Pass None for the default value.