Skip to content

runamica: min_dll and min_grad_norm written as %f, so AMICA's stopping rules never fire #680

Backlog

Description

@neuromechanist

At edf694c, runamica._write_param_file writes every float parameter with %f except minlrate and mineig. min_dll=1e-9 and min_grad_norm=1e-7 therefore reach the amica15 binary as 0.000000, so use_min_dll and use_grad_norm can never stop a run and every fit runs to max_iter. Fix: write both (and any other parameter that can be below 1e-6) in scientific format, as for minlrate and mineig, and add a test that reads the parameter file back.

Found while setting conservative AMICA convergence for NEMAR's nemar-ica (nemarOrg/nemar-process#81, epic nemarOrg/nemar-cli#2324). pAMICA receives the correct values; only the amica15 binary path is affected.

Activity

  1. claude commented on Nov 24, 2026

    @claude
    Contributor

    🤖 Plan:

    • Fetch issue and locate _write_param_file
    • Duplicate-work preflight
    • Verify current develop behavior
    • Open PR (not needed, already fixed)

    Research

    At edf694c, min_dll and min_grad_norm were in _INT_PARAMS, not written with %f. amica15 therefore read 0 for both, and the stop rules never fired. #637 (d0dea04, merged 2026-11-18, after edf694c) fixed this. It moved both keys to _SCI_PARAMS and added tests that read the file back, including a Fortran f15.12-style parse.

    Relevant code

    Proposed Fix

    No change needed. On current develop (6b8012c), no other nonzero default below 1e-5 goes through the %f fallback. NEMAR needs eegprep at d0dea04 or later. Recommend closing as fixed by #637.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions