Resources » Help center » Queuing a task
When launching the queueing command, some checks are performed first.
BatchQueue will check that all the parameters are correct, otherwise, it will list all the errors and the task will not be queued.
The checks that BatchQueue performs are:
All non-optional parameters have been specified and have a value.
The value of the parameters is correct if:
An attempt to queue without specifying the required parameters is shown below as an example.
C:\Users\Public\AI.Dielmo>batchqueue --jobName=drawDetectionsJob
AI.Dielmo command line interface. batchqueue
Starting ApplicationQueue v0.0.1-SNAPSHOT using Java 11.0.9.1 on JCELDAWIN with PID 8876 (C:\Users\Public\AI.Dielmo\AI.Dielmo.batch.jar started by jcelda in C:\Users\Public\AI.Dielmo)
No active profile set, falling back to default profiles: default
Started ApplicationQueue in 3.517 seconds (JVM running for 5.325)
Error in parameters values:
Parameter [inputResources] cannot be null
Parameter [outputResources] cannot be null
Parameter [tensorModel] cannot be null
JOB NOT QUEUED
Stopping job scheduler queue...
Use the following syntax:
C:\Users\Public\AI.Dielmo> batchqueue --jobName=drawDetectionsJob --inputResources=Y:\temp\openai\person_images --outputResources=Y:\temp\openai\output --tensorModel=Y:\temp\openai\models\mask_rcnn_inception_v2_coco_2018_01_28.dmod
AI.Dielmo command line interface. batchqueue
Starting ApplicationQueue v0.0.1-SNAPSHOT using Java 11.0.9.1 on JCELDAWIN with PID 12984 (C:\Users\Public\AI.Dielmo\AI.Dielmo.batch.jar started by jcelda in C:\Users\Publi
c\AI.Dielmo)
No active profile set, falling back to default profiles: default
Started ApplicationQueue in 3.492 seconds (JVM running for 5.361)
Queing job:[drawDetectionsJob] with parameters:[{inputResources=Y:\temp\openai\person_images, outputResources=Y:\temp\openai\output, tensorModel=Y:\temp\openai\models\mask_
rcnn_inception_v2_coco_2018_01_28.dmod, accuracy=50.0, numberOfThreads=1, chunkSize=1, strokeSize=5, bufferWidth=5, bufferHeight=5, mergeType=Merge, intersectionPercent=70,
laplacianThreshold=0, useProcessorParts=false, windowsSizeX=3600.0, windowsSizeY=4800.0, overlapBetweenParts=1800.0, jobName=drawDetectionsJob}]
Job Queued...
Stopping job scheduler queue...
Note:
Directory and file names containing whitespace should be escaped using double quotes, as seen in the inputResources parameter.
C:\Users\Public\AI.Dielmo>batchqueue --jobName=drawDetectionsJob --inputResources="Y:\temp\openai\person images" --outputResources=Y:\temp\openai\output --tensorModel=Y:\temp\openai\models\mask_rcnn_inception_v2_coco_2018_01_28.dmod
To obtain a list of the queued tasks, the -list parameter is used, as shown in the following command:
(C:\Users\Public\AI.Dielmo\AI.Dielmo.batch.jar started by jcelda in C:\Users\Public\AI.Dielmo)
No active profile set, falling back to default profiles: default
Started ApplicationQueue in 3.531 seconds (JVM running for 5.323)
Queued Jobs:
Job Id:1619111236094 Queued since:2021 abr. 22 19:07:16 Job Type:[drawDetectionsJob] Parameters:[#Thu Apr 22 19:07:16 CEST 2021
jobName=drawDetectionsJob
bufferHeight(long)=5
laplacianThreshold(long)=0
windowsSizeY(double)=4800.0
windowsSizeX(double)=3600.0
tensorModel=Y\:\\temp\\openai\\models\\mask_rcnn_inception_v2_coco_2018_01_28.dmod
accuracy(double)=50.0
outputResources=Y\:\\temp\\openai\\output
overlapBetweenParts(double)=1800.0
mergeType=Merge
intersectionPercent(long)=70
strokeSize(long)=5
inputResources=Y\:\\temp\\openai\\person_images
numberOfThreads(long)=1
chunkSize(long)=1
useProcessorParts=false
bufferWidth(long)=5
]
Stopping job scheduler queue...
You can create batch’s to be able to queue many jobs using a batch script in windows.
In the installation directory of the application you can find a script which can be used for the enqueuing of different jobs to be done.
To do this we will create a batch file, in which we will add as many lines of calls to the batch queue as necessary:
We will create the file jobs.cmd
call batchqueue --jobName=drawDetectionsJob --inputResources=Y:\temp\openai\person_images_1 --outputResources=Y:\temp\openai\output1 –tensorModel=Y:\temp\openai\models\mask_rcnn_inception_v2_coco_2018_01_28.dmod
call batchqueue --jobName=drawDetectionsJob --inputResources=Y:\temp\openai\person_images_2 --outputResources=Y:\temp\openai\output2 –tensorModel=Y:\temp\openai\models\mask_rcnn_inception_v2_coco_2018_01_28.dmod
call batchqueue --jobName=drawDetectionsJob --inputResources=Y:\temp\openai\person_images_3 --outputResources=Y:\temp\openai\output3 –tensorModel=Y:\temp\openai\models\mask_rcnn_inception_v2_coco_2018_01_28.dmod
We save the file and we will be able to execute it by double-clicking on it or from a terminal window.
When BatchQueue is invoked, the process returns an execution result code in the variable %errorlevel%.
This result code allows knowing the final status of the command execution, useful for integration into the user’s productive processes.
Code | Description |
0 | The command was executed correctly |
1 | Error in parameters (error details will be printed in the error output of the console) |
2 | Unexpected error (details of the error will be printed in the error output of the console) |
The error code can be queried with the following command:
echo %errorlevel%
1
For example, launching the command with the inputResources directory parameter without escaping:
C:\Users\Public\AI.Dielmo>batchqueue --jobName=drawDetectionsJob --inputResources=Y:\temp\openai\person images --outputResources=Y:\temp\openai\output --tensorModel=Y:\temp\openai\models\mask_rcnn_inception_v2_coco_2018_01_28.dmod
AI.Dielmo command line interface. batchqueue
Starting ApplicationQueue v0.0.1-SNAPSHOT using Java 11.0.9.1 on JCELDAWIN with PID 14384 (C:\Users\Public\AI.Dielmo\AI.Dielmo.batch.jar started by jcelda in C:\Users\Public\AI.Dielmo)
No active profile set, falling back to default profiles: default
Started ApplicationQueue in 3.489 seconds (JVM running for 5.203)
Error in parameters values:
parameter:[inputResources] [Y:\temp\openai\person] file does not exists
JOB NOT QUEUED
Stopping job scheduler queue...
The output presents the descriptive error of the parameter (parameter:[inputResources] [Y:\temp\openai\person] file does not exist), and when printing %errorlevel% we obtain:
C:\Users\Public\AI.Dielmo>echo %errorlevel%
1
In the directory C:\UsersPublicAI.DielmoLogs a text file is saved with all the outputs of CoreBatch executions.
It can be consulted for example using the following command:
C:\Users\Public\AI.Dielmo>more logs\ai-dielmo-queue.log
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits.
By clicking “Accept”, you consent to our cookies policy.