gpt2-large-dutch / commit.sh
yhavinga's picture
Add scripts, model config etc
c6e3db9
#!/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