Skip to content

Commit

Permalink
Merge branch 'main' into fatras
Browse files Browse the repository at this point in the history
  • Loading branch information
asalzburger authored Dec 16, 2024
2 parents 27e46a8 + 9a2b74d commit 2872d74
Show file tree
Hide file tree
Showing 241 changed files with 6,689 additions and 2,913 deletions.
81 changes: 3 additions & 78 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,51 +38,6 @@ jobs:
- name: Run pre-commit
run: pre-commit run --all-files --show-diff-on-failure

license:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Check
run: >
sudo apt-get install -y git
&& CI/check_license.py . --exclude "*thirdparty/*"
include_guards:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Check
run: >
CI/check_include_guards.py . --fail-global --exclude "*thirdparty/*"
pragma_once:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check
run: >
CI/check_pragma_once.sh
type_t:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Check
run: >
CI/check_type_t.py . --exclude "thirdparty/*"
boost_test_macro:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check
run: >
CI/check_boost_test_macro.sh
smearing_config:
runs-on: ubuntu-latest
steps:
Expand All @@ -93,39 +48,7 @@ jobs:
- name: Check
run: >
CI/check_smearing_config.py .
cmake_options:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Check
run: >
docs/parse_cmake_options.py CMakeLists.txt --write docs/getting_started.md --verify
spelling:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install codespell
run: >
pip install codespell==2.2.5
- name: Check
run: >
CI/check_spelling
math_macros:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Check
run: >
CI/check_math_macros.py . --exclude "thirdparty/*"
missing_includes:
runs-on: ubuntu-latest
steps:
Expand All @@ -136,6 +59,7 @@ jobs:
- name: Check
run: >
CI/missing_include_check.sh
fpe_masks:
runs-on: ubuntu-latest
steps:
Expand All @@ -149,6 +73,7 @@ jobs:
- name: Check
run: >
CI/check_fpe_masks.py --token ${{ secrets.GITHUB_TOKEN }}
unused_files:
runs-on: ubuntu-latest
steps:
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ genConf
x86_64-slc6-gcc48-opt
x86_64-slc6-gcc49-opt
.*
build*
/build*
.asetup.save

#json output
Expand All @@ -30,7 +30,7 @@ build*

