Skip to content

Commit 3efaeb8

Browse files
committed
format
1 parent 02a3d89 commit 3efaeb8

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

torchci/components/metrics/vllm/CiStabilityTrendPanel.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
getCrosshairTooltipConfig,
88
GRID_DEFAULT,
99
} from "./chartUtils";
10-
import { COLOR_SUCCESS, COLOR_ERROR, COLOR_WARNING } from "./constants";
10+
import { COLOR_ERROR, COLOR_SUCCESS, COLOR_WARNING } from "./constants";
1111

1212
interface TrunkHealthData {
1313
build_started_at: string;
@@ -33,8 +33,7 @@ function calculateStabilityScore(healthValues: number[]): number {
3333

3434
// Calculate penalties
3535
const volatilityPenalty = volatility * 50;
36-
const transitionPenalty =
37-
Math.min(transitions / healthValues.length, 1) * 50;
36+
const transitionPenalty = Math.min(transitions / healthValues.length, 1) * 50;
3837

3938
// Return score as percentage (0-1)
4039
return Math.max(0, 100 - volatilityPenalty - transitionPenalty) / 100;
@@ -51,7 +50,9 @@ function formatTooltip(params: any, stabilityData: any[]): string {
5150
if (!data) return "";
5251

5352
let result = `<b>${date}</b><br/>`;
54-
result += `${params[0].marker} Stability Score: <b>${(data.score * 100).toFixed(1)}%</b><br/>`;
53+
result += `${params[0].marker} Stability Score: <b>${(
54+
data.score * 100
55+
).toFixed(1)}%</b><br/>`;
5556
result += `<span style="color: #999; font-size: 0.85em;">`;
5657
result += `Volatility: ${(data.volatility * 100).toFixed(1)}% | `;
5758
result += `Transitions: ${data.transitions}`;

torchci/pages/metrics/vllm.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ import CommitsOnRedTrendPanel from "components/metrics/vllm/CommitsOnRedTrendPan
1717
import ContinuousBuildTracker from "components/metrics/vllm/ContinuousBuildTracker";
1818
import DockerBuildRuntimePanel from "components/metrics/vllm/DockerBuildRuntimePanel";
1919
import DurationDistributionPanel from "components/metrics/vllm/DurationDistributionPanel";
20+
import JobBuildsPanel from "components/metrics/vllm/JobBuildsPanel";
2021
import JobGroupFilter, {
2122
JobGroup,
2223
} from "components/metrics/vllm/JobGroupFilter";
23-
import JobBuildsPanel from "components/metrics/vllm/JobBuildsPanel";
2424
import JobReliabilityPanel from "components/metrics/vllm/JobReliabilityPanel";
2525
import JobRuntimePanel from "components/metrics/vllm/JobRuntimePanel";
2626
import MergesPanel from "components/metrics/vllm/MergesPanel";
@@ -620,8 +620,10 @@ export default function Page() {
620620
: (() => {
621621
const volatilityPenalty = ciHealthVolatility * 50; // 0-50 penalty
622622
const transitionPenalty =
623-
Math.min(stateTransitions / (dailyHealthPercentages?.length || 1), 1) *
624-
50; // 0-50 penalty
623+
Math.min(
624+
stateTransitions / (dailyHealthPercentages?.length || 1),
625+
1
626+
) * 50; // 0-50 penalty
625627
return Math.max(0, 100 - volatilityPenalty - transitionPenalty) / 100;
626628
})();
627629

@@ -1067,7 +1069,9 @@ export default function Page() {
10671069
{
10681070
title: "State Transitions",
10691071
value:
1070-
stateTransitions === undefined ? undefined : stateTransitions,
1072+
stateTransitions === undefined
1073+
? undefined
1074+
: stateTransitions,
10711075
valueRenderer: formatCount,
10721076
badThreshold: (v) =>
10731077
(v ?? 0) > (dailyHealthPercentages?.length || 1) * 0.3,

0 commit comments

Comments
 (0)