mlreco.iotools.factories module

These factories instantiate torch.utils.data.DataLoader based on the YAML configuration that was provided.

mlreco.iotools.factories.dataset_factory(cfg, event_list=None)[source]

Instantiates dataset based on type specified in configuration under iotool.dataset.name. The name must match the name of a class under mlreco.iotools.datasets.

Note

Currently the choice is limited to LArCVDataset only.

mlreco.iotools.factories.loader_factory(cfg, event_list=None)[source]

Instantiates a DataLoader based on configuration.

Dataset comes from dataset_factory.

Parameters
  • cfg (dict) – Configuration dictionary. Expects a field iotool.

  • event_list (list, optional) – List of tree idx.

Returns

loader

Return type

torch.utils.data.DataLoader