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

feat: Exa.TrkX abstract pipeline & metric hook #2392

Merged

Conversation

benjaminhuth
Copy link
Member

@benjaminhuth benjaminhuth commented Aug 23, 2023

This Does the following:

  • Abstracts the Exa.TrkX pipeline from the examples algorithm to the plugin. Exposes the pipeline to python, so it is possible to run and test the pipeline without the examples framework (e.g., directly with *.pyg or *.csv files):
spacepoints = list(np.random.uniform((100,3)).flatten())
spacepointIDs = list(np.arange(100))

pipeline = acts.examples.Pipeline(emb, [flt,gnn], trk, acts.logging.VERBOSE)
pipeline.run(spacepoints, spacepointIDs)
  • Adds a interface for a pipeline hook, that is invoked after each stage with nodes and edges as arguments.
  • Adds a implementation of the hook that prints the edge-based metrics of the graph with respect to the truth graph
  • Extends the examples algorithm so it can generate the truth graph and a metric-hook:
08:52:52    EdgeClassifi   VERBOSE   Memory (used / total) [in MB]: 22155.4 / 40377.2
08:52:52    MetricsHook    INFO      Metrics for total graph:
08:52:52    MetricsHook    INFO      Efficiency=0.579324, purity=0.319214
08:52:52    MetricsHook    INFO      Metrics for target graph (pT > 0.5 GeV, nHits >= 3):
08:52:52    MetricsHook    INFO      Efficiency=0.968275, purity=0.138659
08:52:52    EdgeClassifi   DEBUG     Start edge classification

@github-actions github-actions bot added the Component - Plugins Affects one or more Plugins label Aug 23, 2023
@benjaminhuth benjaminhuth force-pushed the refactor/exatrkx-abstract-pipeline branch from 3020136 to 28bb5bb Compare August 23, 2023 09:40
@github-actions github-actions bot added Component - Examples Affects the Examples module Track Finding labels Aug 23, 2023
@benjaminhuth benjaminhuth added this to the next milestone Aug 23, 2023
@codecov
Copy link

codecov bot commented Aug 23, 2023

Codecov Report

Merging #2392 (6e11e17) into main (ed0bb27) will decrease coverage by 0.02%.
Report is 1 commits behind head on main.
The diff coverage is 63.15%.

@@            Coverage Diff             @@
##             main    #2392      +/-   ##
==========================================
- Coverage   49.69%   49.68%   -0.02%     
==========================================
  Files         454      454              
  Lines       25796    25799       +3     
  Branches    11850    11849       -1     
==========================================
- Hits        12820    12818       -2     
- Misses       4575     4580       +5     
  Partials     8401     8401              
Files Changed Coverage Δ
...nclude/Acts/Vertexing/AdaptiveGridTrackDensity.hpp 100.00% <ø> (ø)
...nclude/Acts/Vertexing/GaussianGridTrackDensity.hpp 100.00% <ø> (ø)
...nclude/Acts/Vertexing/AdaptiveGridTrackDensity.ipp 61.15% <56.81%> (-1.26%) ⬇️
...nclude/Acts/Vertexing/GaussianGridTrackDensity.ipp 66.40% <84.61%> (-1.54%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@benjaminhuth benjaminhuth marked this pull request as ready for review August 24, 2023 13:52
@benjaminhuth
Copy link
Member Author

@xju2 This implements part of the things we discussed some time ago at CERN.

@benjaminhuth benjaminhuth changed the title refactor: Exa.TrkX abstract pipeline & metric hook feat: Exa.TrkX abstract pipeline & metric hook Aug 25, 2023
@paulgessinger paulgessinger self-requested a review August 28, 2023 08:16
Copy link
Member

@paulgessinger paulgessinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's a few comments on the naming and the interface specification for these pipeline hooks.

Just to make sure the idea: the non-examples-FW python bindings are still delivered via the examples build. But the idea is that you can launch this without running the examples sequence by calling this pipeline infrastructure directly?

Plugins/ExaTrkX/include/Acts/Plugins/ExaTrkX/Pipeline.hpp Outdated Show resolved Hide resolved
Plugins/ExaTrkX/include/Acts/Plugins/ExaTrkX/Pipeline.hpp Outdated Show resolved Hide resolved
Plugins/ExaTrkX/src/Pipeline.cpp Outdated Show resolved Hide resolved
@benjaminhuth
Copy link
Member Author

Just to make sure the idea: the non-examples-FW python bindings are still delivered via the examples build. But the idea is that you can launch this without running the examples sequence by calling this pipeline infrastructure directly?

Yes, since we don't have pure core bindings, I think thats the only possible way, right? This allows testing the pipeline and the hook directly with e.g. the training data, which is quite useful for me.

@kodiakhq kodiakhq bot merged commit 5e57328 into acts-project:main Aug 30, 2023
55 of 56 checks passed
@paulgessinger paulgessinger modified the milestones: next, v29.1.0 Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component - Examples Affects the Examples module Component - Plugins Affects one or more Plugins Track Finding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants