icecube.ml_suite.i3 module

class icecube.ml_suite.i3.EventFeatureExtractorModule(context)

Bases: I3ConditionalModule

Builds an EventFeatureExtractor from a config file and applies to P frames.

Parameters:

event_feature_extractor_config – str Path to yaml file

Configure()
Finish((I3ConditionalModule)arg1) None :
C++ signature :

void Finish(PythonModule<I3ConditionalModule> {lvalue})

Physics((I3ConditionalModule)arg1, (I3Frame)arg2) None :
C++ signature :

void Physics(PythonModule<I3ConditionalModule> {lvalue},boost::shared_ptr<I3Frame>)

class icecube.ml_suite.i3.ModelWrapper(context)

Bases: I3ConditionalModule

General Model Wrapper.

This is an I3Module wrapper around a provided machine learning model that uses ML Suite features. The passed model must be callable and return the prediction as a tensor of shape [n_batch, n_predictions]. The results are written to the I3Frame.

Configure()

Configure module.

Finish()

Run prediciton on last incomplete batch of events.

If there are still frames left in the frame buffer there is an incomplete batch of events, that still needs to be passed through. This method will run the prediction on the incomplete batch and then write the results to the physics frame. All frames in the frame buffer will be pushed.

Process()

Process incoming frames.

Pop frames and put them in the frame buffer. When a physics frame is popped, accumulate the input data to form a batch of events. Once a full batch of physics events is accumulated, perform the prediction and push the buffered frames. The Physics method can then write the results to the physics frame by using the results:

self._y_pred_batch
self._runtime_prediction, self._runtime_preprocess_batch

and the current event index self._batch_event_index

class icecube.ml_suite.i3.ONNXInferenceWrapper(context)

Bases: ModelWrapper

ONNX Inference Wrapper.

This is an I3Module wrapper around a provided machine learning model that uses ML Suite features. The passed model must be callable and return the prediction as a tensor of shape [n_batch, n_predictions]. The results are written to the I3Frame.

Configure()

Configure module.

class icecube.ml_suite.i3.TFModelWrapper(context)

Bases: ModelWrapper

Tensorflow Model Wrapper.

This is an I3Module wrapper around a provided tensorflow/keras model/ concrete tf.function. The passed NN model or function must implement a __call__ method which outputs the NN prediction as a tensor of shape [n_batch, n_predictions]. The results are written to the I3Frame.

class icecube.ml_suite.i3.TritonInferenceWrapper(context)

Bases: ModelWrapper

Triton Inference Wrapper.

This is an I3Module wrapper around a provided machine learning model that uses ML Suite features. The passed model must be callable and return the prediction as a tensor of shape [n_batch, n_predictions]. The results are written to the I3Frame.

Configure()

Configure module.