- Version
- since 2.x, describes 2.52.14
- Feature flag
hpc_scheduler- For
- Workspace user, Platform operator
Workspace members submit batch jobs and launch interactive JupyterLab sessions on a Slurm cluster without logging in to it. The platform maps each workspace to a scheduler account and each project to a sub-account, pushes the project quotas and a fair-share weight per workspace down to the cluster, submits jobs through the cluster's REST interface, polls their state and consumed resources back, and proxies the browser into a running session through a signed URL. Operators register the cluster, check its health and set fair-share weights in the operator console.
What it does
- Submits a batch job (a script plus a name, a resource request and an optional project) to the one active cluster, records it, and follows it through the states
pending, running, completed, failed, cancelled, timeout and node_fail.
- Launches an interactive session: a job that starts JupyterLab on a compute node and reports back when it is listening. The session is
pending, then ready, then dead; a ready session opens in the browser through a short-lived signed URL.
- Pre-checks a job or session request against the project quota before it reaches the cluster and rejects with
quota_exceeded_project; the limits synced to the cluster remain the enforcement of record. See Quotas and capacity.
- Syncs identity and limits down: one scheduler account per workspace, one sub-account per project, one association per user, the workspace frame and project quotas as account limits, and a fair-share weight per workspace. A reconcile pass repairs drift every 10 minutes.
- Ingests state and usage up every 60 seconds: state transitions, the node, start and end times, exit code, and GPU seconds, CPU seconds, peak RAM and runtime once a job ends.
- Reports GPU hours, CPU hours and runtime hours per project or user for a workspace, and per workspace, project or user across the deployment, as JSON or CSV. The job records also feed Monitoring and alerting (scheduled usage) and Reports and accounting.
- Is switched on with the
hpc_scheduler feature flag. With the flag off the job and session routes answer 404 feature_disabled, the HPC Jobs entry is hidden, and the three background passes do nothing; cluster registration and health checks stay reachable so bring-up can finish first.
Where it is
| Surface | Path |
|---|
| Web app | HPC Jobs in the workspace sidebar, tabs Jobs, Interactive sessions, Usage reports |
| Web app (token scope) | Workspace settings, then Access tokens: the manage_scheduler_jobs scope, shown when the capability is on |
| Operator console | Platform, then Scheduler (page title HPC Scheduler): Clusters, Sync status, Jobs (all workspaces), Usage report (all workspaces) |
| API (jobs) | GET and POST /api/v1/workspaces/{workspace_id}/scheduler/jobs, GET /api/v1/workspaces/{workspace_id}/scheduler/jobs/{id}, POST /api/v1/workspaces/{workspace_id}/scheduler/jobs/{id}/cancel |
| API (sessions) | GET and POST /api/v1/workspaces/{workspace_id}/scheduler/sessions, POST /api/v1/workspaces/{workspace_id}/scheduler/sessions/{id}/open, DELETE /api/v1/workspaces/{workspace_id}/scheduler/sessions/{id}; POST /api/v1/scheduler/session-callback is called by the compute node, not by users |
| API (reports) | GET /api/v1/workspaces/{workspace_id}/scheduler/reports/usage |
| API (operators) | GET and POST /admin/scheduler/clusters, PATCH and DELETE /admin/scheduler/clusters/{id}, POST /admin/scheduler/clusters/{id}/health, GET /admin/scheduler/sync-status, POST /admin/scheduler/reconcile, GET /admin/scheduler/jobs, PUT /admin/scheduler/workspaces/{workspace_id}/fair-share, GET /admin/scheduler/reports/usage |
| CLI | cerebro jobs, cerebro sessions, cerebro reports pull; see CLI |
How to use it
Submit a batch job (workspace member)
- Open HPC Jobs, tab Jobs, then Submit job. The button needs the
ManageSchedulerJobs permission, which the Owner, Administrator and Team member roles carry.
- Fill in Job name and Script (paste it, or Load from .sh file), optionally a Project, then GPUs, CPU cores, RAM (GB), and optionally Time limit (minutes) and Queue / partition. Left empty, the time limit and partition fall to the scheduler's defaults.
- With a project chosen, the dialog shows the project quota headroom (cap minus usage per dimension). Submit posts the job; a project quota rejection is shown in the dialog as
quota_exceeded_project.
- The job appears as
pending with its scheduler job id. The script is passed to the cluster unchanged; the resource request travels as submission fields, not as directives written into the script.
The request body is { "name", "script", "projectId"?, "request": { "gpu", "cpu", "ramGb", "timeLimitMinutes"?, "partition"? } }. A cpu of 0 is submitted as 1 core; ramGb is converted to MB for the cluster.
Follow, inspect and cancel a job
- The Jobs table lists name, kind, state, project, requested resources, submission time and runtime, filtered by project, state and kind, 15 per page. It refreshes every 30 seconds while the browser tab is visible.
- Details opens a drawer with the state, kind, project, queue or partition, scheduler job id, requested resources, exit code, a timeline (submitted, started, ended), and once the job has ended its usage: runtime, GPU hours, CPU hours and peak RAM. An error reported by the scheduler is shown at the top.
- Cancel asks the cluster to stop a
pending or running job and records it as cancelled at once (POST .../jobs/{id}/cancel, answers 202).
- Job output is not served through the platform. Standard output and error stay in the scheduler's default output file in the job's working directory on the cluster's shared filesystem;
cerebro jobs logs says so and exits non-zero.
Launch an interactive session
- Open HPC Jobs, tab Interactive sessions, then Launch Jupyter session.
- Choose an optional Project, then GPUs, CPU cores, RAM (GB) and an optional Time limit (minutes). A Model path field appears when you arrive from the model catalogue; the session then exports that path to the notebook. See Model catalogue.
- Launch submits a session job named
interactive-session. The session is pending until JupyterLab on the compute node calls the platform back; the list refreshes every 30 seconds while the tab is visible. On a busy cluster this can take minutes.
- When the state is
ready, Open mints a signed URL (POST .../sessions/{id}/open) and opens it in a new tab. The URL is valid for 60 seconds and leads to the platform's session proxy, which relays HTTP and WebSocket traffic to the notebook while the job lives. Press Open again for a fresh URL.
- Terminate cancels the job and removes the session (
DELETE .../sessions/{id}). A session also becomes dead when its job ends or its expiry passes; the expiry is 8 hours after launch, or the requested time limit when that is longer.
From the CLI, cerebro sessions start waits about 30 seconds, polling every 3 seconds, and prints the proxy URL when the session becomes ready; otherwise it tells you to run cerebro sessions open <id> later. Commands are on the CLI page.
Read usage reports (workspace member)
- Open HPC Jobs, tab Usage reports. Choose a period and Group by project or user.
- Generate report lists jobs, completed, failed, cancelled, GPU hours, CPU hours and runtime hours per group, counted from ended jobs in the period. Download CSV fetches the same rows (
?format=csv, or Accept: text/csv); Download PDF prints the generated table.
- The API requires
from, to and groupBy; from must be before to (from_must_be_before_to); hours are rounded to two decimals.
Use the API or the CLI with a token
Every read (job and session lists, job detail, the usage report) is open to any valid workspace access token. Submitting and cancelling jobs and starting, opening and stopping sessions need the manage_scheduler_jobs token scope, which maps to the ManageSchedulerJobs workspace permission; the scope's checkbox appears under Workspace settings, then Access tokens, when the capability is on. See Access tokens.
Register a cluster and switch the capability on (operator)
- Deploy the cluster: a controller with the Slurm REST interface and JWT authentication enabled, reachable from the control-plane hosts, and at least one compute node. For sessions, every compute node that may run one needs JupyterLab and Python on its path and outbound reachability to the platform's public API, and the session proxy must be deployed. Batch jobs need neither.
- Make the cluster's API token available to the API process under a name of your choice before the process starts; the platform stores only the name, never the token.
- In Platform, then Scheduler, press Register cluster: name, region, controller URL and the auth secret reference (the name from step 2). The cluster starts with status
unconfigured. These routes work with the flag off.
- Activate the cluster. Exactly one cluster is active per deployment; activating one deactivates every other in the same step. There is no deactivate without activating another.
- Check health. The status becomes
healthy or unreachable; do not continue on unreachable.
- Switch
hpc_scheduler on under Platform, then Feature flags. From this moment the HPC Jobs entry appears and every workspace created afterwards is onboarded into scheduler sync.
- Press Run reconcile once (
POST /admin/scheduler/reconcile, synchronous) and read Sync status: every onboarded workspace should show a recent Last synced and no Sync error.
Afterwards:
- Fair-share weight is edited in the Sync status table (
PUT /admin/scheduler/workspaces/{workspace_id}/fair-share with weight and a reason). The default is 1; the console accepts 0 and above. The weight is pushed to the workspace's scheduler account.
- Jobs (all workspaces) searches jobs across tenants by workspace and state, 15 per page. Usage report (all workspaces) groups by workspace, project or user and needs the
admin_reports staff permission; the rest of the page needs admin_feature_flags.
- Partitions and QOS are configured on the cluster by your operators; the platform does not list or edit them. A user may name a partition in the optional Queue / partition field at submission; the job detail shows it.
- The deployment order across capabilities is on Deployment and integration; day-to-day operation and rollback are on Operations.
On-demand and on-prem
- On-demand (web): switched on. We run the cluster and the session proxy; you submit jobs and sessions from the web app, the API and the CLI. Jobs and interactive sessions are charged by the GPU-hour from the workspace balance; see Billing.
- Licensed on-prem: your operators run the cluster and the session proxy, register the cluster in the operator console, check its health, set fair-share weights and switch the capability on with the
hpc_scheduler feature flag; see Configuration for the flag. Workspace users submit jobs and sessions from the web app, the API and the CLI.
Numbers
Job request and record
| Field | Value |
|---|
| Request fields | name, script, projectId (optional), request.gpu, request.cpu, request.ramGb, request.timeLimitMinutes (optional), request.partition (optional) |
| Units | whole GPUs, whole CPU cores, whole GB of RAM, minutes |
| CPU request of 0 | submitted as 1 core |
| RAM | converted to MB for the cluster (GB × 1024) |
| Job kinds | batch, session |
| Job states | pending, running, completed, failed, cancelled, timeout, node_fail |
| Terminal states | completed, failed, cancelled, timeout, node_fail |
| Usage recorded at the end of a job | GPU seconds, CPU seconds, peak RAM in GB, runtime seconds |
| Job list page size in the apps | 15 |
| Job list refresh in the web app | every 30 seconds while the tab is visible |
How cluster states map to job states
| Platform state | Scheduler states it is read from |
|---|
pending | PENDING, CONFIGURING, REQUEUED, REQUEUE_HOLD, REQUEUE_FED, RESV_DEL_HOLD |
running | RUNNING, COMPLETING, SUSPENDED, SIGNALING, STAGE_OUT, RESIZING |
completed | COMPLETED |
failed | FAILED, OUT_OF_MEMORY, BOOT_FAIL, SPECIAL_EXIT, PREEMPTED, STOPPED; also any state the platform does not recognise |
cancelled | CANCELLED, REVOKED; also a cancellation requested through the platform |
timeout | TIMEOUT, DEADLINE |
node_fail | NODE_FAIL |
Sessions
| What | Value |
|---|
| Session states | pending (submitted, no callback yet), ready (callback received, job running, not expired), dead (job ended or expiry passed) |
| Session expiry | 8 hours after launch, or the requested time limit if longer |
| Signed open URL validity | 60 seconds; press Open again for a new one |
| Proxy mapping kept for | the remaining session life, at most 8 hours per Open |
| Session job name | interactive-session |
| Callback port accepted | 1024 to 65535 |
| Session list refresh in the web app | every 30 seconds while the tab is visible |
CLI readiness wait on sessions start | about 30 seconds, polling every 3 seconds |
| Session types | JupyterLab only |
Background passes and sync
| What | Value |
|---|
| State and usage ingest | every 60 seconds |
| Reconcile of accounts, sub-accounts and associations | every 10 minutes, and on Run reconcile |
| Sync queue drain | every 30 seconds; a failed item is retried up to 5 times with a delay of 10 seconds doubling each time, capped at 10 minutes |
| Active clusters per deployment | exactly 1 |
| Cluster statuses | unconfigured, healthy, unreachable |
| Fair-share weight | default 1, per workspace, console accepts 0 and above |
| Limits pushed to the cluster | workspace frame GPUs, CPU cores and RAM as workspace account limits; project quota GPUs, CPU cores and RAM as sub-account limits; unset dimensions stay unset |
| Usage report hours | rounded to two decimals |
Causes
| Cause | HTTP status | When |
|---|
feature_disabled | 404 | hpc_scheduler is off |
quota_exceeded_project | 400 | The request does not fit the project quota |
project_not_found | 404 | The project is not in the workspace |
scheduler_cluster_unavailable | 400 | No cluster is active, or the cluster's token cannot be resolved; also what an expired token looks like |
scheduler_session_not_ready | 400 | Open on a session that is not ready |
scheduler_session_not_found | 404 | The session's token is no longer held, or the callback did not match a session |
scheduler_session_already_ready | 409 | A repeated callback for a session already marked ready |
session_proxy_unconfigured | 400 | The session proxy secret is not configured on the API hosts |
model_not_found, model_path_invalid | 404, 400 | The model path is not a ready grant of the workspace, or contains a single-quote character |
scheduler_cluster_active | 409 | Deleting the active cluster |
scheduler_cluster_has_jobs | 409 | Deleting a cluster that ever ran a job |
scheduler_cluster_not_found | 404 | Unknown cluster id |
from_must_be_before_to, group_by_required, invalid_group_by, invalid_format | 400 | Usage report parameters |
Limits and known behaviour
- One cluster per deployment, shared by all workspaces, isolated through scheduler accounts and fair-share. Per-workspace private clusters do not exist.
- Multi-partition topology management is not in scope: the platform neither lists nor manages partitions or QOS. The spec foresaw a read-only partition and QOS view in the operator console; it is not built in 2.48.6.
- Job logs are not served through the API or the apps; they stay on the cluster's shared filesystem.
- Workspaces that existed before
hpc_scheduler was switched on are not onboarded into scheduler sync by the flag. Setting a workspace's fair-share weight onboards it (a sync is queued); there is no bulk onboarding action. Workspaces created after the flag is on are onboarded at creation.
- A job that disappears from the cluster's active list without the cluster reporting its final state is recorded as
completed, or failed if its last known exit code was non-zero; timeout and node_fail are recorded only when the cluster reports them while the job is still listed. A job finalised this way keeps the usage the cluster returns for it.
- Jobs submitted directly on the cluster, outside the platform, are ignored by the ingest and never appear in the platform.
- A session whose compute node cannot reach the platform's public API stays
pending from the platform's point of view even though JupyterLab is running; the job itself is not failed. The callback is unauthenticated at the HTTP layer and is protected by a per-session secret, so it must not be blocked by an intermediate proxy.
- A session's token is kept only for the session's lifetime. A session that still reads
ready but whose token has gone answers scheduler_session_not_found on Open.
- Cancelling a job or terminating a session records the final state immediately; the cluster stops the job as soon as it can.
- Deleting a workspace cancels its non-terminal jobs, tears down its sessions and removes its scheduler account; the job records are kept as audit data, which is also why a cluster that ever ran a job cannot be deleted. There is no automatic draining of idle workspaces.
- The cluster's API token is read when the API process starts. When it expires, the health check turns
unreachable, submissions answer scheduler_cluster_unavailable and every onboarded workspace shows a Sync error; the token must be renewed and the API process restarted. A sync error clears by itself on the next successful reconcile.
- All jobs submitted through the platform run on the cluster under the identity behind the cluster's API token; the platform user id is recorded on the job for traceability. Per-user identity on the compute nodes is a cluster-side configuration matter, not something the platform sets up.
- Switching
hpc_scheduler off hides the surfaces and stops the background passes; jobs, onboarding rows and the cluster registration are kept, and the cluster stays registered (inactive if you activated another). Switching it back on resumes where it left off.
- Planned, not in 2.48.6: a second scheduler backend behind the same connector, other session types than JupyterLab, controller high availability, a read-only partition and QOS view, bulk onboarding of existing workspaces, browser-based sign-in for the CLI.
Related pages