From 866ba611a6115c5c7e9ab8358c7d485e14813420 Mon Sep 17 00:00:00 2001 From: Henri Bourcereau Date: Tue, 26 Aug 2025 17:12:13 +0200 Subject: [PATCH] fix: train.sh parsing --- bot/scripts/train.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bot/scripts/train.sh b/bot/scripts/train.sh index 87a3770..d96e690 100755 --- a/bot/scripts/train.sh +++ b/bot/scripts/train.sh @@ -24,14 +24,13 @@ train() { plot() { ALGO=$1 - NAME=$(ls -rt "$LOGS_DIR/$ALGO" | tail -n 1) + NAME=$(ls -rt "$LOGS_DIR/$ALGO" | grep -v png | tail -n 1) LOGS="$LOGS_DIR/$ALGO/$NAME" - cfgs=$(head -n $CFG_SIZE "$LOGS") + cfgs=$(grep -v "info:" "$LOGS" | head -n $CFG_SIZE) for cfg in $cfgs; do eval "$cfg" done - # tail -n +$((CFG_SIZE + 2)) "$LOGS" tail -n +$((CFG_SIZE + 2)) "$LOGS" | grep -v "info:" | awk -F '[ ,]' '{print $5}' |