Input/Output Module
The spine.io module handles data ingress and egress for SPINE jobs. It
provides readers and writers for event data, parsers that translate raw
storage products into SPINE parser objects, and the dataset/collation tools
used during model training and inference.
Input/output tools for SPINE.
Readers and writers are storage-format adapters. Parsers convert source formats into framework-neutral parser products. Datasets, collation, augmentation, and sampling are generic data pipeline tools used by training and inference configurations.
Overview
The I/O layer is organized into a few cooperating pieces:
Readers expose event products from on-disk formats such as HDF5 and LArCV.
Writers persist flat outputs and staged cache products.
Parsers convert raw reader outputs into SPINE parser products used by downstream code.
Datasets and pipeline utilities bridge readers/parsers into PyTorch data loading workflows.
This is the first stage of the driver pipeline and the point where external detector data is mapped into SPINE’s internal data structures.
File Readers
|
Class which reads information stored in HDF5 files. |
|
Class which reads information stored in LArCV files. |
|
Read products stored under one or more stage groups in a cache file. |
File Writers
|
Writes data to an HDF5 file. |
|
Writes data to a CSV file with optimized performance. |
|
Write additive stage caches to one HDF5 file per source file. |
Datasets
The dataset layer bridges low-level readers and parser logic into PyTorch
Dataset objects. The staged cache workflow is exposed through the HDF5
dataset and the mixed LArCV/HDF5 dataset.
|
Torch dataset that parses LArCV entries into SPINE products. |
|
Torch dataset wrapper around flat or staged HDF5 readers. |
|
Torch dataset that merges aligned samples from LArCV and HDF5. |
Parsers
Parsers translate raw reader outputs into framework-neutral parser products. The HDF5 parser layer includes generic tensor, index, and object parsers for cached data products.
Shared parser base classes and input-data plumbing. |
|
Data structures used as canonical outputs of IO parsers. |
|
Module which contains functions used to clean up cluster data. |
|
Lightweight parsers for cached HDF5 tensor products. |
|
Lightweight parsers for cached HDF5 index products. |
|
Lightweight parsers for cached HDF5 object products. |
|
Module that contains parsers that do not fit in other categories. |
|
Module that contains all parsers related to LArCV sparse data. |
|
Module that contains all parsers related to LArCV cluster data. |
|
Module that contains all parsers related to LArCV particle data. |
Data Pipeline Utilities
Tools for dataset preparation, augmentation, collation, and sampling.
Contains implementations of data collation classes. |
|
Used to define which dataset entries to load at each iteration |
|
Data augmentation managers and modules. |
|
Module with methods to overlay multiple events. |
|
Functions that instantiate IO tools from configuration blocks. |