feat: add workload status to trial infobox
@@ -11,7 +11,7 @@ import {
} from 'types';
import { isObject } from 'utils/data';
import { formatDatetime } from 'utils/date';
-import { humanReadableBytes } from 'utils/string';
+import { capitalize, humanReadableBytes } from 'utils/string';
import { shortEnglishHumannizer } from 'utils/time';
import { trialDurations } from 'utils/trial';
import { checkpointSize } from 'utils/types';
@@ -72,6 +72,9 @@ const TrialInfoBox: React.FC<Props> = ({ trial, experiment }: Props) => {
const handleShowHParams = useCallback(() => setShowHParams(true), []);
const handleHideHParams = useCallback(() => setShowHParams(false), []);
+ const workloadStatus: string | undefined =
+ Object.entries(trial.workloads.last()).find(e => !!e[1])?.first();
+
const infoRows = [
{
content: formatDatetime(trial.startTime),
@@ -89,6 +92,11 @@ const TrialInfoBox: React.FC<Props> = ({ trial, experiment }: Props) => {
</div>,
label: 'Durations',
},
+ {
+ content: (trial.state === 'ACTIVE' && workloadStatus !== undefined) &&
+ `${capitalize(workloadStatus)} on batch ${trial.totalBatchesProcessed}`,
+ label: 'Current Workload',
+ },
{
content: bestValidation &&
<>
