-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Exa.TrkX abstract pipeline & metric hook (#2392)
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): ```python 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 ```
- Loading branch information
1 parent
241c1e1
commit 5e57328
Showing
11 changed files
with
579 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.