From d467378a8cac7860443fc30b4ebecfae3fb344ce Mon Sep 17 00:00:00 2001 From: tmadlener Date: Wed, 12 Jun 2024 16:37:18 +0200 Subject: [PATCH 1/3] Add new MarlinMLFlavorTagging package --- packages/marlinmlflavortagging/package.py | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 packages/marlinmlflavortagging/package.py diff --git a/packages/marlinmlflavortagging/package.py b/packages/marlinmlflavortagging/package.py new file mode 100644 index 00000000..7d795385 --- /dev/null +++ b/packages/marlinmlflavortagging/package.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python3 + +from spack.pkg.k4.key4hep_stack import Ilcsoftpackage + + +class Marlinmlflavortagging(CMakePackage, Ilcsoftpackage): + """Package with processors for running deep ML based flavor taggers in Marlin.""" + + homepage = "https://gitlab.desy.de/ilcsoft/MarlinMLFlavorTagging" + git = "https://gitlab.desy.de/ilcsoft/MarlinMLFlavorTagging.git" + url = "https://gitlab.desy.de/ilcsoft/MarlinMLFlavorTagging" + + maintainers("tmadlener") + + version("main", branch="main") + + depends_on("aida") + depends_on("ilcutil") + depends_on("lcio@2.21:") + depends_on("lcfivertex") + depends_on("marlin@1.17: +aida") + depends_on("root") + depends_on("py-torch") + + def cmake_args(self): + return [f"-DCMAKE_CXX_STANDARD={self.spec['root'].variants['cxxstd'].value}"] + + def setup_run_environment(self, env): + env.prepend_path("MARLIN_DLL", self.libs.directories[0]) From 3f50e2c3b95dd3e628256f198535d2a00b3bf14a Mon Sep 17 00:00:00 2001 From: tmadlener Date: Wed, 12 Jun 2024 16:37:40 +0200 Subject: [PATCH 2/3] Add MarlinMLFlavorTagging to ilcsoft stack --- packages/ilcsoft/package.py | 1 + packages/marlinmlflavortagging/package.py | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/ilcsoft/package.py b/packages/ilcsoft/package.py index 24756d26..4c0c6310 100644 --- a/packages/ilcsoft/package.py +++ b/packages/ilcsoft/package.py @@ -76,6 +76,7 @@ class Ilcsoft(BundlePackage, Key4hepPackage): depends_on("marlinkinfitprocessors") depends_on("marlintrkprocessors") depends_on("marlintrk") + depends_on("marlinmlflavortagging") depends_on("overlay") depends_on("pandoraanalysis") depends_on("pandorapfa") diff --git a/packages/marlinmlflavortagging/package.py b/packages/marlinmlflavortagging/package.py index 7d795385..29da772e 100644 --- a/packages/marlinmlflavortagging/package.py +++ b/packages/marlinmlflavortagging/package.py @@ -22,8 +22,16 @@ class Marlinmlflavortagging(CMakePackage, Ilcsoftpackage): depends_on("root") depends_on("py-torch") + @property + def libs(self): + # Make the library that should go on MARLIN_DLL available via this + # property by explicitly finding it (also takes care of lib vs lib64) + return find_libraries( + "libMarlinMLFlavorTagging", root=self.prefix, recursive=True, shared=True + ) + def cmake_args(self): return [f"-DCMAKE_CXX_STANDARD={self.spec['root'].variants['cxxstd'].value}"] def setup_run_environment(self, env): - env.prepend_path("MARLIN_DLL", self.libs.directories[0]) + env.prepend_path("MARLIN_DLL", self.libs.libraries[0]) From ad034ac2c0e3db0e2f38f857a8474feb807fe148 Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Wed, 19 Jun 2024 14:25:47 +0200 Subject: [PATCH 3/3] Add marlinmlflavortagging to the nightlies --- scripts/fetch_nightly_versions.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/fetch_nightly_versions.py b/scripts/fetch_nightly_versions.py index 4d4fc078..dc1f9823 100755 --- a/scripts/fetch_nightly_versions.py +++ b/scripts/fetch_nightly_versions.py @@ -143,11 +143,12 @@ def get_latest_commit( ("lcfiplus", "lcfiplus/lcfiplus"), ("lcio", "ilcsoft/lcio"), ("lctuple", "ilcsoft/lctuple"), + ("marlin", "ilcsoft/marlin"), ("marlindd4hep", "ilcsoft/marlindd4hep"), ("marlinfastjet", "ilcsoft/marlinfastjet"), - ("marlin", "ilcsoft/marlin"), ("marlinkinfit", "ilcsoft/marlinkinfit"), ("marlinkinfitprocessors", "ilcsoft/marlinkinfitprocessors"), + ("marlinmlflavortagging", "ilcsoft/marlinmlflavortagging"), ("marlinreco", "ilcsoft/marlinreco"), ("marlintrk", "ilcsoft/marlintrk"), ("marlintrkprocessors", "ilcsoft/marlintrkprocessors"), @@ -163,7 +164,7 @@ def get_latest_commit( gitlab = False if package == "opendatadetector": gitlab = "https://gitlab.cern.ch/api/v4/projects/%s/repository/commits" - elif package == "ddfastshowerml": + elif package == "ddfastshowerml" or package == "marlinmlflavortagging": gitlab = "https://gitlab.desy.de/api/v4/projects/%s/repository/commits" commit = get_latest_commit(package, location, date=date, gitlab=gitlab) line = f"@{commit}"