Skip to content

[nightshift] 20260424 multi-cleanup#5153

Merged
claude-nightshift[bot] merged 3 commits intomainfrom
nightshift/cleanup-20260424
Apr 24, 2026
Merged

[nightshift] 20260424 multi-cleanup#5153
claude-nightshift[bot] merged 3 commits intomainfrom
nightshift/cleanup-20260424

Conversation

@claude-nightshift
Copy link
Copy Markdown
Contributor

Stale kwargs fall away —
dead helpers swept from the tree;
code breathes once again.

— seed: a962ec0a

Summary

Three independent scout agents ran parallel cleanup sweeps across the
subprojects; this PR bundles their resulting commits.

lib/marin/src/marin (scout commit 2f2afbf6c)

Fixed a latent bug in transform/conversation/transform_conversation.py: both
call sites of load_dataset_with_backoff were still passing logger=logger
after that kwarg was removed from the helper (when retry_with_backoff was
extracted into rigging). The kwarg was being silently forwarded through
**dataset_kwargs into datasets.load_dataset's **config_kwargs as a
nonsense builder option. Also swapped six root-level logging.log/logging.info
calls for the module-level logger already defined there, and collapsed an
if/else in transform_row whose two arms both ran the identical
_normalize_tool_structures list comprehension.

lib/zephyr/src/zephyr (scout commit 00340541e)

Dropped two dead module re-exports from execution.py:

  • ScatterWriter had no importers anywhere in the tree.
  • ScatterReader had one internal caller (plan.run_stage) that was already
    importing the same symbol from zephyr.shuffle in the same function —
    switched that caller to import solely from zephyr.shuffle.

With the re-exports gone, the late noqa: E402 shuffle import block (a relic
of an earlier cycle that no longer exists — shuffle does not import from
execution) hoists cleanly into the top-of-file imports.

lib/levanter/src/levanter (scout commit c418a33e6)

Removed three never-used helpers and a redundant recomputation:

  • levanter.shapes.conforms — zero callers across the monorepo.
  • levanter.optim.util.hvp — zero callers.
  • levanter.optim.util.tree_gaussian_like — zero callers.
  • levanter.utils.stat_utils.RunningMean.add — dropped a second computation
    of new_total that was already computed a few lines earlier.

No behavior change.

lib/iris/src/iris

Scout reported no changes (permissions prevented commit). It identified two
candidates for a future run: ScaleGroupSpec in cluster/config.py and
resource_capacity_from_spec in cluster/constraints.py, both unused across
the tree.

Test plan

  • ./infra/pre-commit.py --all-files --fix
  • pytest tests/transform/test_conversation.py (6 passed)
  • pytest lib/zephyr/tests/test_execution.py test_shuffle.py test_worker_group_race.py (59 passed)
  • pytest lib/levanter/tests/test_optimizer_linear_like.py test_optimizer_config.py test_scan_stack_optimizers.py test_namo.py test_eval.py test_grad_accum.py (54 passed)

Nightshift Scout and others added 3 commits April 24, 2026 11:11
…gger, dedupe branch

`load_dataset_with_backoff` stopped accepting a `logger` kwarg in be63d53
when retry_with_backoff was extracted to rigging, but the two call sites in
transform_conversation kept passing `logger=logger`. The kwarg was being
forwarded through `**dataset_kwargs` into `datasets.load_dataset`, where
`**config_kwargs` swallows it as a (nonsense) builder config option.

Also:
- Replace `logging.log(logging.WARNING, ...)` / `logging.info(...)` with
  the module-level `logger` already defined in the file.
- Collapse the if/else branch in `transform_row` whose two arms ran the
  identical `_normalize_tool_structures` list comprehension.
ScatterWriter was re-exported from execution.py for "external callers"
but had no external callers anywhere in the tree. ScatterReader had one
external caller (plan.run_stage) that is already in the same file as
another ScatterReader import from shuffle. Import it from shuffle
directly for consistency, drop both re-exports, and hoist the remaining
ListShard / MemChunk / _write_scatter import to the top of execution.py
(the late placement with noqa: E402 was unnecessary - shuffle does not
import from execution, so there is no cycle).
Drop three never-used helpers and their imports: levanter.shapes.conforms,
levanter.optim.util.hvp, and levanter.optim.util.tree_gaussian_like. Also
drop a duplicate ``new_total = self.total + total`` assignment in
RunningMean.add that was already computed a few lines above.
@claude-nightshift claude-nightshift Bot added agent-generated Created by automation/agent nightshift Automated nightshift fixes labels Apr 24, 2026
@claude-nightshift claude-nightshift Bot requested a review from rjpower April 24, 2026 11:15
@claude-nightshift claude-nightshift Bot enabled auto-merge (squash) April 24, 2026 11:15
@claude-nightshift claude-nightshift Bot merged commit 629a6cb into main Apr 24, 2026
38 checks passed
@claude-nightshift claude-nightshift Bot deleted the nightshift/cleanup-20260424 branch April 24, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-generated Created by automation/agent nightshift Automated nightshift fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant