class

Logarithm::ConcurrentInferenceEngine

Inherits Reference < Object

Concurrent inference engine for model predictions.

This class provides concurrent model inference using a pool of workers to maximize throughput for anomaly detection.

Example usage:

engine = ConcurrentInferenceEngine.new(model, workers: 4)
engine.start

results = engine.predict_batch(log_vectors)

Constructors

new(model : AbstractModel, workers : Int32 = System.cpu_count)
Source

Instance methods

predict_batch(batch : Array(Tensor)) : Array(Float64)

Submit a batch for inference.

Source
predict_batches(batches : Array(Array(Tensor))) : Array(Array(Float64))

Submit multiple batches for concurrent processing.

Source
running?

Check if engine is running.

Source
start

Start the inference engine.

Source
stop

Stop the inference engine.

Source
workers
Source