Skip to content

Delete dead compass-search code path in delay_io_train #35

Description

@dantzert

delay_io_train was refactored so the default optimizer is bayesian (with scipy.optimize methods via the else branch). The original compass-search tuning loop was never removed.

In modpods/train.py, after the first results[num_transforms] = {...} + early-stopping check, there is an unconditional continue. That continue makes everything after it unreachable, in particular:

  • the for iterations in range(0, max_iter): compass-search candidate loop (sooner/later/shape_up/shape_down/scaled_up/scaled_down/rounder/sharper),
  • the second final_model = SINDY_delays_MI(...) + results[num_transforms] = {...} + early-stopping block.

So compass search is already deprecated/dead code (see also the merged #20), never invoked by any test, and it duplicates the final_model/results logic above the continue.

Proposal: delete the unreachable block (keep the continue as normal loop iteration; remove the dead compass tuning loop and the duplicate second final_model/results/early-stop).

  • Cost: Low (no reachable behavior changes; tests only use bayesian/de/da/scipy).
  • Benefit: High (removes ~400 LOC / ~half of delay_io_train; removes contradictory duplicate logic). A cleanup follow-up to the closed make modpods as small as possible  #18 monolith split.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions