Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Utilization] fix bugs #6312

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ export default function UtilizationStatsTable({ data }: { data: any[] }) {
spike_frequency: row.columns.find(
(col: any) => col.type == StatType.SpikeFrequency
)?.value,
spike_avg_interval: row.columns.find(
(col: any) => col.type == StatType.SpikeAvgInterval
)?.value,
};
});
return (
Expand Down Expand Up @@ -93,10 +90,4 @@ const columns: GridColDef[] = [
valueFormatter: valueFormatterSpike,
minWidth: 200,
},
{
field: "spike_avg_interval",
headerName: "avg spike interval (above 90%)",
valueFormatter: valueFormatterSeconds,
minWidth: 200,
},
];
20 changes: 1 addition & 19 deletions torchci/components/utilization/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,6 @@ export function getTimeSeriesStats(dps: TimeSeriesDataPoint[]) {
unit: "%",
};
results.push(maxStat);
const avgSpikeInterval = findAvgSpikeIntervals(dps, p90Metric.value);
const spikeAvgInterval = {
type: StatType.SpikeAvgInterval,
value: Number((avgSpikeInterval / 1000).toFixed(2)),
unit: "%",
};
results.push(spikeAvgInterval);
return results;
}

Expand All @@ -121,17 +114,6 @@ export const findMaxValue = (data: number[]) => {
return max;
};

const findAvgSpikeIntervals = (
timestamps: TimeSeriesDataPoint[],
threshold: number
) => {
const spikeIntervals = findSpikeIntervals(timestamps, threshold);
if (spikeIntervals.length == 0) return -1; // No spikes
const avgSpike =
spikeIntervals.reduce((a, b) => a + b, 0) / spikeIntervals.length;
return avgSpike;
};

const findSpikeIntervals = (
timestamps: TimeSeriesDataPoint[],
threshold: number
Expand Down Expand Up @@ -306,7 +288,7 @@ function getAllGpusStats(stats: StatsInfo[]) {
id: "gpu_mem_all",
columns: [
aggregateStats(gpuMems, StatType.Average, AgggregateMethod.Average),
aggregateStats(gpuMems, StatType.Max, AgggregateMethod.Average),
aggregateStats(gpuMems, StatType.Max, AgggregateMethod.Max),
aggregateStats(
gpuMems,
StatType.SpikeFrequency,
Expand Down
Loading