Skip to content

Closes #132.#134

Open
mgflast wants to merge 2 commits into
warpem:mainfrom
mgflast:skip-nonfinite-alignment-xmls
Open

Closes #132.#134
mgflast wants to merge 2 commits into
warpem:mainfrom
mgflast:skip-nonfinite-alignment-xmls

Conversation

@mgflast

@mgflast mgflast commented Jul 7, 2026

Copy link
Copy Markdown

A tilt-series XML can carry NaN/Inf alignment values when an upstream alignment (AreTomo, patch-tracking) fails without being flagged. This shouldn't ever happen but sometimes it does - it did for me in 1 out of 55 datasets. _validate_tilt_series_dimensions doesn't catch this, so the NaN propagates into the training loss whenever the corrupted tilt series is sampled.

This PR adds a check for NaNs during the initialization stage of training. It scans every XML, moves any tilt-series with corrupted alignments into <training_directory>/excluded_nonfinite_alignment/, and prints how many were skipped and how many remain (raising only if none remain). Every step re-globs training_directory/*.xml, so moving the offenders out leaves them out everywhere (training and the alignment step).

mgflast and others added 2 commits July 7, 2026 17:37
A tilt-series XML can carry NaN/Inf alignment values when an upstream alignment
(AreTomo, patch-tracking) fails without being flagged. This shouldn't ever happen but sometimes it does - it did for me in 1 out of 55 datasets. `_validate_tilt_series_dimensions` doesn't catch this, so the NaN propagates into the training loss whenever the corrupted tilt series is sampled.

This PR adds a check for NaNs during the initialization stage of training. It scans every XML, moves any tilt-series with corrupted alignments into
`<training_directory>/excluded_nonfinite_alignment/`, and prints how many were skipped and
how many remain (raising only if none remain). Every step re-globs `training_directory/*.xml`,
so moving the offenders out leaves them out everywhere (training and the alignment step).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Updated the installation command for torch-projectors to use the default index URL.
@McHaillet

Copy link
Copy Markdown
Collaborator

Thanks for the PR! Can you also add the check to the infer.py script?

(commit was needed to get the tests running)

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