Fix raw label loading for dotted paths - #6
Open
NimaAsh wants to merge 1 commit into
Open
Conversation
lukasugar
approved these changes
May 27, 2026
lukasugar
left a comment
Collaborator
There was a problem hiding this comment.
I suggest putting a comment in the code, that's all.
Thanks a lot!
| # source label is the label from the original dataset without any preprocessing | ||
| src_label_path = file.replace(get_data_path(), get_source_labels_path()).replace(".pt", "_label.nii.gz") | ||
| src_label_nii = read_file_to_nifti_or_np(src_label_path) | ||
| if src_label_path.endswith((".nii", ".nii.gz")): |
Collaborator
There was a problem hiding this comment.
Can you please put a comment in code explaining why this is added?
E.g. just "# read_file_to_nifti_or_np fails with dotted paths, e.g. /path/name.surmane/..., this is a quickfix
You explain it in the the PR description, but a comment would make it obvious for anyone looking at the code in the future
NimaAsh
force-pushed
the
nima/fix-raw-label-dot-path
branch
from
May 27, 2026 19:56
e43a3b7 to
d853b4a
Compare
Author
|
Yep, that was it. I had committed this from the cluster with a cluster email, so the CLA bot didn’t recognize me. I added the comment you requested, amended the commit with my GitHub email, and force-pushed the branch. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Segmentation test failed on cluster paths like /data/nima.ashjaee/... because read_file_to_nifti_or_np misparsed the extension. This loads .nii/.nii.gz raw labels directly with nibabel before falling back to gardening_tools