Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Set length to 1 when np.squeeze returns a 0D array #3713

Merged
merged 4 commits into from
Mar 17, 2025

Conversation

man-shu
Copy link
Contributor

@man-shu man-shu commented Feb 11, 2025

Summary

Fixes #3712 .

List of changes proposed in this PR (pull-request)

  • try getting the len of idxs
  • if it fails with TypeError (which happens when idxs is a 0D array)
  • set nels to 1

@effigies
Copy link
Member

@man-shu I'm not sure if this code actually gets tested by our tests. If you're testing on your end, please make sure that it works in cases where it was previously failing.

Copy link

codecov bot commented Feb 11, 2025

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 50.84%. Comparing base (fe20d45) to head (12f7023).

Files with missing lines Patch % Lines
nipype/algorithms/misc.py 0.00% 3 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (fe20d45) and HEAD (12f7023). Click for more details.

HEAD has 21 uploads less than BASE
Flag BASE (fe20d45) HEAD (12f7023)
22 1
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #3713       +/-   ##
===========================================
- Coverage   73.07%   50.84%   -22.23%     
===========================================
  Files        1278     1278               
  Lines       59406    59367       -39     
===========================================
- Hits        43411    30187    -13224     
- Misses      15995    29180    +13185     

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

@man-shu
Copy link
Contributor Author

man-shu commented Feb 11, 2025

@man-shu I'm not sure if this code actually gets tested by our tests. If you're testing on your end, please make sure that it works in cases where it was previously failing.

Ok will update you on that.

@effigies
Copy link
Member

@man-shu Have you had a chance to test this?

@man-shu
Copy link
Contributor Author

man-shu commented Feb 21, 2025

Sorry not yet! Our HPC has been down since the day I opened this PR. Our IT dept is telling us that it should be ok by next week, so I hope to get back to you then.

(I tried copying the original nipype cache locally and then run it, but then it just started a fresh run because the checksum didn't match.)

@man-shu
Copy link
Contributor Author

man-shu commented Mar 17, 2025

Hello @effigies ! I finally ran the full pipeline with and without this fix and both of them worked.
So I don't think either of them were hitting this case.

I do not have access to the cache for the failing run either.

Do you have any suggestions on how to proceed from here?

@effigies
Copy link
Member

Just need to eyeball it, then.

It still looks right to me after a few weeks, so let's merge.

@effigies effigies merged commit 13228e8 into nipy:master Mar 17, 2025
1 check passed
effigies added a commit that referenced this pull request Mar 19, 2025
1.10.0 (March 19, 2025)

New feature release in the 1.10.x series.

This release adds GPUs to multiprocess resource management.
In general, no changes to existing code should be required if the GPU-enabled
interface has a ``use_gpu`` input.
The ``n_gpu_procs`` can be used to set the number of GPU processes that may
be run in parallel, which will override the default of GPUs identified by
``nvidia-smi``, or 1 if no GPUs are detected.

* FIX: Reimplement ``gpu_count()`` (#3718)
* FIX: Avoid 0D array in ``algorithms.misc.merge_rois`` (#3713)
* FIX: Allow nipype.sphinx.ext.apidoc Config to work with Sphinx 8.2.1+ (#3716)
* FIX: Resolve crashes when running workflows with updatehash=True (#3709)
* ENH: Support for gpu queue (#3642)
* ENH: Update to .wci.yml (#3708)
* ENH: Add Workflow Community Initiative (WCI) descriptor (#3608)
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.

[BUG] Merging rois outputs from bedpostx_parallel fails
2 participants