Skip to content

Commit b5dce2d

Browse files
timmarkhuffTim Huffcursoragent
authored
Enforce maximum value for GlobalConfig.refresh_rate (#439)
## Changes - Add `le=86400` to `GlobalConfig.refresh_rate`, capping the maximum value at 1 day. Values above this are now rejected at construction time with a clear `ValidationError`. ## Notes This PR is paired with groundlight/edge-endpoint#427, which makes the model-updater loop more responsive to `set_config` calls. Neither PR depends on the other for correctness. --------- Co-authored-by: Tim Huff <thuff@axon.com> Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 4c48e73 commit b5dce2d

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ packages = [
99
{include = "**/*.py", from = "src"},
1010
]
1111
readme = "README.md"
12-
version = "0.29.0"
12+
version = "0.30.0"
1313

1414
[tool.poetry.dependencies]
1515
# For certifi, use ">=" instead of "^" since it upgrades its "major version" every year, not really following semver

src/groundlight/edge/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ class GlobalConfig(BaseModel): # pylint: disable=too-few-public-methods
1414
refresh_rate: float = Field(
1515
default=60.0,
1616
gt=0,
17-
description="The interval (in seconds) at which the inference server checks for a new model binary update.",
17+
le=86400,
18+
description="Interval (seconds) at which the model-updater polls for new model binaries.",
1819
)
1920
confident_audit_rate: float = Field(
2021
default=1e-5, # A detector running at 1 FPS = ~100,000 IQ/day, so 1e-5 is ~1 confident IQ/day audited

0 commit comments

Comments
 (0)