Skip to content

Conversation

@jhlegarreta
Copy link
Contributor

Generalize bvals and uptake value iterators into a single iterator that is able to traverse the values in ascending or descending order depending on whether it is provided a list of b-values (DWI) or uptake values (PET).

Follow-up to commit a1310e6.

Fixes #230.

@jhlegarreta jhlegarreta force-pushed the ref/generalize-bvals-uptake-iterator branch from dddcb4d to f916627 Compare November 1, 2025 07:54
@jhlegarreta
Copy link
Contributor Author

jhlegarreta commented Nov 1, 2025

Sorry I cannot make heads or tails of the error:

 traceback_args=("No such file or directory '['/tmp/tmpn3qawmpk/ants-000030GenericAffine.mat']' for output
 'reverse_forward_transforms' of a Registration interface\nAn exception of type FileNotFoundError occurred
 while running interface Registration.",), version='2.5.4')

(...)

  E       traits.trait_errors.TraitError: Each element of the 'reverse_forward_transforms' trait of a
 RegistrationOutputSpec instance must be a pathlike object or string representing an existing file,
 but a value of '/tmp/tmpn3qawmpk/ants-000030GenericAffine.mat' <class 'str'> was specified.

(...)

  FAILED test/test_estimator.py::test_estimator_init_model_string - FileNotFoundError: 
No such file or directory '['/tmp/tmpn3qawmpk/ants-000030GenericAffine.mat']' for 
output 'reverse_forward_transforms' of a Registration interface

main has started failing since yesterday as well with the same error:
https://github.com/nipreps/nifreeze/actions/runs/18957141877/job/54136495795
vs last successful execution after a PR had been merged:
https://github.com/nipreps/nifreeze/actions/runs/18956164364/job/54133423410

We have not made changes to any components related to the transforms, nitransforms remains pinned and the nipype version used has remained the same across the above builds. The only notable difference I can see is that ITK 5.4.4 is being installed along with ANTs instead of ITK 5.4.0.

The PR immediately preceding the failure succeeded with ITK 5.4.0:
https://github.com/nipreps/nifreeze/actions/runs/18956874170/job/54135672434

The only thing I can think of is some race condition deleting the file when the ANTs interface requires it.

@jhlegarreta
Copy link
Contributor Author

jhlegarreta commented Nov 2, 2025

One thing that changes across failures is the name or iteration of the registration at which the test fails: e.g. in
https://github.com/nipreps/nifreeze/actions/runs/19015003699/job/54301569041?pr=307#step:11:2930
it is

FileNotFoundError: No such file or directory '['/tmp/tmp3qaz544y/ants-000020GenericAffine.mat']' for
output 'reverse_forward_transforms' of a Registration interface

@jhlegarreta jhlegarreta force-pushed the ref/generalize-bvals-uptake-iterator branch 2 times, most recently from 18e0493 to 8c72aef Compare November 2, 2025 18:05
Generalize bvals and uptake value iterators into a single iterator that
is able to traverse the values in ascending or descending order
depending on whether it is provided a list of b-values (DWI) or uptake
values (PET).

Follow-up to commit a1310e6.
@jhlegarreta jhlegarreta force-pushed the ref/generalize-bvals-uptake-iterator branch from 8c72aef to 54931d6 Compare November 2, 2025 18:23
@oesteban
Copy link
Member

oesteban commented Nov 3, 2025

ITK 5.4.4 is being installed along with ANTs instead of ITK 5.4.0.

Indeed, it looks like ANTs is on the same version. That's ver weird.

One thing that changes across failures is the name or iteration of the registration at which the test fails

This makes sense if we are using the random iterator without a seed (which we are possibly doing?) We should fix a seed so that we iterate the dataset consistently across builds.

If we are setting a seed, the seeding may not be properly working.

@jhlegarreta
Copy link
Contributor Author

This makes sense if we are using the random iterator without a seed (which we are possibly doing?) We should fix a seed so that we iterate the dataset consistently across builds.

If we are setting a seed, the seeding may not be properly working.

The seed is fixed by the default value of the fixture. Have checked that the values of the data and iterator indices are the same across runs.

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.

Generalize the linear iterator to handle data other than DWI data

2 participants