Parse single epoch training curves
This commit is contained in:
@@ -1764,17 +1764,24 @@ function MiniCurvePlot({ series }: { series: CurveSeries[] }) {
|
||||
{[0.25, 0.5, 0.75].map((tick) => (
|
||||
<path key={tick} d={`M ${pad} ${pad + tick * (height - pad * 2)} H ${width - pad}`} className="gridLine" />
|
||||
))}
|
||||
{series.map((item, index) => (
|
||||
<polyline
|
||||
key={item.name}
|
||||
points={item.points.map((point) => `${scaleX(point.x).toFixed(2)},${scaleY(point.y).toFixed(2)}`).join(" ")}
|
||||
fill="none"
|
||||
stroke={curveColor(index)}
|
||||
strokeWidth="2.4"
|
||||
strokeLinejoin="round"
|
||||
strokeLinecap="round"
|
||||
/>
|
||||
))}
|
||||
{series.map((item, index) => {
|
||||
const color = curveColor(index);
|
||||
const scaled = item.points.map((point) => ({ x: scaleX(point.x), y: scaleY(point.y) }));
|
||||
if (scaled.length === 1) {
|
||||
return <circle key={item.name} cx={scaled[0].x} cy={scaled[0].y} r="4" fill={color} />;
|
||||
}
|
||||
return (
|
||||
<polyline
|
||||
key={item.name}
|
||||
points={scaled.map((point) => `${point.x.toFixed(2)},${point.y.toFixed(2)}`).join(" ")}
|
||||
fill="none"
|
||||
stroke={color}
|
||||
strokeWidth="2.4"
|
||||
strokeLinejoin="round"
|
||||
strokeLinecap="round"
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user