# dont ignore hidden configs
!.clang-format
!.github/**
!.github
!.gitignore
!.gitlab-ci.yml
!.clang-tidy
Expand Down
70 changes: 43 additions & 27 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,33 +142,49 @@ build_exatrkx:
- cmake --build build -- -j6
- ccache -s

# test_exatrkx_unittests:
# stage: test
# needs:
# - build_exatrkx
# image: ghcr.io/acts-project/ubuntu2204_exatrkx:63
# tags:
# - docker-gpu-nvidia
# script:
# - ctest --test-dir build -R ExaTrkX
#
# test_exatrkx_python:
# stage: test
# needs:
# - build_exatrkx
# image: ghcr.io/acts-project/ubuntu2204_exatrkx:63
# tags:
# - docker-gpu-nvidia
# script:
# - apt-get update -y
# - apt-get install -y python3 libxxhash0
# - source build/this_acts_withdeps.sh
# - git clone $CLONE_URL src
# - cd src
# - git checkout $HEAD_SHA
# - pip3 install -r Examples/Python/tests/requirements.txt
# - nvidia-smi
# - pytest -rFsv -k test_exatrkx
test_exatrkx_unittests:
stage: test
needs:
- build_exatrkx
image: ghcr.io/acts-project/ubuntu2204_exatrkx:63
variables:
DEPENDENCY_URL: https://acts.web.cern.ch/ACTS/ci/ubuntu-22.04/deps.$DEPENDENCY_TAG.tar.zst
tags:
- docker-gpu-nvidia
script:

- apt-get update -y
- git clone $CLONE_URL src
- cd src
- git checkout $HEAD_SHA
- source CI/dependencies.sh
- cd ..
- ctest --test-dir build -R ExaTrkX

test_exatrkx_python:
stage: test
needs:
- build_exatrkx
image: ghcr.io/acts-project/ubuntu2204_exatrkx:63
variables:
DEPENDENCY_URL: https://acts.web.cern.ch/ACTS/ci/ubuntu-22.04/deps.$DEPENDENCY_TAG.tar.zst
tags:
- docker-gpu-nvidia
script:
- apt-get update -y
- git clone $CLONE_URL src
- cd src
- git checkout $HEAD_SHA
- nvidia-smi
- source CI/dependencies.sh
- source ../build/this_acts_withdeps.sh
- python3 -m pip install -r Examples/Python/tests/requirements.txt
- echo $PYTHONPATH
- which python3
- python3 --version
- python3 -c "import acts"
- pytest -rFsv -k torch --collect-only
- pytest -rFsv -k gpu-torch # For now only test torch GPU pipeline

build_linux_ubuntu:
stage: build
Expand Down
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ repos:
- id: codespell
args: [
"-S", "*.ipynb,*.onnx,_build,*.svg",
"-I", "./CI/codespell_ignore.txt"
"-I", "./CI/codespell_ignore.txt",
"-w"
]
exclude: ^CI/.*$

Expand Down
2 changes: 0 additions & 2 deletions CI/codespell_ignore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ coner
dthe
iself
sortings
fime
gaus
te
parm
writet
localy
lastr
digitial
exprot
pring
aline
Expand Down
9 changes: 9 additions & 0 deletions CI/physmon/phys_perf_mon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,15 @@ function trackfinding() {
$path/performance_finding_ckf_ambi.html \
$path/performance_finding_ckf_ambi
fi

if [ -f $refdir/$path/performance_finding_ckf_ml_solver.root ]; then
run_histcmp \
$outdir/data/$path/performance_finding_ckf_ml_solver.root \
$refdir/$path/performance_finding_ckf_ml_solver.root \
"ML Ambisolver | ${name}" \
$path/performance_finding_ckf_ml_solver.html \
$path/performance_finding_ckf_ml_solver
fi
}

function vertexing() {
Expand Down
4 changes: 3 additions & 1 deletion CI/physmon/physmon_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ def makeSetup() -> PhysmonSetup:
level=acts.logging.INFO,
)

detector, trackingGeometry, decorators = getOpenDataDetector(matDeco)
detector = getOpenDataDetector(matDeco)
trackingGeometry = detector.trackingGeometry()
decorators = detector.contextDecorators()
setup = PhysmonSetup(
detector=detector,
trackingGeometry=trackingGeometry,
Expand Down
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion CI/physmon/workflows/physmon_trackfinding_1muon.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def run_ckf_tracking(label, seeding):
rnd=rnd,
postSelectParticles=ParticleSelectorConfig(
pt=(0.9 * u.GeV, None),
measurements=(9, None),
hits=(9, None),
removeNeutral=True,
),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
rnd=rnd,
postSelectParticles=ParticleSelectorConfig(
pt=(0.9 * u.GeV, None),
measurements=(9, None),
hits=(9, None),
removeNeutral=True,
),
)
Expand Down
32 changes: 30 additions & 2 deletions CI/physmon/workflows/physmon_trackfinding_ttbar_pu200.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
CkfConfig,
addCKFTracks,
addAmbiguityResolution,
addAmbiguityResolutionML,
AmbiguityResolutionConfig,
AmbiguityResolutionMLConfig,
addVertexFitting,
VertexFinder,
TrackSelectorConfig,
Expand All @@ -33,9 +35,10 @@


with tempfile.TemporaryDirectory() as temp:
# Running with a single thread to avoid rance conditions with Pythia8, see https://github.com/acts-project/acts/issues/3963
s = acts.examples.Sequencer(
events=3,
numThreads=-1,
numThreads=1, # run with single thread
logLevel=acts.logging.INFO,
)

Expand Down Expand Up @@ -69,7 +72,7 @@
),
postSelectParticles=ParticleSelectorConfig(
pt=(0.5 * u.GeV, None),
measurements=(9, None),
hits=(9, None),
removeNeutral=True,
),
)
Expand Down Expand Up @@ -134,13 +137,25 @@
outputDirRoot=tp,
)

addAmbiguityResolutionML(
s,
AmbiguityResolutionMLConfig(
maximumSharedHits=3, maximumIterations=1000000, nMeasurementsMin=6
),
tracks="ckf_tracks",
outputDirRoot=tp,
onnxModelFile=Path(__file__).resolve().parent.parent.parent.parent
/ "thirdparty/OpenDataDetector/data/duplicateClassifier.onnx",
)

addAmbiguityResolution(
s,
AmbiguityResolutionConfig(
maximumSharedHits=3,
maximumIterations=100000,
nMeasurementsMin=6,
),
tracks="ckf_tracks",
outputDirRoot=tp,
)

Expand Down Expand Up @@ -187,6 +202,17 @@
tp / "performance_fitting_ambi.root",
tp / "performance_fitting_ckf_ambi.root",
)

shutil.move(
tp / "performance_finding_ambiML.root",
tp / "performance_finding_ckf_ml_solver.root",
)

shutil.move(
tp / "performance_fitting_ambiML.root",
tp / "performance_fitting_ckf_ml_solver.root",
)

for vertexing in ["amvf_gauss_notime", "amvf_grid_time"]:
shutil.move(
tp / f"{vertexing}/performance_vertexing.root",
Expand All @@ -200,6 +226,8 @@
"performance_fitting_ckf.root",
"performance_finding_ckf_ambi.root",
"performance_fitting_ckf_ambi.root",
"performance_finding_ckf_ml_solver.root",
"performance_fitting_ckf_ml_solver.root",
"performance_vertexing_amvf_gauss_notime.root",
"performance_vertexing_amvf_grid_time.root",
]:
Expand Down
Loading

0 comments on commit 2872d74

Please sign in to comment.