Skip to content

Let teams ask for CPU-only compute, and price it - #105

Merged
Adambomb210 merged 1 commit into
mainfrom
claude/cpu-in-form
Nov 26, 2026
Merged

Adambomb210 merged 1 commit into
mainfrom
claude/cpu-in-form

Conversation

@Adambomb210

Copy link
Copy Markdown
Collaborator

What

  • Application form: both budget estimators get "CPU only, no GPU". The team gives the number of cores (1–512) and the hours. The estimate uses Krater's CPU price per core-hour, or the team's own price per machine-hour if they give one (Krater's figure is kept next to it). The live estimate (/pricing/estimate) and the no-JavaScript form both handle it.
  • Admin CPU price: a new org limit, "CPU price per core-hour", on /admin/compute (micro-dollars, cpu_core_hour_microusd). 0 means not set; teams then give their own price.
  • Partner grants: the daily usage import also totals core-hours from jobs that recorded no GPU-hours, and values them at the CPU price. A GPU job's cores come with its GPU price, so nothing is counted twice. Each day keeps the price it was first valued at. Days that have CPU-only usage but no CPU price yet show as not priced, and get valued once a price is set. Days imported before this change are read again once, from the start of the grant.
  • Funder packet: the "GPU estimate" field is now "Compute estimate", and a CPU-only estimate reads e.g. "CPU only, 16 cores × 40h, on-demand".

No compute runs CPU-only yet; this is the form and the accounting.

Migrations

Both only add columns:

  • d3f8b1c5e7a2: compute_settings.cpu_core_hour_microusd (NOT NULL, default 0)
  • e6a2c9d4f1b8: nullable ospool_usage_days.cpu_core_hours, core_rate_microusd, core_value_cents

Tests

Full suite on Windows: all pass except test_ssh_reach, which fails only on Windows (fixed for Linux in #103). Ruff is clean. The form and the admin setting were checked in a browser.

🤖 Generated with Claude Code

- The application form's estimators get "CPU only, no GPU": the team gives
  the cores (1-512) and the hours. It is priced at Krater's CPU price per
  core-hour, or at the team's own price per machine-hour.
- Admins set the CPU price per core-hour under Organization limits on
  /admin/compute (0 means not set; teams then give their own price).
- Partner grants value core-hours from jobs that used no GPU at that price,
  next to GPU-hours. Each day keeps the price it was first valued at; days
  imported before this are read again once.
- The funder packet's "GPU estimate" is now "Compute estimate".

Migrations d3f8b1c5e7a2 and e6a2c9d4f1b8 only add columns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Adambomb210
Adambomb210 merged commit eef52d0 into main Nov 26, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant