Uploading Tasks
Updated at January 8th, 2025
The Sama Platform allows you to upload your task in an easy and intuitive way.
- First, navigate to your project Task Portal by clicking the Task tab.
- Once there, locate the button with a + icon. Clicking this button will open a window displaying the schema format and an upload section.
- In the upload section, you can upload your CSV or JSON file to create a new task.
- After uploading the file, click the Create button and wait for the confirmation message
- Once the task is successfully created, it will appear in the Tasks List.
Preparing files to upload tasks
In the platform, tasks are typically uploaded using CSV or JSON files. It is essential to ensure that the file is prepared correctly, containing all the required information for each input field.
🚧 Warning
Before you start preparing your file, make sure that all the assets that you need are stored in a place where we the latformcan find it. Ypu can read more about this here
If you would rather use the API to upload tasks, you can use the task creation endpoint
For each input, ensure you include exactly what is specified in the input schema: the input name and the corresponding content in the correct format.
Steps to Prepare a CSV File for Your Tasks:
1. Create a New CSV File
Use any application that supports CSV files, such as Microsoft Excel.
2. Set Up the Header Row
- In Row 1, create a header row containing the input names.
- To find the input names, refer to the Name field on the Inputs page.
- Enter the name of the first input in Cell A1, the second input in Cell B1, and so on.
- Ensure all required inputs are included in the file; optional inputs can be excluded if not needed.
3. Enter Task Data
- In Row 2 and subsequent rows, provide the required information for each input based on the
- Format field on the Inputs page.
- Common formats include:
- An integer
- A text string
- A date
- A URL pointing to an asset's location
4. Add Additional Tasks
- Use additional rows for each new task you want to upload.
5. Save the CSV File
- Ensure the file is saved in CSV format before uploading.
For each input, all you need to do is include exactly what's specified in the input schema — the input name, and then the contents of that input in the correct format.
Example CSV Structure:
A | B | |
---|---|---|
1 | Image | Name |
2 | https://sama-client-assets.s3.amazonaws.com/… | pexels‑gabriel‑4069787.jpg |
Preparing a JSON File for Your Tasks
If you prefer to upload tasks using a JSON file, you can follow a structured approach. To get started, refer to our JSON creation format recipes, which provide examples and guidelines to ensure your file meets the required schema.
Including model predictions
In the platform, you can upload tasks with model predictions. This can be useful in a variety of scenarios, such as when:
- An algorithm has already taken a first pass at annotating an image, and you want annotators to clean up those annotations.
- Tasks that were already annotated and delivered were found to have mistakes, and you want to upload them to a new project so they can be corrected.
- You would like to update a previous project with additional annotations.
📘 Note
These model predictions are sometimes also called "default answers", since they are included with the task by default when it's accessed by an annotator.
To include model predictions:
- Add another CSV column or JSON key called "output_NAMEOFOUTPUT", in which the word "output" is all lowercase, and the name of your output is written exactly as it appears on the platform.
👍 Tip
For workspace outputs (such as the Video output shown in the example below), the format of the annotation output will follow the schema format. To see an example of this format, you can make one annotation yourself, download the task as a CSV or JSON via the interface, and check how it's formatted there.
For example the top of your CSV file could resemble the following example:
A | B | C | D | |
---|---|---|---|---|
1 | Image | Name | output_Weather | output_Video |
2 | https://sama-client-assets… | pexels‑gabriel‑4069787.jpg | Rainy | {"layers":{"vector_tagging":[{"shapes":[{"tags":{"Object":"Vehicle1"},"type":"polygon","index":6,"points":[[2122,3821],...]}],"group_type":null}]}} |
Including task priorities
You can also include priority numbers for your new tasks to control the order in which they will be allocated to annotators.
To include task priority numbers:
- Add another CSV column called "_reserved_priority" or JSON key called “priority”.
- In the priority value for each task, enter a priority number in this column (if no priority number is provided for a task, it will be set to 0 by default).
The top of your completed CSV file could resemble the following example:
A | B | ||
---|---|---|---|
1 | Image | Name | _reserved_priority |
2 | https://sama-client-assets.s3.amazonaws.com/475/Demo-projects/vehicle_instance/pexels-gabriel-4069787.jpg | pexels‑gabriel‑4069787.jpg | 1 |
Reserving tasks for specific annotators
In your file, you can reserve tasks for a specific annotator (in Step A only). This can be helpful if an annotator specializes in certain types of annotations and you want to ensure that a particular task goes to them.
To reserve tasks for specific annotators:
- Add another CSV column called "_reserved_reserve_for" or JSON key called “reserve_for”.
- In the value for each task that you want to reserve, enter an annotator ID in this column.
The top of your completed CSV file could resemble the following example:
A | B | ||
---|---|---|---|
1 | Image | Name | _reserved_reserve_for |
2 | https://sama-client-assets.s3.amazonaws.com/475/Demo-projects/vehicle_instance/pexels-gabriel-4069787.jpg | pexels‑gabriel‑4069787.jpg | 11256 |
Submitting tasks on task creation
In your file, you can ask the system to submit the task immediately upon task creation. This can be helpful if you want to the newly created task to be sent to a later step in the workflow.
To reserve tasks for specific annotators:
- Add another CSV column called "_reserved_submit" or JSON key called “submit”.
- In the value for each task that you want to reserve, enter True or False.
Grouping tasks
In the upload file, you can group tasks together to ensure that similar tasks are all assigned to the same annotator. This will prevent multiple annotators from performing the same research to answer very similar tasks, which saves time and boosts the consistency and overall quality of the annotations. The example below shows how to add the Task Grouping ID to a CSV file but the process is nearly identical if you are using a JSON.
To group similar tasks together:
- Manually sort the rows in your CSV file so that similar tasks are next to each other. For example, you might want to sort tasks alphabetically by a certain input, such as Product Name.
- Add another column and give it any name that you choose (you will use this name when you create a corresponding input later in this procedure).
- In the row for each task that you want to reserve, enter a group number in this column (e.g. 1, 2, 3).
📘 Note
Group numbers are unique for every batch, so don't worry about having to use different numbers every time. For example, if you used the group numbers 1, 2, and 3 in two separate CSVs, the platform would not consider the 1s, 2s, or 3s from the different uploads to be part of the same group.
The top of your completed CSV file should resemble the following example:
A | B | ||
---|---|---|---|
1 | Image | Name | group_numbers |
2 | https://sama-client-assets.s3.amazonaws.com/475/Demo-projects/vehicle_instance/pexels-gabriel-4069787.jpg | pexels‑gabriel‑4069787.jpg | 1 |
3 | https://sama-client-assets.s3.amazonaws.com/475/Demo-projects/vehicle_instance/pexels-john-4069789.jpg | pexels‑john‑4069789.jpg | 1 |
- Go to the Inputs tab at Projects > [your project] > Settings > Inputs.
- Add a new input and give it the same name as you used for the group number column in your CSV.
- Check the Task Group ID box for the input.
- Click Create Input.
Once you upload your CSV, the tasks will be allocated to annotators in the groups that you defined. Tasks that are in a group will try to stay together as a group whenever possible (they're very loyal). For example:
- If an annotator clicks Stop Work in the middle of a group, the remaining tasks in that group will be allocated together to the next annotator who starts work.
- Rejected tasks from the same group will stay together when they are sent back to the annotator for rework.
- Tasks that are part of a group won't move Step A to Step B until all the tasks in the group have been completed.