Skip to content

Add CMake configuration to download the models

Thomas Madlener requested to merge auto-download-models into main

Add the necessary CMake configuration to download models (BIBAE only at the time) during the build process. These models will also be installed into <prefix>/share/DDML/models.

The model files need to be stored in /eos/project/k/key4hep/www/key4hep/MLFastShowerModels and will be downloaded via CMakes ExternalData module. As part of the build process, they will be downloaded and copied back to the models directory (from where they will also be installed). This makes these changes as transparent as possible, i.e. everything should still work the same as before.

Adding a new model consists of (see also the models/README.md)

  • Uploading the file to EOS and creating a symlink with the md5sum of the file as name (ln -s <file> $(md5sum <file> | awk '{print $1}')
  • Creating a file <file>.md5 in the models directory where the content is the md5sum from step 1 (i.e. the symlink name)
  • Adding <file> to the models list at the top of models/CMakeLists.txt

@frank.gaede @peter.mckeown The main questions currently are:

  • Are we happy with putting the model binaries into the key4hep eos space? (I am not entirely sure, but I would assume that only a limited amount of people has write access to that.) In the end it doesn't matter too much, we would just have to adjust the URL template for downloading.
  • Should the models be installed?
  • Do we want to download all the models dynamically?
  • Should the default value for DOWNLOAD_MODELS be OFF?
Edited by Thomas Madlener

Merge request reports

Loading