Skip to content

Commit 200bd40

Browse files
committed
Fix parse_log.sh against "prefetch queue empty" messages
1 parent 674b349 commit 200bd40

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tools/extra/parse_log.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ echo "Usage parse_log.sh /path/to/your.log"
1414
exit
1515
fi
1616
LOG=`basename $1`
17-
grep -B 1 'Test ' $1 > aux.txt
17+
sed -n '/Iteration .* Testing net/,/Iteration *. loss/p' $1 > aux.txt
18+
sed -i '/Waiting for data/d' aux.txt
19+
sed -i '/prefetch queue empty/d' aux.txt
20+
sed -i '/Iteration .* loss/d' aux.txt
21+
sed -i '/Iteration .* lr/d' aux.txt
22+
sed -i '/Train net/d' aux.txt
1823
grep 'Iteration ' aux.txt | sed 's/.*Iteration \([[:digit:]]*\).*/\1/g' > aux0.txt
1924
grep 'Test net output #0' aux.txt | awk '{print $11}' > aux1.txt
2025
grep 'Test net output #1' aux.txt | awk '{print $11}' > aux2.txt

0 commit comments

Comments
 (0)