AIExec

AIExec (AI Execute) is the most common tool used when manually creating or running Cognition-based AIs.

In practise, it takes three parameters.

  aiexec.py <AI Name> <Action> --dir <directory where AIs are stored>
  

The dir parameter points to a folder where the JSON files that describe your AIs are stored. Each of those files should be in the Cognition File Format.

The AI Name is the name of the AI, minus the .json extension.

There are several different options for the Action parameter…

Actions

ActionDescription
gatherDownload the training data for this AI, deleting any existing data
buildTrain the AI, if required
retrainTrain the AI, deleting the existing AI if needed
regenRegenerate the entire AI
testTest the AI against its training data to determine accuracy
coverageCreate a coverage report for this AI
nowExecuting the AI based on the current live values. Will also gather raw data and train the AI if required.
curinputsGet the current input values
runRun the AI. Requires the start, end and grain parameters
findFind events using the AI. Requires the start, end and grain parameters
inputsGets a list of the inputs to this AI
correctMake a manual correction to the AI
addsampleAdds a new sample time to the training data. Uses the start and optionally the end, inputs, outputs and root parameters

Extra Parameters

ParameterUsed ForExample
–forcenowA comma-delimited list of inputs that you'd like to force to a specific value. Leave an option empty (ie. “,,”) to use the current value.
–inputscorrectA comma-delimited list of the AI Inputs you'd like to manually correct the output for
–outputscorrectA comma-delmited list of the AI Outputs you'd like to get for the given AI Inputs.
–startrun,findThe date (in YYYY-MM-DD HH:MM:SS) to start the execution of your AI
–endrun,findThe date (in YYYY-MM-DD HH:MM:SS) to finish execution of your AI
–grainrun,findThe data resolution when finding or running
–rootrun,find,nowThe ARDI ID number of the asset that this AI should be run on
–formatrunThe output format for the run data
–spanrunWhen being used over long time periods, span controls the size of the 'chunks' that are read. Value in hours. Defaults to 24