Skip to content

Conversation

@oesteban
Copy link
Member

@oesteban oesteban commented Jun 8, 2025

Brings improvements in parallelization management from #142, so they are kept even if we finally decided against #142.

In particular, it opens up the implementation to set the step feature of DTI models.

It also extends the base data object with two convenience properties for retrieving the 3D shape of the data and the number of voxels per volume.

X-References: #142.

@oesteban oesteban requested a review from jhlegarreta June 8, 2025 07:59
@oesteban oesteban force-pushed the enh/improve-parallel-treatment branch from 48c3453 to d513d05 Compare June 8, 2025 08:04
Brings improvements in parallelization management from #142, so they are
kept even if we finally decided against #142.

In particular, it opens up the implementation to set the ``step``
feature of DTI models.

It also extends the base data object with two convenience properties for
retrieving the 3D shape of the data and the number of voxels per volume.

X-References: #142.
@codecov
Copy link

codecov bot commented Jun 8, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 18 lines in your changes missing coverage. Please review.

Project coverage is 70.69%. Comparing base (d16c97c) to head (d513d05).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
src/nifreeze/model/dmri.py 16.66% 10 Missing ⚠️
src/nifreeze/estimator.py 55.55% 7 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #157      +/-   ##
==========================================
+ Coverage   70.10%   70.69%   +0.58%     
==========================================
  Files          23       23              
  Lines        1067     1126      +59     
  Branches      129      135       +6     
==========================================
+ Hits          748      796      +48     
- Misses        275      284       +9     
- Partials       44       46       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@jhlegarreta jhlegarreta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of in-line comments to be addressed in separate PRs if we believe they make sense: I prefer to have this merged to move forward.

def size3d(self):
"""Get the number of voxels in the 3D volume."""
return np.prod(self.dataobj.shape[:3])

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like better volume_shape and volume_size for the properties, but I prefer to have this merged and change them at a latter stage if we agree on better naming.


print(f"Dataset size: {num_voxels}x{len(dataset)}.")
print(f"Parallel execution: {fit_pred_kwargs}.")
print(f"Model: {model}.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that having proper logging instead of using print statements will be required in the mid-term.

@jhlegarreta jhlegarreta merged commit 12ce777 into main Jun 8, 2025
14 of 15 checks passed
@jhlegarreta jhlegarreta deleted the enh/improve-parallel-treatment branch June 8, 2025 14:15
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.

3 participants