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

Add a new MarlinMLFlavorTagging package #602

Merged
merged 3 commits into from
Jun 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/ilcsoft/package.py
Original file line number Diff line number Diff line change
@@ -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")
37 changes: 37 additions & 0 deletions packages/marlinmlflavortagging/package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/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")

@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.libraries[0])
5 changes: 3 additions & 2 deletions scripts/fetch_nightly_versions.py
Original file line number Diff line number Diff line change
@@ -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}"
Loading