apache_beam.ml.inference.base module¶
An extensible run inference transform.
Users of this module can extend the ModelLoader class for any MLframework. Then pass their extended ModelLoader object into RunInference to create a RunInference Beam transform for that framework.
The transform will handle standard inference functionality like metric collection, sharing model between threads and batching elements.
Note: This module is still actively being developed and users should have no expectation that these interfaces will not change.
-
class
apache_beam.ml.inference.base.InferenceRunner[source]¶ Bases:
objectImplements running inferences for a framework.
-
class
apache_beam.ml.inference.base.ModelLoader[source]¶ Bases:
typing.GenericHas the ability to load an ML model.
-
class
apache_beam.ml.inference.base.RunInference(model_loader: apache_beam.ml.inference.base.ModelLoader, clock=None)[source]¶ Bases:
apache_beam.transforms.ptransform.PTransformAn extensible transform for running inferences.