Skip to content

chore(configs): drop unused config knobs - #3985

Closed
faresobeid wants to merge 2 commits into
mainfrom
chore/drop-unused-config-knobs
Closed

faresobeid wants to merge 2 commits into
mainfrom
chore/drop-unused-config-knobs

Conversation

@faresobeid

@faresobeid faresobeid commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Removes config knobs that nothing reads or that nobody sets:

  • env_server.output_dir: no reader. src/prime_rl/entrypoints/env_server.py never uses it, and the launchers do not write it (write_env_server_config writes only env, serve, address_file and log).
  • heartbeat.min_interval: no config, test or doc sets it. It becomes the constant MIN_INTERVAL_S = 30.0 in src/prime_rl/utils/heartbeat.py, the value that fix(utils): throttle BetterStack heartbeat pings #3715 picked for Better Stack's rate limit.
  • The deployment.num_eval_gpus / deployment.num_eval_nodes aliases on SFT: both arrived together with num_infer_gpus / num_infer_nodes in feat: online evals during sft #3256, so they were never a legacy name. Nothing references them.
  • SFT fake data.input_ids: fake data now always uses the increasing ids, which was already the config default. The random branch and the now-unused vocab_size argument of FakeDataset are removed, so no config changes behavior. increasing is the simpler path because it makes no generator draws. The exact-order dataloader tests already rely on it. One limitation already existed before this PR: each sample's token id is its sample index, so a very long fake-data run eventually goes past the vocab size.

I re-checked the other candidates from the config audit and left them out:

Test plan (all run):

  • pytest tests/unit/orchestrator tests/unit/test_configs.py tests/unit/train/sft tests/unit/utils -m "not gpu": 482 passed. Fake-dataset tests were updated for the removed arguments.
  • Script checks:
    • five rapid Heartbeat.beat() calls send one ping;
    • num_eval_gpus is now rejected and num_infer_gpus still works;
    • EnvServerConfig(output_dir=...) is rejected.
  • ruff check and ruff format --check on the changed files.

Note

Low Risk
Config surface and test-only fake-data paths shrink with no production readers of the removed fields; default fake-data behavior matches the former increasing default.

Overview
Removes several unused or redundant config knobs and aligns runtime code with the slimmer schemas.

Config removals: env_server.output_dir (never read by the env-server entrypoint or launchers); heartbeat.min_interval (replaced by a fixed 30s throttle in Heartbeat via MIN_INTERVAL_S); SFT deployment aliases num_eval_gpus / num_eval_nodes (only num_infer_* remain); and fake SFT data.input_ids.

Fake SFT data: FakeDataset always emits deterministic “increasing” token ids (sample index repeated per position); the random-id path and vocab_size plumbing are dropped. Variable-length fake data still randomizes sequence length only.

Docs on eval heartbeat behavior now refer to the hard-coded 30s interval. Unit tests were updated for the new FakeDataset API and configs.

Reviewed by Cursor Bugbot for commit 5fbf89e. Bugbot is set up for automated code reviews on this repo. Configure here.

@faresobeid
faresobeid marked this pull request as ready for review October 10, 2026 17:40

log: LogConfig = LogConfig()

output_dir: Path = Field(default_factory=default_output_dir)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

u sure this is not set? env servers also log to output dir no?

url: str
"""URL to send the heartbeat to."""

min_interval: float = Field(30.0, gt=0)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think @samsja added this intentionally

length: Literal["fixed", "variable"] = "fixed"
"""Use fixed-length samples or variable-length samples."""

input_ids: Literal["increasing", "random"] = "increasing"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i feel like random might be useful?

@faresobeid faresobeid closed this Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants