Skip to content
Merged
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
35 changes: 13 additions & 22 deletions webapp/src/components/training/TrainingInformation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,16 @@ const participants = computed(() => ({

const batchesCount = computed(() => props.batchesOfEpoch.size);

const allEpochs = computed(() =>
props.rounds.flatMap((round) => round.epochs).concat(props.epochsOfRound),
);
const allEpochs = computed<List<EpochLogs>>((oldValue) => {
const ret = props.rounds
.flatMap((round) => round.epochs)
.concat(props.epochsOfRound);

// avoid recomputing dependencies such as when finishing round
if (oldValue !== undefined && ret.equals(oldValue)) return oldValue;

return ret;
});
const lastEpoch = computed(() => allEpochs.value.last());

const accuracySeries = computed(() =>
Expand Down Expand Up @@ -265,11 +272,6 @@ const lossSeries = computed(() =>

const commonChartsOptions = {
chart: {
animations: {
enabled: true,
easing: "linear",
dynamicAnimation: { speed: 1000 },
},
toolbar: { show: false },
zoom: { enabled: false },
},
Expand All @@ -281,25 +283,17 @@ const commonChartsOptions = {
opacity: 0.6,
},
stroke: { curve: "smooth" },
markers: { size: 0.5 },
grid: {
xaxis: { lines: { show: false } },
yaxis: { lines: { show: false } },
},
grid: { show: false },
xaxis: { labels: { show: false } },
legend: { show: false },
tooltip: { enabled: true },
};

const accuracyChartsOptions = {
...commonChartsOptions,
yaxis: {
max: 100,
min: 0,
labels: {
show: true,
formatter: (value: number) => value.toFixed(0),
},
labels: { formatter: (value: number) => value.toFixed(0) },
},
};

Expand All @@ -316,10 +310,7 @@ const lossChartsOptions = computed(() => {
yaxis: {
max: yAxisMax,
min: 0,
labels: {
show: true,
formatter: (n: number) => n.toFixed(2),
},
labels: { formatter: (n: number) => n.toFixed(2) },
},
};
});
Expand Down