Method: ModelFox::Model#enqueue_log_prediction

Defined in:
lib/modelfox/modelfox.rb

#enqueue_log_prediction(identifier:, input:, output:, options: nil) ⇒ Object

Add a prediction event to the queue. Remember to call ‘flush_log_queue` at a later point to send the event to the app.

Parameters:

  • identifier (String, Number)

    This is a unique identifier for the prediction, which will associate it with a true value event and allow you to look it up in the app.

  • input (Hash{String, Symbol => String, Number})

    A single ‘PredictInput`.

  • output (PredictOutput)

    A single ‘PredictOutput`.

  • options (PredictOptions) (defaults to: nil)

    This is the same ‘predictOptions` value that you passed to `predict`.



307
308
309
310
311
312
313
314
315
# File 'lib/modelfox/modelfox.rb', line 307

def enqueue_log_prediction(identifier:, input:, output:, options: nil)
  event = prediction_event(
    identifier: identifier,
    input: input,
    output: output,
    options: options
  )
  log_queue.push(event)
end