From c725d11dd9087f4de167926f5afb55da435b9c04 Mon Sep 17 00:00:00 2001 From: josc146 Date: Fri, 7 Jul 2023 13:56:08 +0800 Subject: [PATCH] fix loss parser --- frontend/src/pages/Train.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/pages/Train.tsx b/frontend/src/pages/Train.tsx index 8a6acbd..fbb245d 100644 --- a/frontend/src/pages/Train.tsx +++ b/frontend/src/pages/Train.tsx @@ -49,7 +49,7 @@ ChartJS.register( ); const parseLossData = (data: string) => { - const regex = /Epoch (\d+):\s+(\d+%)\|[\s\S]*\| (\d+)\/(\d+) \[(\d+:\d+)<(\d+:\d+),\s+(\d+.\d+it\/s), loss=(\d+.\d+),[\s\S]*\]/g; + const regex = /Epoch (\d+):\s+(\d+%)\|[\s\S]*\| (\d+)\/(\d+) \[(\d+:\d+)<(\d+:\d+),\s+(\d+.\d+it\/s), loss=(\S+),[\s\S]*\]/g; const matches = Array.from(data.matchAll(regex)); if (matches.length === 0) return;