Skip to main content
Loading navigation
Back to prompt library

Build an MLflow Accelerator Procurement Scenario Tracker — implementation

Linked challenge: Build an MLflow Accelerator Procurement Scenario Tracker

Prompt source

implementation70 lines11 sectionsNo variables1 code block
## Build
Compare cloud accelerator reservation options against generative inference demand curves. Track multi-scenario procurement parameters, break-even metrics, and API-generated cost narratives using MLflow to manage financial lifecycle evaluations.

## User
AI FinOps Analyst

## Workflow
1. Parse projected token request distributions and burst patterns from normalized trace files using pandas.
2. Calculate baseline costs and break-even hours across on-demand and reserved accelerator pricing scenarios based on projected and billed hours.
3. Use the Anthropic API to synthesize qualitative cost narratives covering hardware obsolescence and capacity planning tradeoffs based on the calculated metrics.
4. Log scenario parameters, financial metrics, and the generated comparative procurement narrative into an MLflow tracking server as experiment runs.

## Interface
Multi-scenario financial comparison workbench with downloadable MLflow metrics and text summaries.

## Data
Simplified synthetic cloud accelerator pricing catalogs and normalized traffic traces in a test folder.
Starter examples below are synthetic. They are not downloaded records.

## Source
[AWS Neuron documentation](https://raw.githubusercontent.com/aws-neuron/aws-neuron-sdk/master/README.md)
Models AWS EC2 accelerated instance types (e.g., Inf2, Trn1) across commitment tiers.

## Tools
mlflow, anthropic, pandas.
MLflow tracks procurement simulation runs, cost parameters, and comparative scenario metrics.
Anthropic API access for generating qualitative procurement sensitivity evaluations.

## 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
- Evaluates total spend differences between on-demand and reserved instances accurately.
- Calculates the exact monthly break-even hours for a reserved instance given on-demand and reserved rates.
- Validates pricing schemas against standardized multi-cloud rate formats.
- Emits formal procurement brief tracking total cost metrics into an MLflow experiment run.

## Starter Examples
```json
[
  {
    "input": {
      "accelerator_type": "AWS_INF2",
      "hourly_on_demand_usd": 10,
      "hourly_reserved_usd": 6,
      "projected_monthly_hours": 600,
      "workload_months": 12,
      "reservation_billed_hours_per_month": 730
    },
    "expected_output": {
      "total_on_demand_cost": 72000,
      "total_reserved_cost": 52560,
      "projected_savings_usd": 19440,
      "break_even_runtime_hours_per_month": 438,
      "procurement_recommendation": "COMMIT_RESERVED"
    }
  },
  {
    "input": {
      "accelerator_type": "AWS_TRN1",
      "hourly_on_demand_usd": 20,
      "hourly_reserved_usd": 12,
      "projected_monthly_hours": 150,
      "workload_months": 6,
      "reservation_billed_hours_per_month": 730
    },
    "expected_output": {
      "total_on_demand_cost": 18000,
      "total_reserved_cost": 52560,
      "projected_savings_usd": -34560,
      "break_even_runtime_hours_per_month": 438,
      "procurement_recommendation": "RETAIN_ON_DEMAND"
    }
  }
]
```

## Safety
Procurement comparisons are simulation only. No automated purchasing or cloud account binding. Explicitly label normalized examples as simplified synthetic app records, not complete official schema files.
Use mock external writes. Require human review before any real deployment.