Skip to content

Commit

Permalink
fix loss parser
Browse files Browse the repository at this point in the history
  • Loading branch information
josStorer committed Jul 9, 2023
1 parent 5b1a944 commit 22afc98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/pages/Train.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,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=(\S+),[\s\S]*\]/g;
const regex = /Epoch (\d+):\s+(\d+%)\|[\s\S]*\| (\d+)\/(\d+) \[(\d+:\d+)<(\d+:\d+),\s+([\S]*), loss=(\S+),[\s\S]*\]/g;
const matches = Array.from(data.matchAll(regex));
if (matches.length === 0)
return false;
Expand Down

0 comments on commit 22afc98

Please sign in to comment.