Ivadomed: Tutorials: make available a pre-trained model to use at inference time

Created on 21 Aug 2020  路  5Comments  路  Source: ivadomed/ivadomed

For both cascaded_architecture.rst and uncertainty.rst.

See comment.

Most helpful comment

@Drulex let me add a bit more context/specs:

  • The dataset in question is not very large (~450MB), so it is fine to keep it under Github. Introducing git-annex here will come with additional burden: users will don't know how to install git-annex, they will select the wrong version, blablabla --> we don't want to have to deal with these issues.
  • The model is only a few MBs
  • This dataset + model are only used for tutorial purpose

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 馃槄

All 5 comments

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:

  • Large datasets should be version controlled using git-annex
  • Re-usable datasets should be in their own repositories

If 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:

  • The dataset in question is not very large (~450MB), so it is fine to keep it under Github. Introducing git-annex here will come with additional burden: users will don't know how to install git-annex, they will select the wrong version, blablabla --> we don't want to have to deal with these issues.
  • The model is only a few MBs
  • This dataset + model are only used for tutorial purpose

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mariehbourget picture mariehbourget  路  3Comments

jcohenadad picture jcohenadad  路  4Comments

andreanne-lemay picture andreanne-lemay  路  4Comments

charleygros picture charleygros  路  3Comments

mariehbourget picture mariehbourget  路  4Comments