AI Models in Automated Jobs (Appium)

An Appium package can be created to execute the same commands listed in AI Models in Interactive Sessions. The following is a sample test method:

def test_exec_snpe(self, driver):
os.system('adb shell "cd /data/local/tmp/inception_v3 && LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/snpeexample/aarch64-android-clang8.0/lib /data/local/tmp/snpeexample/aarch64-android-clang8.0/bin/snpe-net-run --container inception_v3.dlc --input_list target_raw_list.txt"')
os.system('adb pull /data/local/tmp/inception_v3/output /qdc/logs/')

Once the output directory is pulled back to /qdc/logs/, it will be returned in the job report. In this example, the files can be processed to generate textual logs (using show_inceptionv3_classifications.py). Additional post-processing of the output could also be done within the Appium test method itself.