We want to add a pretrained model of spinal cord segmentation for tutorials. There is already a repo for the dataset. The idea would be to add another repo containing the pretrained model that would be a submodule of the existing dataset. This way they are in different repos, but they are downloaded together, so only one download is required for the user.
@kousu or @Drulex Could you give us a hand with this :) Is this the cleanest way to do this?
It depends on a few things, but I think the general direction we want to go towards is the following:
git-annexIf the pre-trained model is only relevant for this project/tutorial it would make sense to track it in this repository. Using git-annex instead of a submodule makes more sense since it would need to be specifically downloaded by the user who wants to go through the tutorial, others won't download it by default when cloning the repo. (There was a lengthy discussion spread accross multiple issues, most of it can be found here: https://github.com/neuropoly/spinalcordtoolbox/issues/2788. In a nutshell it was decided that the git-annex method was preferred to the submodule method when dealing with models)
If there is a use case for having these pre-trained models used for other purposes, then perhaps it would make sense to have a separate git-annex repository with the pre-trained models.
@kousu please correct if I am wrong, I have been out of the loop the last few weeks.
@Drulex let me add a bit more context/specs:
We could, in principle, use the same repository for the data and the model, but my first thought was that it would be "cleaner" to have a specific repos for the data, and another one for the model, because they are two different entities. Then came the idea of a sub-module. I've never used them, so I'm not sure if this is an overkill or not, but I naively thought that we could configure a sub-module in a repos such that when a user installs a repos, the sub-module would come with it.
However, I am now realizing that the sub-module approach might not work with our current way of installing the data, which is to grab the zip package from the Github release. So maybe we should just forget about the whole sub-module thing and put the data + model together 馃槄
For now I can proceed this way; put the model with the tutorial's dataset. If we decide it is cleaner to have it in another repo, we can always move it.
Done in #399
Most helpful comment
@Drulex let me add a bit more context/specs:
We could, in principle, use the same repository for the data and the model, but my first thought was that it would be "cleaner" to have a specific repos for the data, and another one for the model, because they are two different entities. Then came the idea of a sub-module. I've never used them, so I'm not sure if this is an overkill or not, but I naively thought that we could configure a sub-module in a repos such that when a user installs a repos, the sub-module would come with it.
However, I am now realizing that the sub-module approach might not work with our current way of installing the data, which is to grab the zip package from the Github release. So maybe we should just forget about the whole sub-module thing and put the data + model together 馃槄