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

# Get Training Session



## OpenAPI

````yaml https://api.truestate.io/openapi.json get /pipelines/{pipeline_id}/runs/{run_id}/training/{job_name}/
openapi: 3.1.0
info:
  title: TrueState Backend API
  summary: >-
    TrueState is an AI platform for business users to create high-impact AI
    solutions.
  description: >

    This **[TrueState](https://www.truestate.io/)** backend API allows our
    clients to automate and more powerfully retrieve and modify data from the
    TrueState platform.


    Example use cases include:


    - Accessing embeddings for a dataset.

    - Automating the process of dataset creation and model retraining as your
    data changes.

    - Much more.


    Our backend is built using the [FastAPI](https://fastapi.tiangolo.com/)
    framework in python

    using [Auth0](https://auth0.com/) and [Client API
    Keys](https://www.truestate.io/dawn/docs) for internal an external
    authentication, respectively.

    Our backend is designed to be secure, scalable, easy to use and well
    documented _(each router with its own linked docs page)_.

    Clients can only access data from their own organisation, as setup in Auth0
    our the Client API Keys. See how
    **[here](https://www.truestate.io/dawn/docs)**.


    **PS**: You can view this API documentation in either
    **[Swagger](swagger/docs)** or **[Redoc](redoc/)**, but only the swagger
    lets you test calls.
  contact:
    name: True State Support
    url: https://www.truestate.io/dawn/docs
    email: support@truestate.io
  license:
    name: Private
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 0.13.95
servers: []
security: []
paths:
  /pipelines/{pipeline_id}/runs/{run_id}/training/{job_name}/:
    get:
      tags:
        - training-checkpoints
      summary: Get Training Session
      operationId: >-
        get_training_session_pipelines__pipeline_id__runs__run_id__training__job_name___get
      parameters:
        - name: pipeline_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Pipeline Id
        - name: run_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Run Id
        - name: job_name
          in: path
          required: true
          schema:
            type: string
            title: Job Name
        - name: Api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Api-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrainingSessionRead'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    TrainingSessionRead:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        pipeline_run_id:
          type: string
          format: uuid
          title: Pipeline Run Id
        pipeline_step_id:
          type: string
          format: uuid
          title: Pipeline Step Id
        model_version_id:
          type: string
          format: uuid
          title: Model Version Id
        job_name:
          type: string
          title: Job Name
        state:
          $ref: '#/components/schemas/TrainingSessionState'
        current_segment:
          type: integer
          title: Current Segment
        resumed_from_checkpoint_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Resumed From Checkpoint Id
        resume_restored_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Resume Restored At
        warm_started_from_checkpoint_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Warm Started From Checkpoint Id
        warm_start_restored_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Warm Start Restored At
        last_command_sequence:
          type: integer
          title: Last Command Sequence
        cleanup_status:
          $ref: '#/components/schemas/TrainingCheckpointCleanupStatus'
        cleanup_attempts:
          type: integer
          title: Cleanup Attempts
        cleanup_error:
          anyOf:
            - type: string
            - type: 'null'
          title: Cleanup Error
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        checkpoints:
          items:
            $ref: '#/components/schemas/TrainingCheckpointRead'
          type: array
          title: Checkpoints
        commands:
          items:
            $ref: '#/components/schemas/TrainingControlCommandRead'
          type: array
          title: Commands
      type: object
      required:
        - id
        - pipeline_run_id
        - pipeline_step_id
        - model_version_id
        - job_name
        - state
        - current_segment
        - last_command_sequence
        - cleanup_status
        - cleanup_attempts
        - created_at
        - updated_at
      title: TrainingSessionRead
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TrainingSessionState:
      type: string
      enum:
        - pending
        - running
        - paused
        - completed
        - failed
        - cancelled
      title: TrainingSessionState
    TrainingCheckpointCleanupStatus:
      type: string
      enum:
        - not_required
        - pending
        - in_progress
        - retained
        - completed
        - failed
      title: TrainingCheckpointCleanupStatus
    TrainingCheckpointRead:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        format:
          $ref: '#/components/schemas/TrainingCheckpointFormat'
        status:
          $ref: '#/components/schemas/TrainingCheckpointStatus'
        epoch:
          type: integer
          title: Epoch
        global_step:
          type: integer
          title: Global Step
        segment:
          type: integer
          title: Segment
        metrics:
          additionalProperties: true
          type: object
          title: Metrics
        primary_metric:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Primary Metric
        is_active:
          type: boolean
          title: Is Active
          default: false
        state_sha256:
          anyOf:
            - type: string
            - type: 'null'
          title: State Sha256
        state_size_bytes:
          anyOf:
            - type: integer
            - type: 'null'
          title: State Size Bytes
        created_at:
          type: string
          format: date-time
          title: Created At
        committed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Committed At
        deleted_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Deleted At
        recovery_status:
          $ref: '#/components/schemas/TrainingCheckpointRecoveryStatus'
        recovery_expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Recovery Expires At
      type: object
      required:
        - id
        - format
        - status
        - epoch
        - global_step
        - segment
        - created_at
        - recovery_status
      title: TrainingCheckpointRead
    TrainingControlCommandRead:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        sequence:
          type: integer
          title: Sequence
        action:
          $ref: '#/components/schemas/TrainingControlAction'
        checkpoint_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Checkpoint Id
        status:
          $ref: '#/components/schemas/TrainingControlCommandStatus'
        idempotency_key:
          type: string
          format: uuid
          title: Idempotency Key
        requested_by_member_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Requested By Member Id
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
        runtime_overrides:
          additionalProperties: true
          type: object
          title: Runtime Overrides
        created_at:
          type: string
          format: date-time
          title: Created At
        applied_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Applied At
      type: object
      required:
        - id
        - sequence
        - action
        - status
        - idempotency_key
        - created_at
      title: TrainingControlCommandRead
    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
    TrainingCheckpointFormat:
      type: string
      enum:
        - pytorch-state.v1
      title: TrainingCheckpointFormat
    TrainingCheckpointStatus:
      type: string
      enum:
        - uploading
        - committed
        - deleting
        - deleted
      title: TrainingCheckpointStatus
    TrainingCheckpointRecoveryStatus:
      type: string
      enum:
        - not_eligible
        - available
        - claimed
        - consumed
        - expired
      title: TrainingCheckpointRecoveryStatus
    TrainingControlAction:
      type: string
      enum:
        - continue
        - pause
        - resume
        - rollback
        - warm_restart
        - finish_from_checkpoint
        - abort
      title: TrainingControlAction
    TrainingControlCommandStatus:
      type: string
      enum:
        - pending
        - applied
        - rejected
      title: TrainingControlCommandStatus
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````