cleaning up files that do not belong
This commit is contained in:
parent
0d78b7ab91
commit
236175343a
2 changed files with 0 additions and 67 deletions
|
@ -1,47 +0,0 @@
|
|||
#!/bin/bash
|
||||
#every 30 min
|
||||
|
||||
rnn_home=~/mtg-rnn
|
||||
output_home=~/mtgencode/cards
|
||||
|
||||
# setting output parameters
|
||||
length=10000
|
||||
temperature=0.5
|
||||
|
||||
## */30 * * * * ~/mtgencode/scripts/crons/make_output.sh
|
||||
if [[ $(pgrep -l 'luajit' | sed s/'[0-9]* '// ) =~ 'luajit' ]]; then
|
||||
echo Training running, exiting cron
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cd $rnn_home
|
||||
|
||||
for folder in $( ls cv); do
|
||||
echo $folder
|
||||
#I have my folders labeled by' {data_dir}-{rnn_size}_{dropout}"
|
||||
# I can't decide of I want to remove {rnn_size} and {dropout} from output
|
||||
#folder name
|
||||
## dir_name=$(echo $folder | sed s/-[1-9][1-9][1-9]_0.[0-9]*//g)
|
||||
dir_name=$folder
|
||||
if [ ! -e $output_home/$dir_name ]; then
|
||||
mkdir $output_home/$dir_name
|
||||
fi
|
||||
for file in $( ls cv/$folder); do
|
||||
o_file=$(echo $file | sed s/lm_lstm_epoch/e/)
|
||||
o_file=$(echo ${o_file} | sed s/_[0-9].[0-9]*//g)
|
||||
o_file=$(echo ${o_file} | sed s/.t7//)
|
||||
o_file=$(echo ${o_file}-${temperature})
|
||||
#if file exists don't make a new one
|
||||
if [ -e $output_home/$dir_name/$o_file/output.txt ];then
|
||||
#echo "output for $file already exists"
|
||||
continue
|
||||
fi
|
||||
#if the directory doesn't exist make it
|
||||
if [ ! -e ./$output_home/$dir_name/$o_file ]; then
|
||||
mkdir $output_home/$dir_name/$o_file
|
||||
fi
|
||||
th $rnn_home/sample_hs_v3.lua cv/$folder/$file -gpuid -1 -temperature $temperature -length $length | tee $output_home/$dir_name/$o_file/output.txt
|
||||
done
|
||||
done
|
||||
# rsync to remote storage device
|
||||
rsync -hruv -e 'ssh -p 2022' $output_home host@ip:/mtgencode/cards
|
|
@ -1,20 +0,0 @@
|
|||
#!/bin/bash
|
||||
# every 5 min
|
||||
|
||||
## */30 * * * * ~/mtgencode/scripts/crons/process_output.sh
|
||||
|
||||
cd ~/mtgencode/cards
|
||||
|
||||
for folder in $(ls); do
|
||||
for sub in ${ ls ${folder} };do
|
||||
if [ ! -d $folder/$sub ]; then
|
||||
continue
|
||||
fi
|
||||
if [ ! -e $folder/$sub/summary.txt ]; then
|
||||
./scritps/summarize.py -a -v $folder/$sub/output.txt > summary.txt
|
||||
fi
|
||||
if [ ! -e $folder/$sub/cards.txt ]; then
|
||||
.decode.py -v -f $folder/$sub/output.txt $folder/$sub/cards.txt
|
||||
fi
|
||||
done
|
||||
done
|
Loading…
Reference in a new issue