Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ck.out('Dataset UOA: '+str(q[1]))
ck.out('Dataset file: '+str(q[2]))
ck.out('Target OS: '+str(q[4]))
ck.out('OpenCL platform: '+str(q[5]))
ck.out('OpenCL device: '+str(q[6]))
ck.out('Compiler: '+str(q[8]))
# Convert to csv
ii={"action":"convert_table_to_csv",
"module_uoa":"experiment",
"table":table,
"keys":real_keys,
"file_name":"start_analysis_from_remote_tmp.csv"}
r=ck.access(ii)
if r['return']>0: ck.err(r)
# Finish
ck.out('')
ck.out('Thank you for using CK!')
exit(0)
import ck.kernel as ck
image='use_dnn_to_classify_image.jpg'
r=ck.access({'action':'ask',
'module_uoa':'advice',
'to':'classify_image',
'image':image})
if r['return']>0: ck.err(r)
### end pipeline
return {'return':0}
##############################################################################################
parser = argparse.ArgumentParser(description='Pipeline')
parser.add_argument("--target_os", action="store", dest="tos")
parser.add_argument("--device_id", action="store", dest="did")
parser.add_argument("--accuracy", action="store_true", default=False, dest="accuracy")
parser.add_argument("--repetitions", action="store", default=10, dest="repetitions")
parser.add_argument("--random_name", action="store_true", default=False, dest="random_name")
parser.add_argument("--share_platform", action="store_true", default=False, dest="share_platform")
myarg=parser.parse_args()
r=do({}, myarg)
if r['return']>0: ck.err(r)
"##choices#target_os",
"##characteristics#run#run_time_state#opencl_platform",
"##characteristics#run#run_time_state#opencl_device",
"##characteristics#run#run_time_state#opencl_device_units",
"##features#compiler_version#raw@0",
"##choices#cmd_key",
"##characteristics#run#return_code",
"##characteristics#run#run_time_state#positive_results",
"##characteristics#run#run_time_state#negative_results"
],
"flat_keys_list_ext":"#min",
"ignore_graph_separation":"yes"}
r=ck.access(ii)
if r['return']>0: ck.err(r)
table=r['table'].get('0',[])
real_keys=r.get('real_keys',[])
# Print failures
for q in table:
ck.out('')
ck.out('Dataset UOA: '+str(q[1]))
ck.out('Dataset file: '+str(q[2]))
ck.out('Target OS: '+str(q[4]))
ck.out('OpenCL platform: '+str(q[5]))
ck.out('OpenCL device: '+str(q[6]))
ck.out('Compiler: '+str(q[8]))
# Convert to csv
ii={"action":"convert_table_to_csv",
r=ck.access(ii)
if r['return']>0: return r
fail=r.get('fail','')
if fail=='yes':
return {'return':10, 'error':'pipeline failed ('+r.get('fail_reason','')+')'}
return {'return':0}
parser = argparse.ArgumentParser(description='Pipeline')
parser.add_argument("--target_os", action="store", dest="tos")
parser.add_argument("--device_id", action="store", dest="did")
myarg=parser.parse_args()
r=do({}, myarg)
if r['return']>0: ck.err(r)
'tags':['accuracy', 'imagenet-val', model_tags, lib_tags],
'pipeline':cpipeline,
'out':'con'}
r=ck.access(ii)
if r['return']>0: return r
fail=r.get('fail','')
if fail=='yes':
return {'return':10, 'error':'pipeline failed ('+r.get('fail_reason','')+')'}
return {'return':0}
r=do({})
if r['return']>0: ck.err(r)
'tags':['explore-batch-size-libs-models', platform_tags, model_tags, lib_tags],
'pipeline':cpipeline,
'out':'con'}
r=ck.access(ii)
if r['return']>0: return r
fail=r.get('fail','')
if fail=='yes':
return {'return':10, 'error':'pipeline failed ('+r.get('fail_reason','')+')'}
return {'return':0}
r=do({})
if r['return']>0: ck.err(r)
r=ck.access(ii)
if r['return']>0: return r
fail=r.get('fail','')
if fail=='yes':
return {'return':10, 'error':'pipeline failed ('+r.get('fail_reason','')+')'}
return {'return':0}
parser = argparse.ArgumentParser(description='Pipeline')
parser.add_argument("--target_os", action="store", dest="tos")
parser.add_argument("--device_id", action="store", dest="did")
myarg=parser.parse_args()
r=do({}, myarg)
if r['return']>0: ck.err(r)