Documentation Index
Fetch the complete documentation index at: https://docs.labelbox.com/llms.txt
Use this file to discover all available pages before exploring further.
Open In Colab
GitHub
Supported predictions
To upload predictions in Labelbox, you need to create a prediction payload. This section shows how to create a payload for each supported prediction type. Samples are show for the following supported supported payload formats:- Python annotation types (recommended)
- NDJSON
Entity (Message-based)
Classification: Radio (Single-choice)
Classification: Checklist (Multi-choice, Message-based)
Classification: Free-form text
Classification: Nested checklist (Message-based)
Classification: Nested radio
Example: Upload predictions to a model run
Here are the steps to upload predictions to a model run:Before you start
You must import these libraries to use the code examples in this section.API_KEY with a valid API key to connect to the Labelbox client.
Step 1: Import data rows
Upload your data rows to Catalog. To learn how to format your import JSON files, see Import conversation & model response data. Note the additionalmodelOutputs object required. For descriptions, see Model outputs object definitions.
Step 2: Create/select an ontology for your model predictions
Your model run should have the correct ontology set up with all the tools and classifications supported for your predictions. Here is an example of creating an ontology programmatically for all the example predictions above:Step 3: Create a model and a model run
Create a Model using the ontology and a model run.Step 4: Send data rows to the model run
Step 5: Create the predictions payload
Create the predictions payload using the snippets of code shown above. Labelbox supports two formats for the annotations payload: NDJSON and Python annotation types. Both approaches are described below with instructions to compose annotations into Labels attached to the data rows. The resultinglabel_ndjson and label_prediction payloads should have exactly the same prediction content.