---
title: pydo.genai.cancel_model_evaluation_run()
description: Cancel Model Evaluation Run
product: Reference
url: https://docs.digitalocean.com/reference/pydo/reference/genai/cancel_model_evaluation_run/
last_updated: "2026-08-03"
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# pydo.genai.cancel_model_evaluation_run()

Generated on 3 Aug 2026 from `pydo` version [`v0.40.0`](https://github.com/digitalocean/pydo/releases/tag/v0.40.0v0.40.0)

## Usage

```python
client.genai.cancel_model_evaluation_run(
    eval_run_uuid="\"123e4567-e89b-12d3-a456-426614174000\"",
    body={
        "eval_run_uuid": "\"12345678-1234-1234-1234-123456789012\"",
    },
)
```

Returns `JSON`Raises `HttpResponseError`

## Description

To cancel an in-progress model evaluation run, send a PUT request to [`/v2/gen-ai/model_evaluation_runs/{eval_run_uuid}/cancel`](https://docs.digitalocean.com/reference/api/reference/gradientai-platform/index.html.md#genai_cancel_model_evaluation_run).

## Parameters

`eval_run_uuid` string required

UUID of the model evaluation run to cancel. Returned by `CreateModelEvaluationRun`
and listed via `ListModelEvaluationRuns`. The run must be in a non-terminal status
(queued, running_dataset, or evaluating_results); already-terminal runs return an
error.

`eval_run_uuid` string optional

Example: `"12345678-1234-1234-1234-123456789012"`

UUID of the model evaluation run to cancel. Returned by `CreateModelEvaluationRun`
and listed via `ListModelEvaluationRuns`. The run must be in a non-terminal status
(queued, running_dataset, or evaluating_results); already-terminal runs return an
error.

## Request Sample

## Show Request Sample

```python
import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

req = {
  "eval_run_uuid": "\"12345678-1234-1234-1234-123456789012\""
}

resp = client.genai.cancel_model_evaluation_run(eval_run_uuid="\"123e4567-e89b-12d3-a456-426614174000\"", body=req)
```

## Response Example

## Show Response Example

```json
{
  "run": {
    "candidate_model_name": "example name",
    "candidate_model_source": "CANDIDATE_MODEL_SOURCE_SERVERLESS",
    "candidate_model_uuid": "123e4567-e89b-12d3-a456-426614174000",
    "created_at": "2023-01-01T00:00:00Z",
    "dataset_name": "example name",
    "dataset_uuid": "123e4567-e89b-12d3-a456-426614174000",
    "eval_run_uuid": "123e4567-e89b-12d3-a456-426614174000",
    "judge_model_name": "example name",
    "judge_model_uuid": "123e4567-e89b-12d3-a456-426614174000",
    "name": "example name",
    "progress": {
      "candidate_rows_evaluated": 100,
      "judge_rows_evaluated": 95,
      "total_rows": 100
    },
    "status": "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED"
  }
}
```

## More Information

See [`/v2/gen-ai/model_evaluation_runs/{eval_run_uuid}/cancel`](https://docs.digitalocean.com/reference/api/reference/gradientai-platform/index.html.md#genai_cancel_model_evaluation_run) in the API reference for additional detail on responses, headers, parameters, and more.