You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Static analysis (Pyright) flags real issues in validate_implementations.py:
run_fortran_amica is typed -> Dict but returns None on several early-exit
paths (binary missing, non-zero return code, timeout, exception). Callers
already handle this (compare_results(fortran_results: Optional[Dict], ...)),
so the annotation is just wrong. Fix: -> Optional[Dict].
Inside run_fortran_amica, import os and original_dir = os.getcwd() happen
inside the try: block; the except branches reference both, so Pyright
correctly flags them as possibly-unbound if the import itself ever failed.
Fix: hoist import os to the top-level imports and set original_dir before
the try:.
load_eeglab_data(..., dtype: np.dtype = np.float32) in pyAMICA/torch_impl/utils.py has a default value that does not match its own
annotation (np.float32 is a scalar type, not an np.dtype instance). Fix:
widen the annotation (e.g. npt.DTypeLike).
Verified NOT real bugs (false positives, no fix needed): the Import "torch" / Import "scipy.optimize" could not be resolved diagnostics are a Pyright/IDE
environment issue -- both import and run fine under uv run python -c "import torch, scipy". Leaving those as-is.
Activity
Back single-model Amari distance with a real test
Add Amari distance metric and Fortran/Apple-CPU perf rows (#120)