Skip to content

Allow module map inference with hard cuts

Daniel Thomas Murnane requested to merge dmurnane_modulemap_hardcuts into dev

Currently, the module map stage is inconsistent with the rest of acorn in its use of hard cuts: it ignores them. This means that in the example (which should be an easy-to-run toy) and the CI/CD pipeline (which struggles with full events on the gitlab runner's limited CPU memory), the module map hard cuts do nothing.

This MR fixes that.

  • It adds a handle_hard_node_cuts_pandas method, which trims a csv dataframe down to match the pyg event.
  • It also adds a simple conversion function in module map to map hit IDs to the index of the hits (since with hard cuts, the two are not the same).
  • It is tested with both example 1 and example 2. Works well.
  • It fuses the previously separate metric learning and module map dataloaders into a single EventLoader for graph construction.
  • It removes the previous choice of using either csv and/or pyg, to now only making the use of csv optional. This turned out to make the hard cut code simpler, and there was no reason to make the use of pyg optional, since both classes use it. In the future, this will make it easier to get rid of the csv approach entirely.
Edited by Daniel Thomas Murnane

Merge request reports