Aleph Alpha Evaluation Datasets API

Endpoints for handling evaluation datasets, which are specific datasets to be used for evaluation in the Pharia Studio SDK.

OpenAPI Specification

aleph-alpha-evaluation-datasets-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: PhariaStudio Evaluation Datasets API
  version: 0.1.0
  description: Endpoints for handling evaluation datasets, which are specific datasets to be used for evaluation in the Pharia Studio SDK.
servers:
- url: '{host}/v1/studio'
  variables:
    host:
      default: https://api.pharia.example.com
security:
- BearerAuth: []
tags:
- name: Evaluation Datasets
  description: Endpoints for handling evaluation datasets, which are specific datasets to be used for evaluation in the Pharia Studio SDK.
paths:
  /projects/{project_id}/evaluation/datasets:
    get:
      tags:
      - Evaluation Datasets
      summary: Get Many Datasets
      operationId: get_many_datasets_projects__project_id__evaluation_datasets_get
      parameters:
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Project Id
      - name: page
        in: query
        required: false
        schema:
          type: integer
          exclusiveMinimum: 0
          description: The page number to retrieve. Starts at 1.
          default: 1
          title: Page
        description: The page number to retrieve. Starts at 1.
      - name: size
        in: query
        required: false
        schema:
          type: integer
          maximum: 100
          exclusiveMinimum: 0
          description: The number of items per page.
          default: 25
          title: Size
        description: The number of items per page.
      - name: benchmarks
        in: query
        required: false
        schema:
          type: boolean
          description: If set, sets `associatedBenchmarks` on `Dataset` objects . Otherwise this is null.
          default: false
          title: Benchmarks
        description: If set, sets `associatedBenchmarks` on `Dataset` objects . Otherwise this is null.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedResponse_Dataset_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - Evaluation Datasets
      summary: Create Dataset
      operationId: create_dataset_projects__project_id__evaluation_datasets_post
      parameters:
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Project Id
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Body_create_dataset_projects__project_id__evaluation_datasets_post'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                type: string
                format: uuid
                title: Response Create Dataset Projects  Project Id  Evaluation Datasets Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /projects/{project_id}/evaluation/datasets/{dataset_id}:
    get:
      tags:
      - Evaluation Datasets
      summary: Get Dataset
      operationId: get_dataset_projects__project_id__evaluation_datasets__dataset_id__get
      parameters:
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Project Id
      - name: dataset_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Dataset Id
      - name: benchmarks
        in: query
        required: false
        schema:
          type: boolean
          description: If set, sets `associatedBenchmarks` on `Dataset` objects . Otherwise this is null.
          default: false
          title: Benchmarks
        description: If set, sets `associatedBenchmarks` on `Dataset` objects . Otherwise this is null.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Dataset'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Evaluation Datasets
      summary: Delete Dataset
      operationId: delete_dataset_projects__project_id__evaluation_datasets__dataset_id__delete
      parameters:
      - name: dataset_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Dataset Id
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Project Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
      - Evaluation Datasets
      summary: Update Dataset
      operationId: update_dataset_projects__project_id__evaluation_datasets__dataset_id__patch
      parameters:
      - name: dataset_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Dataset Id
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Project Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatasetMetadataUpdate'
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /projects/{project_id}/evaluation/datasets/{dataset_id}/datapoints:
    get:
      tags:
      - Evaluation Datasets
      summary: Get Dataset Datapoints
      operationId: get_dataset_datapoints_projects__project_id__evaluation_datasets__dataset_id__datapoints_get
      parameters:
      - name: dataset_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Dataset Id
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Project Id
      - name: page
        in: query
        required: false
        schema:
          type: integer
          exclusiveMinimum: 0
          description: The page number to retrieve. Starts at 1.
          default: 1
          title: Page
        description: The page number to retrieve. Starts at 1.
      - name: size
        in: query
        required: false
        schema:
          type: integer
          maximum: 100
          exclusiveMinimum: 0
          description: The number of items per page.
          default: 25
          title: Size
        description: The number of items per page.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedResponse_Example_JsonSerializable__JsonSerializable__'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /projects/{project_id}/evaluation/datasets/{dataset_id}/downloads:
    post:
      tags:
      - Evaluation Datasets
      summary: Create Dataset Download Link
      operationId: create_dataset_download_link_projects__project_id__evaluation_datasets__dataset_id__downloads_post
      parameters:
      - name: dataset_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Dataset Id
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Project Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DownloadLinkResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    DownloadLinkResponse:
      properties:
        downloadId:
          type: string
          title: Downloadid
        datasetVersion:
          type: string
          title: Datasetversion
        totalDatapoints:
          type: integer
          title: Totaldatapoints
        mediaType:
          type: string
          title: Mediatype
        url:
          type: string
          title: Url
        createdAt:
          type: string
          format: date-time
          title: Createdat
        expireAt:
          type: string
          format: date-time
          title: Expireat
      type: object
      required:
      - downloadId
      - datasetVersion
      - totalDatapoints
      - mediaType
      - url
      - createdAt
      - expireAt
      title: DownloadLinkResponse
      description: Response model for dataset download links.
    Dataset:
      properties:
        repositoryId:
          type: string
          title: Repositoryid
        datasetId:
          type: string
          title: Datasetid
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        labels:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Labels
        version:
          type: string
          title: Version
        totalDatapoints:
          type: integer
          title: Totaldatapoints
        metadata:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Metadata
        createdAt:
          type: string
          format: date-time
          title: Createdat
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
        associatedBenchmarks:
          anyOf:
          - items:
              $ref: '#/components/schemas/AssociatedBenchmark'
            type: array
          - type: 'null'
          title: Associatedbenchmarks
      additionalProperties: true
      type: object
      required:
      - repositoryId
      - datasetId
      - version
      - totalDatapoints
      - createdAt
      - updatedAt
      title: Dataset
      description: Studio API model for datasets.
    Body_create_dataset_projects__project_id__evaluation_datasets_post:
      properties:
        source_data:
          type: string
          contentMediaType: application/octet-stream
          title: Source Data
          description: File to upload. This needs to be in jsonl format.
        name:
          type: string
          title: Name
        total_datapoints:
          type: integer
          title: Total Datapoints
        metadata:
          anyOf:
          - type: string
          - type: 'null'
          title: Metadata
          description: 'The format needs to be a valid dictionary parsed as a string. E.g., "{''a'': ''b''}".'
        labels:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Labels
      type: object
      required:
      - source_data
      - name
      - total_datapoints
      title: Body_create_dataset_projects__project_id__evaluation_datasets_post
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    DatasetMetadataUpdate:
      properties:
        labels:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Labels
        metadata:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Metadata
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        totalDatapoints:
          anyOf:
          - type: integer
          - type: 'null'
          title: Totaldatapoints
      type: object
      title: DatasetMetadataUpdate
      description: Model for updating dataset metadata.
    AssociatedBenchmark:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
      type: object
      required:
      - id
      - name
      title: AssociatedBenchmark
      description: Benchmark associated with a dataset.
    Example_JsonSerializable_JsonSerializable_:
      properties:
        input:
          $ref: '#/components/schemas/JsonSerializable-Output'
        expected_output:
          $ref: '#/components/schemas/JsonSerializable-Output'
        id:
          type: string
          title: Id
        metadata:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/JsonSerializable-Output'
            type: object
          - type: 'null'
          title: Metadata
      type: object
      required:
      - input
      - expected_output
      title: Example[JsonSerializable, JsonSerializable]
    PagedResponse_Example_JsonSerializable__JsonSerializable__:
      properties:
        total:
          type: integer
          title: Total
        page:
          type: integer
          title: Page
        size:
          type: integer
          title: Size
        num_pages:
          type: integer
          title: Num Pages
        items:
          items:
            $ref: '#/components/schemas/Example_JsonSerializable_JsonSerializable_'
          type: array
          title: Items
          default: []
      type: object
      required:
      - total
      - page
      - size
      - num_pages
      title: PagedResponse[Example[JsonSerializable, JsonSerializable]]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    JsonSerializable-Output:
      anyOf:
      - type: integer
      - type: number
      - type: string
      - type: boolean
      - items:
          $ref: '#/components/schemas/JsonSerializable-Output'
        type: array
      - additionalProperties:
          $ref: '#/components/schemas/JsonSerializable-Output'
        type: object
      - type: 'null'
    PagedResponse_Dataset_:
      properties:
        total:
          type: integer
          title: Total
        page:
          type: integer
          title: Page
        size:
          type: integer
          title: Size
        num_pages:
          type: integer
          title: Num Pages
        items:
          items:
            $ref: '#/components/schemas/Dataset'
          type: array
          title: Items
          default: []
      type: object
      required:
      - total
      - page
      - size
      - num_pages
      title: PagedResponse[Dataset]
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT