Let’s take a look at how this works by using an e-commerce dataset. First, import the data and setup the graph.
import data & setup graph
Single-Entity Inference
Run inference for a single entity:single-entity
Multi-Entity Inference (≤ 1,000 Entities)
Score multiple specific entities in a single call:multi-entity
Batch Prediction (Full Dataset or Large Batches)
Batch prediction allows scoring all entities. The SDK automatically handles batching and retries.batch-prediction
- batch_size=“max”: automatically uses the largest valid batch size
- num_retries: retry count for transient failures