Skip to content

Commit 26379fd

Browse files
authored
Remove dormant FitConfig fields (closes #6) (#11)
explore_rate, retrain_every and min_labels_to_start were never read by any fit or routing code. Only explore_rate was echoed into config.json. Per the maintainer decision on #6, drop them to keep the OSS core minimal and paper-faithful; continual learning stays covered by update(). - remove the three fields and their __post_init__ validation (config.py) - drop the explore_rate entry from the config.json dump (api.py) - trim test_fitconfig_rejects_bad_scalars (tests/test_fit.py) - remove the three lines from the FitConfig block (docs/api.md)
1 parent 839eab4 commit 26379fd

4 files changed

Lines changed: 1 addition & 19 deletions

File tree

‎docs/api.md‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -435,9 +435,6 @@ class FitConfig:
435435
frontier_targets: tuple = (0.85, 0.90, 0.95)
436436
min_deploy_coverage: float = 0.05
437437
max_fit_labels: int = 8_000
438-
explore_rate: float = 0.05
439-
retrain_every: int = 100
440-
min_labels_to_start: int = 100
441438
seed: int = 42
442439
```
443440

‎src/tracer/api.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ def log_fn(msg: str) -> None: # noqa: E301 — local helper
169169
"frontier_targets": list(config.frontier_targets),
170170
"min_deploy_coverage": config.min_deploy_coverage,
171171
"max_fit_labels": config.max_fit_labels,
172-
"explore_rate": config.explore_rate,
173172
"seed": config.seed,
174173
}, indent=2), encoding="utf-8")
175174

‎src/tracer/config.py‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ class FitConfig:
2525
frontier_targets: Tuple[float, ...] = (0.85, 0.90, 0.95)
2626
min_deploy_coverage: float = 0.05
2727
max_fit_labels: int = 8_000
28-
explore_rate: float = 0.05
29-
retrain_every: int = 100
30-
min_labels_to_start: int = 100
3128
embedding: EmbeddingConfig = field(default_factory=EmbeddingConfig)
3229
seed: int = 42
3330
# Emit per-candidate + per-stage progress to stderr during fit. Disable
@@ -57,10 +54,3 @@ def __post_init__(self) -> None:
5754
f"{self.min_deploy_coverage}")
5855
if self.max_fit_labels <= 0:
5956
raise ValueError(f"max_fit_labels must be > 0, got {self.max_fit_labels}")
60-
if not 0.0 <= self.explore_rate <= 1.0:
61-
raise ValueError(f"explore_rate must be in [0, 1], got {self.explore_rate}")
62-
if self.retrain_every <= 0:
63-
raise ValueError(f"retrain_every must be > 0, got {self.retrain_every}")
64-
if self.min_labels_to_start < 0:
65-
raise ValueError(
66-
f"min_labels_to_start must be >= 0, got {self.min_labels_to_start}")

‎tests/test_fit.py‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -422,16 +422,12 @@ def test_fitconfig_rejects_empty_frontier_targets():
422422

423423

424424
def test_fitconfig_rejects_bad_scalars():
425-
"""min_deploy_coverage, max_fit_labels, explore_rate, retrain_every are guarded."""
425+
"""min_deploy_coverage and max_fit_labels are guarded."""
426426
from tracer.config import FitConfig
427427
with pytest.raises(ValueError):
428428
FitConfig(min_deploy_coverage=1.5)
429429
with pytest.raises(ValueError):
430430
FitConfig(max_fit_labels=0)
431-
with pytest.raises(ValueError):
432-
FitConfig(explore_rate=2.0)
433-
with pytest.raises(ValueError):
434-
FitConfig(retrain_every=0)
435431

436432

437433
def test_fitconfig_accepts_valid_config():

0 commit comments

Comments
 (0)