dasf.ml.inference.loader.base

Classes

BaseLoader

BaseLoader for DL models. When running in a Dask Cluster instantiates a model per worker that will be reused on every subsequent prediction task.

Module Contents

class dasf.ml.inference.loader.base.BaseLoader[source]

BaseLoader for DL models. When running in a Dask Cluster instantiates a model per worker that will be reused on every subsequent prediction task.

model_instances
abstract inference(model, data)[source]
abstract load_model()[source]

Load Model method is specific for each framework/model.

load_model_distributed(**kwargs)[source]

Distributed model instantiation

_lazy_load(**kwargs)[source]
_load(**kwargs)[source]
_lazy_load_cpu(**kwargs)[source]
_lazy_load_gpu(**kwargs)[source]
_load_cpu(**kwargs)[source]
_load_gpu(**kwargs)[source]
load(**kwargs)[source]
predict(data)[source]

Predict method called on prediction tasks.

preprocessing(data)[source]

Preprocessing stage which is called before inference

postprocessing(data)[source]

Postprocessing stage which is called after inference