> 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/update_benchmark_settings.md).

# update\_benchmark\_settings

`imerit_ango.sdk.SDK.`

## update\_benchmark\_settings(project\_id, benchmark\_enabled, benchmark\_ratio, benchmark\_cutoff)

Enables or disables benchmarking and updates benchmark allocation settings for a project.

{% hint style="info" %}
The API key must belong to a 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.
* **benchmark\_enabled:** bool
  * Enables or disables benchmarking for the project.
* **benchmark\_ratio:** int, *Optional, default None*
  * The percentage probability, from 0 to 100, that the next task allocated to a user will be a benchmark task.
  * If omitted, the project's existing benchmark ratio is unchanged.
* **benchmark\_cutoff:** bool, *Optional, default None*
  * When `True`, Ango Hub stops allocating benchmark tasks to users once the regular task queue is complete.
  * If omitted, the project's existing cutoff setting is unchanged.

{% hint style="warning" %}
Disabling benchmarking after benchmark tests have taken place deletes the project's existing benchmarking information. To pause benchmark allocation without disabling the feature, set `benchmark_ratio` to `0`.
{% 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 project.

<details open>

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

After successfully executing the `update_benchmark_settings` function, navigate to **Projects → \[Your Project] → Settings → General**.

* Confirm that **Enable Benchmark** matches `benchmark_enabled`.
* Confirm that the benchmark probability and **Stop Benchmark Tasks When the Queue Ends** settings match the values you provided.

{% 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

Enable benchmarking with a 10% allocation probability, and stop allocating benchmark tasks when the regular queue is complete:

{% 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.update_benchmark_settings(
    project_id=project_id,
    benchmark_enabled=True,
    benchmark_ratio=10,
    benchmark_cutoff=True
)
```

{% endtab %}

{% tab title="curl" %}

```bash
curl -X POST "https://imeritapi.ango.ai/v2/project/$PROJECT_ID" \
  -H "Content-Type: application/json" \
  -H "apikey: $ANGO_API_KEY" \
  -d '{
    "benchmarkEnabled": true,
    "benchmarkRatio": 10,
    "benchmarkCutoff": true
  }'
```

{% endtab %}
{% endtabs %}

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

[set\_tasks\_as\_benchmark](/sdk/sdk-documentation/project-level-sdk-functions/set_tasks_as_benchmark.md), [Benchmarks](/core-concepts/benchmarks.md)
{% endhint %}
