From 96b14613dad5b3f5468223860b499fdad33a5cd2 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Tue, 28 Nov 2023 21:03:30 -0500 Subject: [PATCH] Show a combined TTS statistic (legacy + modern TTS) --- .../components/src/api/stats/queues/GetQueueStats.ts | 5 +++-- .../src/components/layout/SideNav/SideNav.tsx | 12 +++++++++--- packages/fakeyou.com/src/v2/view/nav/FooterNav.tsx | 12 +++++++++--- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/packages/components/src/api/stats/queues/GetQueueStats.ts b/packages/components/src/api/stats/queues/GetQueueStats.ts index a6d5847d30..1e4aac8585 100644 --- a/packages/components/src/api/stats/queues/GetQueueStats.ts +++ b/packages/components/src/api/stats/queues/GetQueueStats.ts @@ -15,9 +15,10 @@ export interface InferenceInfo { } export interface ByQueueStats { - pending_svc_jobs: number, - pending_rvc_jobs: number, pending_face_animation_jobs: number, + pending_rvc_jobs: number, + pending_svc_jobs: number, + pending_tacotron2_jobs: number, } export interface LegacyTtsInfo { diff --git a/packages/fakeyou.com/src/components/layout/SideNav/SideNav.tsx b/packages/fakeyou.com/src/components/layout/SideNav/SideNav.tsx index bb9f7134fd..701dc79ff9 100644 --- a/packages/fakeyou.com/src/components/layout/SideNav/SideNav.tsx +++ b/packages/fakeyou.com/src/components/layout/SideNav/SideNav.tsx @@ -114,9 +114,10 @@ export default function SideNav(props: SideNavProps) { total_pending_job_count: 0, pending_job_count: 0, by_queue: { - pending_svc_jobs: 0, - pending_rvc_jobs: 0, pending_face_animation_jobs: 0, + pending_rvc_jobs: 0, + pending_svc_jobs: 0, + pending_tacotron2_jobs: 0, }, }, legacy_tts: { @@ -223,6 +224,11 @@ export default function SideNav(props: SideNavProps) { ); } + // NB(bt,2023-11-28): These are representative of tacotron2 jobs handled by two queueing systems: + // The legacy queue (tts-inference-job) and the modern queue (inference-job). We'll add both totals + // while we migrate off of the legacy system, then eventually kill the legacy statistic. + const ttsQueuedCount = queueStats.legacy_tts.pending_job_count + queueStats.inference.by_queue.pending_tacotron2_jobs; + return (
diff --git a/packages/fakeyou.com/src/v2/view/nav/FooterNav.tsx b/packages/fakeyou.com/src/v2/view/nav/FooterNav.tsx index 8ae4922ebc..af53077c95 100644 --- a/packages/fakeyou.com/src/v2/view/nav/FooterNav.tsx +++ b/packages/fakeyou.com/src/v2/view/nav/FooterNav.tsx @@ -56,9 +56,10 @@ function FooterNav(props: Props) { total_pending_job_count: 0, pending_job_count: 0, by_queue: { - pending_svc_jobs: 0, - pending_rvc_jobs: 0, pending_face_animation_jobs: 0, + pending_rvc_jobs: 0, + pending_svc_jobs: 0, + pending_tacotron2_jobs: 0, }, }, legacy_tts: { @@ -122,6 +123,11 @@ function FooterNav(props: Props) { ); } + // NB(bt,2023-11-28): These are representative of tacotron2 jobs handled by two queueing systems: + // The legacy queue (tts-inference-job) and the modern queue (inference-job). We'll add both totals + // while we migrate off of the legacy system, then eventually kill the legacy statistic. + const ttsQueuedCount = queueStats.legacy_tts.pending_job_count + queueStats.inference.by_queue.pending_tacotron2_jobs; + return (