> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gp.scale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Dry-run a custom-function evaluation task

> Dry-run a custom-function evaluation task against sample rows to validate it before creating an evaluation.

Runs the task's Python scoring function over each row in ``sample_data`` (1-10 rows) and returns
a per-row result — ``success`` with the returned ``result`` or an ``error`` — plus the resolved
function name and parameters, so a broken function or misconfigured task is caught before it is
used in a real evaluation. Nothing is persisted and no evaluation is created; results are returned
inline.

Only the ``custom_function`` task type is supported; any other ``task_type`` returns 400. The
``configuration`` must be a valid custom-function config: a Python ``function_source`` (up to
10,000 characters), an optional ``arg_mapping`` of function parameters to ``item.`` locators
(auto-derived from the function signature when omitted), and optional literal ``config_args``. An
invalid configuration or a function that fails to load returns 400; exceeding the dry-run's total
time budget returns 408 with whatever rows completed. When two-plane evaluations are enabled for
the account the request is proxied to the eval service's control plane.



## OpenAPI

````yaml https://api.sgp.scale.com/openapi-versions/v5/openapi.json post /v5/evaluations/tasks/dry-run
openapi: 3.1.0
info:
  title: EGP API V5
  description: >-
    This is the parent API for all EGP APIs. If you are looking for the EGP API,
    please go to https://api.egp.scale.com/docs.
  contact:
    name: Scale Generative AI Platform
    url: https://scale.com/genai-platform
  version: 0.1.0
servers:
  - url: https://api.egp.scale.com
security: []
paths:
  /v5/evaluations/tasks/dry-run:
    post:
      tags:
        - Evaluations
      summary: Dry-run a custom-function evaluation task
      description: >-
        Dry-run a custom-function evaluation task against sample rows to
        validate it before creating an evaluation.


        Runs the task's Python scoring function over each row in ``sample_data``
        (1-10 rows) and returns

        a per-row result — ``success`` with the returned ``result`` or an
        ``error`` — plus the resolved

        function name and parameters, so a broken function or misconfigured task
        is caught before it is

        used in a real evaluation. Nothing is persisted and no evaluation is
        created; results are returned

        inline.


        Only the ``custom_function`` task type is supported; any other
        ``task_type`` returns 400. The

        ``configuration`` must be a valid custom-function config: a Python
        ``function_source`` (up to

        10,000 characters), an optional ``arg_mapping`` of function parameters
        to ``item.`` locators

        (auto-derived from the function signature when omitted), and optional
        literal ``config_args``. An

        invalid configuration or a function that fails to load returns 400;
        exceeding the dry-run's total

        time budget returns 408 with whatever rows completed. When two-plane
        evaluations are enabled for

        the account the request is proxied to the eval service's control plane.
      operationId: POST-V5-/v5/evaluations/tasks/dry-run
      parameters:
        - name: x-selected-account-id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Account ID Header
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskDryRunRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskDryRunResponse'
        '408':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskDryRunTimeoutResponse'
          description: Request Timeout
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    TaskDryRunRequest:
      properties:
        task_type:
          $ref: '#/components/schemas/EvaluationTaskType'
          description: The type of evaluation task to dry-run.
        configuration:
          additionalProperties: true
          type: object
          title: Configuration
          description: Task-type-specific configuration. Validated per task_type.
        sample_data:
          items:
            additionalProperties: true
            type: object
          type: array
          maxItems: 10
          minItems: 1
          title: Sample Data
          description: Sample data rows to test the task against.
      type: object
      required:
        - task_type
        - configuration
        - sample_data
      title: TaskDryRunRequest
    TaskDryRunResponse:
      properties:
        task_type:
          $ref: '#/components/schemas/EvaluationTaskType'
        info:
          additionalProperties: true
          type: object
          title: Info
          description: Task-type-specific metadata (e.g. function_name, parameters).
        results:
          items:
            $ref: '#/components/schemas/TaskDryRunRowResult'
          type: array
          title: Results
      type: object
      required:
        - task_type
        - results
      title: TaskDryRunResponse
    TaskDryRunTimeoutResponse:
      properties:
        message:
          type: string
          title: Message
        completed_results:
          items:
            $ref: '#/components/schemas/TaskDryRunRowResult'
          type: array
          title: Completed Results
      type: object
      required:
        - message
        - completed_results
      title: TaskDryRunTimeoutResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    EvaluationTaskType:
      type: string
      enum:
        - chat_completion
        - inference
        - application_variant
        - agentex_output
        - metric
        - auto_evaluation.question
        - auto_evaluation.guided_decoding
        - auto_evaluation.agent
        - contributor_evaluation.question
        - contributor_audit
        - custom_function
      title: EvaluationTaskType
    TaskDryRunRowResult:
      properties:
        row_index:
          type: integer
          title: Row Index
        success:
          type: boolean
          title: Success
        result:
          title: Result
        error:
          title: Error
          type: string
      type: object
      required:
        - row_index
        - success
      title: TaskDryRunRowResult
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          title: Error Type
          type: string
        input:
          title: Input
        ctx:
          type: object
          title: Context
          additionalProperties: true
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````