Skip to main content
For traditional ML systems (tabular classification, tabular regression, and other non-LLM models), there is no LLM call to wrap, so the @trace decorator and provider wrappers used in Instrument your code do not apply. Instead, you publish your model’s predictions directly to an inference pipeline. You can do this in two ways — pick the one that matches how your system runs:
  • Stream predictions as they happen (online serving, one request at a time).
  • Batch upload predictions periodically (a scheduled scoring job, or a backfill).
Both paths use the same typed configuration that describes how your columns map to Openlayer’s semantics. The config class depends on your project’s task type.
Prerequisites:

Define the config for your task type

Import the config class matching your project’s task type from openlayer.types.inference_pipelines.data_stream_params:
The keys in your streamed rows (or the columns of your batch DataFrame) must exactly match the *_column_name values declared in the config.
For tabular classification, send class_names, feature_names, and categorical_feature_names together — the server requires all three even though the SDK type hints mark only class_names as required. Pass categorical_feature_names=[] when your model has no categorical features; omitting it returns a 400 ... not valid under any of the given schemas.

Option A — Stream predictions as they happen

Use client.inference_pipelines.data.stream(...) to publish one or a few rows per call, right after your model scores a request:
Python

Option B — Upload predictions in batches

For a scheduled scoring job or a backfill, score a whole DataFrame and upload it at once with upload_batch_inferences:
Python

Add ground truth later

When the true labels/targets arrive after you have already published predictions, patch them in by correlating on the inference_id you set above:
Python
See Update production data for more on delayed ground truth, and Upload a reference dataset to add a baseline for data-drift tests.