Fleet Efficiency & EvictionTokens per Dollar One Node Bills
Progress

Tokens per Dollar One Node Bills

easy
Start small, think out loud.

Before an autoscaler can score a fleet, it needs the unit the fleet is scored in: millions of tokens delivered per dollar of card rent. One card delivers its true rate for a whole month, and one month is 730 hours x 3600 s = 2,628,000 s, so the score is true_tok_s x 2,628,000 over rent_usd over 1,000,000, rounded to 3 decimals. The numbers interviewers check: a flagship card at 10,000 tok/s renting for $2,600 a month scores 10.108; a bargain card at 4,500 tok/s for $1,400 scores 8.447, which is the argument used to build a pool on used cards; and a flagship delivering only 2,400 tok/s at $2,600 scores 2.426, a 4x drop from two days of rate blips, which is the evidence an eviction policy exists to find. The score is why the autoscaler acts at all: every decision downstream keeps it. Implement node_efficiency_score(true_tok_s, rent_usd): return the card's million-tokens-per-dollar month, rounded to 3 decimal places.

Time:O(1)
Space:O(1)
fleetefficiencycostai-track
solution.py
⌘↵ run
Loading...
OUTPUT

Run your code to see output