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

Update PyTorch 2.2.0, Scilpy 2.0.2, DWI_ML and adapt target SH order based on the training data. #40

Merged
merged 12 commits into from
May 29, 2024

Conversation

levje
Copy link
Contributor

@levje levje commented Apr 22, 2024

PyTorch update to 2.2.0

Didn't change anything except the install.sh file to download another PyTorch version and support different CUDA versions (w.r.t. PyTorch docs). Seems to works fine.

Scilpy 2.0.2

A few changes here and there to adapt with functions that were moved/removed from scilpy. Logic shouldn't have changed, I used the new functions as they are used in some scilpy scenarios/tests. Changing to scilpy 2.0.2 is useful since its wheel is available on Compute Canada.

DWI_ML

IMPORTANT: Waiting for scil-vital/dwi_ml#234 before merging. Might have to adapt the commit hash in the requirements.txt to refer to the main once that PR is merged.

Update of DWI_ML is useful because it now uses PyTorch 2.2.0 and Scilpy 2.0.2 which is needed for Compute Canada.

SH Order changes:

During training:

  • When loading the first subject to initialize the environment, use the input_volume from that subject to extract sh_order that the model will be trained on.
  • Save the sh_target_order to the hyperparameters.json file.
  • I adapted the default example model's hyperparameters.json file accordingly.

During tracking/testing (with ttl_track*):

  • Load the sh_target_order directly from the hyperparameters.json file. This way the networks are initialized with the input size corresponding to the one from the pretrained model.

Other:

  • Also removed self.interface_seeding = hyperparams['interface_seeding'] and self.add_neighborhood = hyperparams['add_neighborhood'] since they didn't seem to be used anymore and they caused issues when training/tracking.

@levje levje changed the title Adapt Target SH Order based on the training data. Update PyTorch 2.2.0, Scilpy 2.0.2, DWI_ML and adapt target SH rrder based on the training data. May 15, 2024
@levje levje changed the title Update PyTorch 2.2.0, Scilpy 2.0.2, DWI_ML and adapt target SH rrder based on the training data. Update PyTorch 2.2.0, Scilpy 2.0.2, DWI_ML and adapt target SH order based on the training data. May 15, 2024
requirements.txt Outdated Show resolved Hide resolved
requirements.txt Outdated Show resolved Hide resolved
@AntoineTheb
Copy link
Collaborator

Looks good ! I'll do a proper review once I'm back. Ideally, we would set the option added in this PR: scil-vital/dwi_ml#238 to False as I realised when profiling that cache clearing slows down tracking a lot. I'll try to finish this PR asap.

@levje
Copy link
Contributor Author

levje commented May 28, 2024

Checks will fail, but once the clearing cache PR in DWI-ML is merged, we should be good to merge that one if everything is ok. Also, make sure that the clearing_cache option is merged into the for_beluga_scilpy2 branch.

@AntoineTheb AntoineTheb merged commit 9b3b009 into scil-vital:main May 29, 2024
2 checks passed
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.

None yet

2 participants