Commit 7aa089ee authored by MasterScrat's avatar MasterScrat

Episode recording moving to core Flatland repo

parent a84de96f
This diff is collapsed.
This diff is collapsed.
#!/bin/bash
if [ $# != 4 ]; then
echo "Need 4 args: sName, nStart, nEnd. nSize"
echo "eg: gen-envs-actions.sh small-100-120 100 120 0"
echo "Creates envs under ./envs/small-100-120/envs with sequence 100..119, nSizebias=0"
exit 1
fi
sName=$1
nStart=$2
nEnd=$3
nSize=$4
dirRoot=./saved-envs/$sName/
echo "Settings - name $sName start $nStart end $nEnv size $nSize dirRoot $dirRoot"
mkdir -p $dirRoot
echo -e "params: $*\nsName=$sName\nnStart=$nStart\nnEnd=$nEnd\nnSize=$nSize\n" > $dirRoot/params
export RLBASEDIR=$HOME/projects/aicrowd/rl-trains/
export AICROWD_TESTS_FOLDER=$dirRoot
echo "================ remove flatland keys from redis ================="
redis-cli keys "flatland*"
redis-cli keys "flatland*" | xargs redis-cli del
echo "=============== Generate Envs ===================="
python -m flatland_contrib.cli.gen_envs --createEnvs $nStart $nEnd -d $dirRoot/envs -i $dirRoot/images -s 3
echo "=============== kill any existing pythons on this terminal ===================="
ps -f | grep python | egrep -v jupyter | awk '{print $2}' | xargs kill
echo "=============== Start service ===================="
python evaluator2/service.py --test_folder $dirRoot --mergeDir $dirRoot/merge --actionDir $dirRoot/actions --pickle --noShuffle --missingOnly &
sleep 3
echo "=============== Starting client to create actions ===================="
python $RLBASEDIR/mugurel/run.py
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment