Skip to content

Cost estimation

A transparent, overridable estimate of memory, wall time, and dollars produced before a run starts. The rate inputs are explicit and can be overridden; see Concepts.

Estimate

quote

quote(
    sim: Simulation,
    *,
    rate_usd_per_tcell_step: float = DEFAULT_RATE_USD_PER_TCELL_STEP,
    throughput_gcells_per_s: float = DEFAULT_THROUGHPUT_GCELLS_PER_S,
) -> CostEstimate

Estimate dollars, device memory, output size and wall-time for sim.

See the module docstring for the model. rate_usd_per_tcell_step is an explicit planning assumption; throughput affects only the wall-time estimate, never the dollar figure.

CostEstimate dataclass

CostEstimate(
    cells_per_axis: Tuple[int, int, int],
    num_cells: int,
    num_steps: int,
    dt_s: float,
    tcell_steps: float,
    rate_usd_per_tcell_step: float,
    usd: float,
    device_memory_bytes: int,
    output_bytes: int,
    throughput_gcells_per_s: float,
    wall_seconds: float,
)

Pre-run estimate for one Simulation. Returned by Simulation.cost_estimate; str(estimate) is a human summary.

cells_per_axis instance-attribute

cells_per_axis: Tuple[int, int, int]

num_cells instance-attribute

num_cells: int

num_steps instance-attribute

num_steps: int

dt_s instance-attribute

dt_s: float

tcell_steps instance-attribute

tcell_steps: float

rate_usd_per_tcell_step instance-attribute

rate_usd_per_tcell_step: float

usd instance-attribute

usd: float

device_memory_bytes instance-attribute

device_memory_bytes: int

output_bytes instance-attribute

output_bytes: int

throughput_gcells_per_s instance-attribute

throughput_gcells_per_s: float

wall_seconds instance-attribute

wall_seconds: float

summary

summary() -> str

Format the estimated price, grid, memory, output size, and wall time.

Wall time assumes the full duration and the configured throughput. Auto-shutoff may finish sooner. This method makes no service request.