AI/ML
Retraining Schedule Card - Model Maintenance
Track machine learning model retraining schedules and intervals. Monitor model staleness and plan proactive model updates.
Retraining Schedule Card
The Retraining Schedule Card displays upcoming and past model retraining schedules, helping teams maintain model freshness and performance.
Preview
Installation
npx shadcn@latest add https://vectormotion.vercel.app/registry/retraining-schedule-card.jsonRetraining Schedule Card
'use client'import React from 'react';import { Timer, CalendarClock } from 'lucide-react';import { motion } from 'motion/react';import { clsx, type ClassValue } from "clsx"import { twMerge } from "tailwind-merge"import { ResponsiveContainer, RadialBarChart, RadialBar, Tooltip } from 'recharts';function cn(...inputs: ClassValue[]) { return twMerge(clsx(inputs))}interface ScheduleData { name: string; value: number; fill: string; [key: string]: any;}interface RetrainingScheduleCardProps { className?: string; title?: string; subtitle?: string; data?: ScheduleData[]; timeLeft?: string; nextJobSchedule?: string;}const DEFAULT_DATA: ScheduleData[] = [ { name: 'Elapsed', value: 70, fill: '#e4e4e7' }, // Zinc-200 { name: 'Remaining', value: 30, fill: '#6366f1' }, // Indigo-500];const DEFAULT_TITLE = "Retraining";const DEFAULT_SUBTITLE = "Next Job";const DEFAULT_TIME_LEFT = "14h";const DEFAULT_NEXT_JOB_SCHEDULE = "Sunday 2AM";export const RetrainingScheduleCard: React.FC<RetrainingScheduleCardProps> = ({ className = "", title = DEFAULT_TITLE, subtitle = DEFAULT_SUBTITLE, data = DEFAULT_DATA, timeLeft = DEFAULT_TIME_LEFT, nextJobSchedule = DEFAULT_NEXT_JOB_SCHEDULE,}) => { return ( <motion.div initial={{ opacity: 0, y: 20 }} animate={{ opacity: 1, y: 0 }} transition={{ duration: 0.5, delay: 0.2 }} className={cn( "relative overflow-hidden rounded-2xl border border-border bg-card text-card-foreground shadow-sm transition-all hover:border-primary/50 hover:shadow-md flex flex-col h-full", className )} > <div className="p-5 flex flex-col h-full relative z-10"> <div className="mb-4 flex items-start justify-between"> <div> <h3 className="font-bold text-lg text-foreground"> {title} </h3> <p className="text-sm text-muted-foreground font-medium"> {subtitle} </p> </div> <div className="rounded-lg border-2 border-indigo-100 dark:border-indigo-800 p-2 text-indigo-500 dark:text-indigo-400 flex items-center justify-center"> <Timer className="h-5 w-5" /> </div> </div> <div className="flex-1 w-full min-h-[140px] relative"> <ResponsiveContainer width="100%" height="100%"> <RadialBarChart cx="50%" cy="50%" innerRadius="60%" outerRadius="100%" barSize={10} data={data} startAngle={90} endAngle={-270} > <RadialBar background dataKey="value" cornerRadius={10} /> <Tooltip cursor={false} content={() => null} /> </RadialBarChart> </ResponsiveContainer> <div className="absolute inset-0 flex flex-col items-center justify-center pointer-events-none"> <span className="text-3xl font-bold text-foreground">{timeLeft}</span> <span className="text-xs text-muted-foreground">Remaining</span> </div> </div> <div className="mt-2 flex items-center justify-between p-2 bg-muted rounded-lg border border-border"> <span className="text-xs text-muted-foreground">Schedule</span> <span className="text-xs font-bold text-foreground flex items-center gap-1"> <CalendarClock className="w-3 h-3" /> {nextJobSchedule} </span> </div> <div className="absolute -bottom-4 -right-4 z-0 opacity-5 pointer-events-none"> <CalendarClock className="w-40 h-40 text-indigo-500" /> </div> </div> </motion.div> );};Props
Prop
Type
Usage
This component is a demo card displaying retraining schedule information with animated visualizations and dark mode support.