-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadd_folder_infpt_jobs.sh
46 lines (36 loc) · 1.01 KB
/
add_folder_infpt_jobs.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
#BASESCRIPT=tf2oda_train_eval_export
#BASESCRIPT=tf2_inf_eval_saved_model
# Functions
add_job()
{
echo "Generate Training Script for $MODELNAME"
cp $SCRIPTBASENAME\_TEMPLATE.sh $SCRIPTBASENAME\_$MODELNAME.sh
echo "Add task spooler jobs for $MODELNAME to the task spooler"
echo "Shell script tf2_inf_eval_saved_model_$MODELNAME.sh"
ts -L $USERNAME\_$MODELNAME $CURRENTFOLDER/$SCRIPTBASENAME\_$MODELNAME.sh
}
###
# Main body of script starts here
###
# Constant Definition
USERNAME=wendt
CURRENTFOLDER=`pwd`
MODELSOURCE=exported-models/*
SCRIPTBASENAME=pt_yolov3_train_export_inf
echo "Setup task spooler socket."
. ./init_ts.sh
#Send start mail
ts -L Send_start $CURRENTFOLDER/sendmail_Start_YoloV3_IntelNUC.sh
for f in $MODELSOURCE
do
#echo "$f"
MODELNAME=`basename ${f%%.*}`
echo $MODELNAME
add_job
# take action on each file. $f store current file name
#cat $f
done
#Send stop mail
ts -L Send_stop $CURRENTFOLDER/sendmail_Stop_YoloV3_IntelNUC.sh