diff --git a/scripts/crons/make_output.sh b/scripts/crons/make_output.sh deleted file mode 100644 index a94eeef..0000000 --- a/scripts/crons/make_output.sh +++ /dev/null @@ -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 diff --git a/scripts/crons/process_output.sh b/scripts/crons/process_output.sh deleted file mode 100644 index bb010e4..0000000 --- a/scripts/crons/process_output.sh +++ /dev/null @@ -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