Skip to content

Conversation

jhlegarreta
Copy link
Contributor

Test that the estimator iterates correctly over the volumes: check that for a dummy DWI model and the different iterators, the transform written by the estimator takes the index dictated by the iterator at issue.

@jhlegarreta jhlegarreta force-pushed the tst/test-estimator-iterates-correctly branch from e33632f to be50c14 Compare October 1, 2025 23:25
@jhlegarreta
Copy link
Contributor Author

Demonstrates a bug for the "bvalue" iterator: since it is a kwarg for the iterator at issue, and even if we would be providing it, the estimator's run method requires some further logic to distinguish the kwargs it requires for other things,

# Prepare iterator
iterfunc = getattr(iterators, f"{self._strategy}_iterator")
index_iter = iterfunc(len(dataset), seed=kwargs.get("seed", None))

e.g.

seed = kwargs.pop("seed", None)
index_iter = iterfunc(len(dataset), seed=seed, **kwargs)

Will not not work because kwargs is used further down

kwargs["num_threads"] = n_threads
kwargs = self._align_kwargs | kwargs

So this will become even worse after #238 if the bug does not get fixed.

@jhlegarreta jhlegarreta force-pushed the tst/test-estimator-iterates-correctly branch 5 times, most recently from 8e5a824 to 74dca94 Compare October 6, 2025 11:01
@jhlegarreta jhlegarreta force-pushed the tst/test-estimator-iterates-correctly branch 2 times, most recently from 0136d69 to 58b0056 Compare October 9, 2025 21:13
Test that the estimator iterates correctly over the volumes: check that
for a dummy DWI model and the different iterators, the transform written
by the estimator takes the index dictated by the iterator at issue.
@jhlegarreta jhlegarreta force-pushed the tst/test-estimator-iterates-correctly branch from 58b0056 to 778e9f5 Compare October 9, 2025 21:25
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.

1 participant