Build a shared training platform for three teams on one Kubernetes cluster: Kueue queues with guaranteed quotas that lend idle capacity and reclaim it by preemption, all-or-nothing admission for distributed jobs, on-demand and spot flavors, KubeRay jobs running PyTorch data-parallel training with Ray Train that resume exactly from checkpoints, tenant guardrails, a validating CLI, and Prometheus alerts and showback. It runs on your computer with kind.
AI/ML Platform Engineer. Advanced.
For platform, MLOps and Kubernetes engineers who run training for several teams, and want to share accelerators fairly with Kueue, start distributed Ray jobs all at once, make them survive preemption without losing results, and keep teams apart with policies they can test.
This project assumes you already work with Kubernetes and have trained a model, and teaches what changes when several teams share scarce accelerators. Check the list below honestly: each item is used without explanation later, and each has a short way to fill the gap.
Quarrystone's three teams share sixteen accelerators. On a plain Kubernetes cluster, whoever submits first gets them: a weekend sweep starves the nightly retrain, two distributed jobs each grab half the workers they need and wait for each other forever, and an interrupted job starts again from step zero. The platform in this project fixes those problems with three ideas that the rest of the page builds on:
Kubernetes was built to keep services running: when a pod is created, the scheduler finds a node for it as soon as one has room. Training jobs need something different. A four-worker job is useless with three workers, a team's sweep should not take capacity another team was promised, and a job that cannot run now should wait in line rather than fail. This lesson explains why the default scheduler cannot provide that, and how Kueue adds admission in front of it.
Quarrystone split its nodes per team once, and Forecasting's share sat idle all day while Vision queued. Then it tried "no limits", and one sweep took the whole cluster. A shared platform needs both: a guarantee each team can count on, and a way to use what a team is not using right now. This lesson explains how Kueue expresses that with nominal quotas, cohorts and borrowing and lending limits, and works through the numbers this project uses.
Borrowing only works if the lender can get its quota back, and a team only trusts its queue if urgent work can overtake routine work. Both need preemption: stopping admitted work to make room. This lesson explains how Kueue decides what to preempt, what happens to a preempted RayJob, and the rules this project chose.
Two Vision jobs, each needing four workers, started on a cluster with six free accelerators. The default scheduler gave each three. Both waited for their fourth worker, forever, holding six accelerators that did no work. This is the classic gang scheduling problem: the pods of a distributed job are only useful together. This lesson explains how Kueue avoids it and how it handles the gap between being admitted and actually running.
Not all capacity is equal. Cloud providers sell interruptible ("spot") machines at a large discount and take them back at short notice; a nightly retrain with a deadline should not run there, while a research sweep that checkpoints often can. Accelerators come in models, too. This lesson explains how Kubernetes keeps work off capacity it should not use, how Kueue chooses capacity per job, and how the lab simulates accelerators so the same rules apply on a laptop.
Kueue decides when a job may run. Something still has to turn "run this training job on four workers" into processes that find each other, share work and report back. This project uses Ray for that, run on Kubernetes by the KubeRay operator. This lesson explains what a Ray cluster is, what KubeRay creates for one RayJob, and the settings that make it fit the platform.
A job with four accelerators should finish in roughly a quarter of the time of a job with one. The usual way to get there is data parallelism: every worker holds a full copy of the model, trains on a different part of each batch, and the workers average their gradients before every update. This lesson explains data-parallel training with PyTorch, how Ray Train starts and coordinates the workers, and how this project's training loop is written so that a run can stop and contin
The platform preempts jobs on purpose: to give a team its quota back, to let urgent work overtake a sweep, to drain a queue for maintenance. Spot capacity disappears on its own. All of that is acceptable only if a stopped job loses little work and, when it continues, ends where it would have ended anyway. This lesson explains what a checkpoint must contain for that, how Ray Train restores it after a worker loss and after a whole-job restart, and how the run record shows what
Quotas only mean something if nobody can go around them, and a shared cluster is only safe if one team cannot read another's data or tamper with its jobs. Quarrystone's teams had run unreviewed images, forgotten limits and read each other's buckets. This lesson builds the boundaries in four layers, each catching what the others cannot: permissions, an admission policy, Pod Security, and network and storage separation.
The previous lessons produced a RayJob with about 150 lines of YAML: labels, digests, requests, security contexts, shared memory, logical resources, a token, a deadline. No data scientist should write that, and a platform that requires it will be bypassed. A golden path is the supported, easy way to do the common thing correctly. Here it is trainctl: teams describe what to train in ten lines, and the tool adds how to run it on this platform, then explains what happens to the
A shared platform needs to answer two kinds of questions without anyone opening a terminal on the cluster. Is it working? Is production work getting through, is anything stuck forever, is one team preempting another over and over? And who used what? How many accelerator-hours did each team use, and how much of that was borrowed? This lesson builds both from Kueue's metrics with Prometheus.
A platform's promises are behaviours: "Forecasting's retrain starts at once", "a preempted job resumes from its last checkpoint with identical results", "Vision cannot reach Forecasting's Ray head". YAML that looks right proves none of them, and neither does a cluster that starts. This lesson explains how the project tests its promises at four levels, from file checks that run in a second to scenarios that drive the live lab as three teams.
The platform runs on one computer, yet it is a real Kubernetes cluster with the same components and failure modes as a larger one. This lesson explains how the lab is assembled and why, how to run the platform day to day (maintenance, node drains, releases), and the runbook for each alert.
This is the single ordered procedure for the lab: tools, local checks, the cluster, the platform, the trainer image, a first job, the sharing and guardrail experiments, observability and the scenario suite. The Step-by-Step Guide shows these sections inline. Removing everything is in Cleanup, which you can run at any point, including after a failed step.
Shared platforms rarely fail loudly. A job waits and nobody knows why; a quota change made last week starts to bite tonight; a resumed run looks fine and quietly differs. The skill this lesson practises is turning "my job doesn't run" into a specific, testable explanation, using the platform's own records before guessing.
The questions in this section ask you to explain the platform's decisions the way an interviewer for an AI/ML platform role would probe them: walk through a flow, justify a choice against an alternative, and adapt when a constraint changes. They are original practice questions for this project, not a list from any employer.
Everything the lab creates lives on your computer: the kind cluster's node containers and their volumes, the registry container, Docker images, the .venv/ and .lab/ folders and the evidence/ files. Nothing runs in a cloud account. You can run these steps at any point, including after a failed or interrupted step; each is safe to repeat.
You start with your own copy of the source and finish with every tool installed at the expected version and the platform's configuration and trainctl checked, all without a cluster.
You start with Docker running and finish with the trainer image built locally and its tests passed: deterministic data, complete checkpoints, exact resumption with one process and with two DDP processes, and Ray Train recovering from a worker failure with identical final weights.
You start with Docker and kind installed and finish with a five-node kind cluster named quarrystone: one control plane, two on-demand workers and two tainted spot workers, each worker offering four simulated accelerators, and a registry on 127.0.0.1:5001 that every node can pull from.
You start with an empty cluster and finish with the platform installed: the KubeRay operator, Kueue with this project's configuration, the flavors, priorities and three team ClusterQueues, the team namespaces with their queues, permissions, limits and network policies, the RayJob admission policy, object storage with a bucket per team, and Prometheus with the platform's rules.
You start with the platform installed and finish with the trainer image in the lab registry, its digest published to every team's limits, the image present on every node, and make verify reporting every component ready.
You start with a verified platform and finish having run the Forecasting nightly retrain as a Forecasting member: rendered, submitted, admitted, trained on two workers, checkpointed, and read back from its run record.
You start with idle queues and finish having watched Forecasting borrow Vision's idle quota, Vision reclaim it by preemption, and the preempted job resume from its last checkpoint.
You start with a running platform and finish having tested each guardrail as a Vision member: what RBAC allows and refuses, the admission policy's messages for unsafe RayJobs, and the network and storage boundaries between teams.
You start with a platform that has run some jobs and finish having read Kueue's metrics, the recording rules and the alerts in Prometheus, and the accelerator-hours each team used, split into within quota and borrowed.
You start with a verified platform and finish with every scenario test passed and its evidence in evidence/, and with a new trainer image released to the teams and rolled back.
You start with the lab in any state, including half-built after a failed step, and finish with the cluster, the registry and the generated credentials gone, confirmed by make leftovers. Optionally the images and local files go too.
Learning Access: INR 199 plus 18% GST. Source Pack: INR 399 plus 18% GST. 90 days of online access. No auto-renewal.
No cloud account or spending is needed: the lab is a kind cluster on your own computer, publishes ports only on 127.0.0.1, and its images and packages take about 4 GB of disk. The accelerators are simulated and the models train on CPU. GitHub Actions is optional; it is free on public repositories and uses your account's included minutes on private ones. The teams, models and data are invented. This is a learning project, not a hardened cluster or a production-readiness guarantee.
Vectametric Project Source Licence (2026-09-27): lawfully obtained source may be copied, modified and deployed for personal learning and interview preparation, including personal portfolio demonstrations with attribution. These permissions continue after online access expires. Do not resell or redistribute the Source Pack or its original source files, unchanged or modified. Commercial or client production use requires separate written permission. Third-party components, such as Ray, PyTorch, Kueue, KubeRay, Kubernetes, SeaweedFS and Prometheus, retain their own licences. See LICENSE.txt and the Project Source Licence section of the site Terms for the full rules.
You can read the project material without deploying it. Running a cloud build requires the accounts, permissions and tools listed in that project's prerequisites. Deployment runs in your environment, not in a hosted Vectametric lab.
Yes. Learning Access includes the online source-file browser and explanations. The Source Pack adds the downloadable reference repository where available. The project's licence governs use of the source.
No. Cloud and CI usage are separate. Read the project's cost notice, set a budget and stop deadline, and follow its destruction and leftover-resource checks.
The project curriculum lists the available scenarios and interview topics. These focus on understanding the architecture and explaining decisions; they are not a promise of particular interview questions or a job.
The project page and checkout show the online access period for your selected plan. Access does not auto-renew. Downloaded source remains subject to its licence; future releases are not automatically included.
Review the Terms and No-Refund Policy before confirming access. All sales are final; Vectametric does not offer refunds.
Vectametric home · Roadmaps · Vecta IT Exams · Vecta Government Exams · Vecta Banking & Finance Exams · Vecta Entrance Exams · About us · Contact · Privacy Policy · Terms and Conditions · No-Refund Policy