Spaces:
Running
Running
File size: 1,220 Bytes
62d106f |
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 |
# set LOGDIR to default if not set before
if [ -z "$LOGDIR" ]; then
echo "LOGDIR is not set. Using default '../logs/vote_log'"
export LOGDIR="../logs/vote_log"
fi
mkdir -p results
# for battle data
python -m elo_rating.clean_battle_data
battle_cutoff_date=`cat cut_off_date.txt` && rm cut_off_date.txt && echo "Battle data last updated on $battle_cutoff_date"
mkdir -p ./results/$battle_cutoff_date
cp clean_battle_$battle_cutoff_date.json ./results/latest/clean_battle.json
mv clean_battle_$battle_cutoff_date.json ./results/$battle_cutoff_date/clean_battle.json
python -m elo_rating.elo_analysis --clean-battle-file ./results/$battle_cutoff_date/clean_battle.json
mv ./elo_results_$battle_cutoff_date.pkl ./results/$battle_cutoff_date/elo_results.pkl
# generate the leaderboard
python -m elo_rating.generate_leaderboard \
--model_info_file "../model/model_registry.csv" \
--elo_rating_pkl "./results/$battle_cutoff_date/elo_results.pkl" \
--output_csv "./results/$battle_cutoff_date/leaderboard.csv"
mkdir -p ./results/latest
cp ./results/$battle_cutoff_date/leaderboard.csv ./results/latest/leaderboard.csv
cp ./results/$battle_cutoff_date/elo_results.pkl ./results/latest/elo_results.pkl
|