Back to prompt library
Build a Multi-Tenant GPU Reservation and Chargeback Reconciler — implementation
Linked challenge: Build a Multi-Tenant GPU Reservation and Chargeback Reconciler
Prompt source
implementation74 lines11 sectionsNo variables1 code block
## Build
Reconcile scheduled multi-team GPU reservation windows against active DCGM telemetry metrics to quantify idle waste. Synthesize chargeback adjustments and capacity release proposals for infrastructure finance teams.
## User
Infrastructure Operations and FinOps Lead
## Workflow
1. Ingest scheduled team GPU reservation windows alongside normalized Prometheus DCGM exporter time-series telemetry records.
2. Calculate active execution ratios, compute memory residency, and unallocated idle hours across individual accelerator slots.
3. Invoke hosted Claude via Anthropic API to analyze underutilization patterns and generate policy-compliant refund chargeback adjustments.
4. Publish structured accounting reconciliation ledgers with itemized reclamation recommendations for engineering team review.
## Interface
Web FinOps console featuring reservation timeline diffs, utilization heatmaps, simulated credit adjustment vouchers, and exportable reconciliation reports.
## Data
Generate 40 normalized synthetic DCGM exporter time-series records covering 8 GPU nodes alongside reservation schedules in JSON format.
Starter examples below are synthetic. They are not downloaded records.
## Source
[NVIDIA DCGM exporter](https://raw.githubusercontent.com/NVIDIA/dcgm-exporter/main/README.md)
Extracts GPU utilization and memory metrics exposed by NVIDIA DCGM exporter in Prometheus text format to determine active vs idle state.
## Tools
mlflow, python-dateutil.
MLflow provides native tracking and experiment artifact logging to audit FinOps reconciliation runs across compute pools.
Hosted Claude API for telemetry reconciliation reasoning and accounting summaries. Local hardware executing open workload accounting logic only.
## Deliverables
Submit runnable source, pinned dependencies, setup commands, a working interface, example outputs, and a recorded end-to-end demo. Include tests and an action log.
## Acceptance
- Identifies active vs idle GPU allocation windows with zero missing metric intervals in test datasets.
- Computes team chargeback penalty adjustments matching predefined contract accounting formulas.
- Outputs valid structured JSON reconciliation ledgers including team IDs, idle credits, and recommended quota adjustments.
## Starter Examples
```json
[
{
"input": {
"team_id": "nlp-research",
"reservation_hours": 24,
"allocated_gpus": 8,
"hourly_rate": 3.5,
"dcgm_active_utilization_pct": [
12,
10,
8,
15,
9,
11
]
},
"expected_output": {
"average_utilization_pct": 10.83,
"underutilized_hours": 24,
"idle_waste_cost": 599.76,
"chargeback_adjustment_status": "CREDIT_RECOMMENDED",
"suggested_quota_reduction_gpus": 6
}
},
{
"input": {
"team_id": "speech-prod",
"reservation_hours": 0,
"allocated_gpus": 4,
"hourly_rate": 3.5,
"dcgm_active_utilization_pct": []
},
"expected_output": {
"average_utilization_pct": 0,
"underutilized_hours": 0,
"idle_waste_cost": 0,
"chargeback_adjustment_status": "SKIPPED_EMPTY_WINDOW",
"suggested_quota_reduction_gpus": 0
}
}
]
```
## Safety
Simulates financial cost adjustments and capacity changes. Requires explicit FinOps administrator sign-off before modifying enterprise cloud billing systems.
Use mock external writes. Require human review before any real deployment.