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 7, 2023
1 parent ba2a6bd commit c725d11
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 @@ -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;
Expand Down

0 comments on commit c725d11

Please sign in to comment.