Merge pull request #22 from manifoldbt/fix/bench-licence-researcher

bench: accept a Researcher licence as a licensed tier
This commit is contained in:
Exocet92
2026-10-25 17:35:11 +01:00
committed by GitHub
2 changed files with 13 additions and 3 deletions
+6 -2
View File
@@ -20,6 +20,10 @@ import manifoldbt as mbt
# of getting it wrong is a benchmark job that dies at the first step.
VARS = ("MANIFOLDBT_CI_LICENSE", "MANIFOLDBT_CI_LICENCE")
# The paid tiers `license_info()` can report. Since 0.29.0 a Researcher licence
# reports "Researcher" instead of "Pro". Kept in step with sweep_child.PAID_TIERS.
PAID_TIERS = ("Pro", "Researcher")
def main() -> int:
key = ""
@@ -41,8 +45,8 @@ def main() -> int:
return 1
tier, _ = mbt.license_info()
if tier != "Pro":
print("activation did not yield a licensed tier: refusing to continue.")
if tier not in PAID_TIERS:
print(f"activation yielded the {tier} tier, not a licensed one: refusing to continue.")
return 1
print("licensed tier active")
return 0
+7 -1
View File
@@ -120,16 +120,22 @@ def grid(combos: int) -> tuple[list[int], list[int]]:
# The Community limit on a single sweep, as published on the pricing page.
COMMUNITY_SWEEP_LIMIT = 256
# The paid tiers `license_info()` can report. Since 0.29.0 a Researcher licence
# reports "Researcher" instead of "Pro"; both lift the sweep limit.
PAID_TIERS = ("Pro", "Researcher")
def tier() -> dict:
"""The licence tier the engine reports, read before and after the sweep.
A number measured across a tier change is not a measurement of anything.
`pro` is true for any paid tier: the key predates the Researcher tier and is
kept so the published results keep their shape.
"""
import manifoldbt as mbt
name, _ = mbt.license_info()
return {"pro": name == "Pro"}
return {"pro": name in PAID_TIERS}
def run_mbt(df, fast_vals, slow_vals, workdir, metrics=False, device="auto",