> For the complete documentation index, see [llms.txt](https://docs.imerit.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.imerit.net/sdk/sdk-documentation/project-level-sdk-functions/set_tasks_as_benchmark.md).

# set\_tasks\_as\_benchmark

`imerit_ango.sdk.SDK.`

## set\_tasks\_as\_benchmark(project\_id, task\_ids, is\_benchmark)

Marks or unmarks one or more existing project tasks as benchmarks.

{% hint style="info" %}
The API key must belong to a project lead or project manager for the project.
{% endhint %}

### Parameters

* **project\_id:** string
  * The unique identifier for the project. You can find the project ID in [the user interface](/sdk/sdk-documentation.md#project-ids) or retrieve it using the [`list_projects`](/sdk/sdk-documentation/project-level-sdk-functions/list_projects.md) function.
* **task\_ids:** List\[string]
  * The unique identifiers of the tasks to mark or unmark. You can find task IDs in [the user interface](/sdk/sdk-documentation.md#task-and-asset-ids) or retrieve them using the [`get_tasks`](/sdk/sdk-documentation/project-level-sdk-functions/get_tasks.md) function.
  * All tasks must belong to the project identified by `project_id`.
* **is\_benchmark:** bool, *Optional, default True*
  * Set to `True` to mark the tasks as benchmarks.
  * Set to `False` to remove their benchmark status.

{% hint style="info" %}
To include the marked tasks in benchmark allocation, enable benchmarking for the project. For information about how benchmark tasks work and which annotation types are supported, see [Benchmarks](/core-concepts/benchmarks.md).
{% endhint %}

Returns:

* **output:** dict
  * A dictionary containing the result of the operation.
  * Includes a `status` field indicating whether the request was successful and a `data` field containing the updated benchmark status, the number of tasks changed, and their task IDs.

<details open>

<summary><strong>How to verify in Ango Hub?</strong></summary>

After successfully executing the `set_tasks_as_benchmark` function, navigate to **Projects → \[Your Project] → Tasks**.

* Tasks marked as benchmarks display a yellow crown in the task list.
* Tasks that have been unmarked no longer display the crown.

{% hint style="info" %}
Changes made via the SDK are reflected in Ango Hub in near real-time. If updates are not immediately visible, please refresh the page.
{% endhint %}

</details>

### Example

Mark tasks as benchmarks:

{% tabs %}
{% tab title="python" %}

```python
import os
from dotenv import load_dotenv
from imerit_ango.sdk import SDK

load_dotenv('variables.env')
api_key = os.getenv('API_KEY')
project_id = os.getenv('PROJECT_ID')

ango_sdk = SDK(api_key)

response = ango_sdk.set_tasks_as_benchmark(
    project_id=project_id,
    task_ids=["<TASK ID 1>", "<TASK ID 2>"]
)
```

{% endtab %}

{% tab title="curl" %}

```bash
curl -X POST "https://imeritapi.ango.ai/v2/project/$PROJECT_ID/benchmark-tasks" \
  -H "Content-Type: application/json" \
  -H "apikey: $ANGO_API_KEY" \
  -d '{
    "tasks": ["<TASK ID 1>", "<TASK ID 2>"],
    "isBenchmark": true
  }'
```

{% endtab %}
{% endtabs %}

Remove benchmark status from tasks:

```python
response = ango_sdk.set_tasks_as_benchmark(
    project_id=project_id,
    task_ids=["<TASK ID 1>", "<TASK ID 2>"],
    is_benchmark=False
)
```

{% hint style="info" %}
**See also**

[update\_benchmark\_settings](/sdk/sdk-documentation/project-level-sdk-functions/update_benchmark_settings.md), [get\_tasks](/sdk/sdk-documentation/project-level-sdk-functions/get_tasks.md), [Benchmarks](/core-concepts/benchmarks.md)
{% endhint %}
