mirror of
https://github.com/wassname/moral-maps.git
synced 2026-09-22 13:20:36 +08:00
Account for discarded WVS experiment spend
Co-Authored-By: PI[gpt-5.6-terra] <288921227+claudypoo@users.noreply.github.com>
This commit is contained in:
co-authored by
PI[gpt-5.6-terra]
parent
aeadc751c6
commit
4bfef7fb3c
@@ -22,6 +22,7 @@ LOCK = OUT / "budget.lock"
|
||||
GLOBAL_STOP_USD = Decimal("80")
|
||||
# Includes the discarded pick-one-option spend. It remains spending under the USD 80 cap.
|
||||
PRIOR_OBSERVED_USD = Decimal("5.34309727235")
|
||||
DENSE_BASELINE_USD = Decimal("3.5908606723")
|
||||
OSS_PROVIDER = {
|
||||
"allow_fallbacks": True,
|
||||
"require_parameters": True,
|
||||
@@ -140,7 +141,7 @@ def rated_cost() -> Decimal:
|
||||
def reserve(row: dict) -> bool:
|
||||
with budget_state() as state:
|
||||
held = sum(Decimal(value["reserve_usd"]) for value in state["reservations"].values())
|
||||
observed = max(PRIOR_OBSERVED_USD, rated_cost())
|
||||
observed = PRIOR_OBSERVED_USD + max(Decimal(), rated_cost() - DENSE_BASELINE_USD)
|
||||
required = Decimal(row["reserve_usd"])
|
||||
if observed + held + required >= GLOBAL_STOP_USD:
|
||||
print(f"stop: observed={observed} held={held} required={required} cap={GLOBAL_STOP_USD}")
|
||||
|
||||
Reference in New Issue
Block a user