File size: 500 Bytes
c6e3db9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
#!/bin/bash
source ~/venv/bin/activate
while true
do
echo -n "Checking at .. "
date
UPDATED=`git status | grep flax_model | grep modified`
if [ ! -z "$UPDATED" ]
then
sleep 120
FILE=$(find . -name `ls -tR runs | grep events | head -n 1` | tail -n 1)
STEP=`tensorboard --load_fast=true --inspect --event_file=$FILE | grep last_step | awk '{print $2}'`
git add runs
git add flax_model.msgpack
git commit -m "Saving weights and logs step $STEP"
fi
sleep 60
done
|