---
title: "Retrieves EON tuner state for a run."
method: GET
path: "/api/{projectId}/optimize/{tunerCoordinatorJobId}/state"
tags: ["Optimization"]
---

# Retrieves EON tuner state for a run.

`GET /api/{projectId}/optimize/{tunerCoordinatorJobId}/state`

## Request

- Base URL: `https://studio.edgeimpulse.com/v1`
- URL: `https://studio.edgeimpulse.com/v1/api/{projectId}/optimize/{tunerCoordinatorJobId}/state`
- Auth: one of:
  - API key in header `x-api-key`
  - API key in cookie `jwt`
  - API key in header `x-jwt-token`
  - OAuth 2
    - Authorization code: `/v1/oauth/authorize`
    - Client credentials
    - Implicit: `/v1/oauth/authorize`
    - Password
    - Token URL: `/v1/oauth/token`
- TypeScript: <https://skmtc.dev/edgeimpulse/apis/edge-impulse-api/docs/api/:projectId/optimize/:tunerCoordinatorJobId/state/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieves the EON tuner state for a specific run.

## Path parameters

- `projectId` integer, required
- `tunerCoordinatorJobId` integer, required

## Response `200`

OK

- OptimizeStateResponse
  - `success` boolean, required: Whether the operation succeeded
  - `error` string: Optional error description (set if 'success' was false)
  - `config` OptimizeConfig, required
    - `name` string
    - `targetLatency` integer, required: Target latency in MS
    - `targetDevice` object, required: Target device
      - `name` string, required
      - `ram` integer
      - `rom` integer
    - `compiler` string[]
    - `precision` string[]
    - `trainingCycles` integer: Maximum number of training cycles
    - `tuningMaxTrials` integer: Maximum number of trials
    - `tuningWorkers` integer: Maximum number of parallel workers/jobs
    - `initialTrials` integer: Number of initial trials
    - `optimizationRounds` integer: Number of optimization rounds
    - `trialsPerOptimizationRound` integer: Number of trials per optimization round
    - `minMACCS` number
    - `maxMACCS` number
    - `tuningAlgorithm` 'random' | 'hyperband' | 'bayesian' | 'custom': Tuning algorithm to use to search hyperparameter space
    - `notificationOnCompletion` boolean
    - `importProjectMetrics` boolean: Whether to import metrics for previous EON tuner runs in the same project to accelerate the hyperparameter search process
    - `importResourceMetrics` boolean: Whether to import resource usage (RAM/ROM/latency) metrics to accelerate the hyperparameter search process
    - `numImportProjectMetrics` number: Number of project trials to import
    - `numImportResourceMetrics` number: Number of resource usage trials to import
    - `enableSEM` boolean: Enable standard error of the mean (SEM)
    - `accuracySEM` number: Standard error of the trial accuracy mean
    - `latencySEM` number: Standard error of the trial latency mean
    - `optimizationObjectives` object[]: Hyperparameter optimization objectives and corresponding weights
      - `objective` string, required: Objective to optimize
      - `label` string, required: Label of the objective
      - `weight` number, required: Weight of the objective
    - `rawObjectives` string: Hyperparameter optimization objectives + weights in string format
    - `optimizationPrecision` 'float32' | 'int8': Model variant to optimize for
    - `earlyStopping` boolean: Enable trial level early stopping based on loss metrics during training
    - `earlyStoppingWindowSize` number: Stops the EON tuner if the feasible (mean) objective has not improved over the past “window_size” iterations
    - `earlyStoppingImprovementBar` number: Threshold (in [0,1]) for considering relative improvement over the best point.
    - `MOMF` boolean: Enable Multi-fidelity Multi-Objective optimization
    - `verboseLogging` boolean: Enable verbose logging
    - `disableConstraints` boolean: Disable search constraints
    - `disableDeduplicate` boolean: Disable trial deduplication
    - `maxTotalTrainingTime` number: Maximum total training time in seconds
    - `tunerChildJobMemoryMiB` integer: Optional memory override for tuner child jobs (MiB), capped at 65536 MiB.
    - `tunerSpaceOptions` object
    - `space` TunerSpaceImpulse[]: List of impulses specifying the EON Tuner search space
      - `parameters` object: Hyperparameters with potential values that can be used in any block in this impulse
      - `inputBlocks` TunerSpaceInputBlock[], required: Input Blocks that are part of this impulse
      - `dspBlocks` TunerSpaceDSPBlock[], required: DSP Blocks that are part of this impulse
      - `learnBlocks` array[], required: Learning Blocks that are part of this impulse
        - TunerSpaceLearnBlock[]
    - `searchSpaceTemplate` object: Search space template
      - `identifier` 'speech_keyword' | 'speech_continuous' | 'audio_event' | 'audio_continuous' | 'visual' | 'motion_event' | 'motion_continuous' | 'audio_syntiant' | 'object_detection_bounding_boxes' | 'object_detection_centroids' | 'visual_ad' | 'object_detection_yolo_pro', required: Search space template identifier
      - `classification` boolean: Whether a classification block should be added to the search space
      - `anomaly` boolean: Whether an anomaly block should be added to the search space
      - `regression` boolean: Whether a regression block should be added to the search space
    - `searchSpaceSource` object: Search space source
      - `type` 'template' | 'run' | 'impulse' | 'custom', required: Search space source type
      - `templateTitle` string: Search space source template title
      - `runTitle` string: Search space source run title
      - `impulseTitle` string: Search space source impulse title
  - `status` object, required
    - `numPendingTrials` integer, required
    - `numRunningTrials` integer, required
    - `numCompletedTrials` integer, required
    - `numFailedTrials` integer, required
    - `numReadyWorkers` integer, required
    - `numBusyWorkers` integer, required
    - `numPendingWorkers` integer, required
    - `status` 'creating' | 'ready' | 'running' | 'completed', required
  - `tunerJobId` integer: Actual tuner process, job message events will be tagged with this ID
  - `tunerCoordinatorJobId` integer: The coordinator pod, attach the job runner to this process for finished events
  - `continuationJobId` integer: Job ID for the initial job this job continuous the hyperparameter search process for.
  - `tuningAlgorithm` 'random' | 'hyperband' | 'bayesian' | 'custom': Tuning algorithm to use to search hyperparameter space
  - `tunerJobIsRunning` boolean, required: Whether the job is active (if false => finished)
  - `trials` TunerTrial[], required
    - `id` string, required
    - `name` string, required
    - `status` 'pending' | 'running' | 'completed' | 'failed', required
    - `lastCompletedEpoch` string, date-time
    - `lastCompletedTraining` string, date-time
    - `retries` integer
    - `currentEpoch` integer
    - `workerId` string
    - `blocks` object[], required
      - `id` integer, required
      - `lastActive` string, date-time
      - `retries` integer, required
      - `status` 'pending' | 'running' | 'completed' | 'failed', required
      - `type` 'input' | 'dsp' | 'learn', required
      - `modelBlockIndex` integer: Index of corresponding DSP/learn block in the impulse model passed to createTrial()
    - `impulse` TunerTrialImpulse, required
      - `inputBlocks` TunerCreateTrialInputBlock[]
      - `dspBlocks` TunerCreateTrialDSPBlock[]
      - `learnBlocks` TunerCreateTrialLearnBlock[]
    - `experiment` string
    - `original_trial_id` string
    - `model` object
    - `dspJobId` object
      - `training` number
      - `testing` number
    - `learnJobId` number
    - `devicePerformance` object
    - `optimizationRound` number
    - `progress` object
      - `epoch` number, required
      - `loss` number, required
      - `val_loss` number, required
      - `accuracy` number, required
      - `val_accuracy` number, required
    - `metrics` object
      - `test` object
        - `float32` KerasModelMetadataMetrics
          - `type` 'int8' | 'float32' | 'akida' | 'requiresRetrain', required
          - `loss` number, required: The model's loss on the validation set after training
          - `accuracy` number: The model's accuracy on the validation set after training
          - `confusionMatrix` array[], required
            - number[]
          - `report` object, required: Precision, recall, F1 and support scores
          - `onDevicePerformance` object[], required
            - `mcu` string, required
            - `name` string, required
            - `isDefault` boolean, required
            - `latency` number, required
            - `tflite` object, required
              - …
            - `eon` object, required
              - …
            - `eon_ram_optimized` object
              - …
            - `customMetrics` KerasCustomMetric[]: Custom, device-specific performance metrics
              - …
            - `hasPerformance` boolean, required: If false, then no metrics are available for this target
            - `profilingError` string: Specific error during profiling (e.g. model not supported)
          - `predictions` ModelPrediction[]
            - `sampleId` integer, required
            - `startMs` number, required
            - `endMs` number, required
            - `label` string
            - `prediction` string, required
            - `predictionCorrect` boolean
            - `expectedAnomalyOutcome` string: Only set for anomaly detection projects. The expected anomaly outcome for this window — either “anomaly” or “no anomaly”. The outcome is determined by which labels are marked as anomalous in the project setup, or by the sample label if no such configuration is defined.
            - `f1Score` number: Only set for object detection projects
            - `anomalyScores` array[]: Only set for visual anomaly projects. 2D array of shape (n, n) with raw anomaly scores, where n varies based on the image input size and the specific visual anomaly algorithm used. The scores corresponds to each grid cell in the image's spatial matrix.
              - …
            - `boundingBoxes` BoundingBoxWithScore[]: Only set for object detection projects. Coordinates are scaled 0..1, not absolute values.
              - …
            - `labelMapPredictions` object: For samples with structured labels (in the form of a key/value label map), this object will contain per-key prediction info for the sample.
          - `visualization` 'featureExplorer' | 'dataExplorer' | 'none', required
          - `isSupportedOnMcu` boolean, required
          - `mcuSupportError` string
          - `profilingJobId` integer: If this is set, then we're still profiling this model. Subscribe to job updates to see when it's done (afterward the metadata will be updated).
          - `profilingJobFailed` boolean: If this is set, then the profiling job failed (get the status by getting the job logs for 'profilingJobId').
          - `additionalMetrics` AdditionalMetric[], required
            - `name` string, required
            - `value` string, required
            - `fullPrecisionValue` number, required
            - `tooltipText` string
            - `link` string
        - `int8` KerasModelMetadataMetrics
          - `type` 'int8' | 'float32' | 'akida' | 'requiresRetrain', required
          - `loss` number, required: The model's loss on the validation set after training
          - `accuracy` number: The model's accuracy on the validation set after training
          - `confusionMatrix` array[], required
            - number[]
          - `report` object, required: Precision, recall, F1 and support scores
          - `onDevicePerformance` object[], required
            - `mcu` string, required
            - `name` string, required
            - `isDefault` boolean, required
            - `latency` number, required
            - `tflite` object, required
              - …
            - `eon` object, required
              - …
            - `eon_ram_optimized` object
              - …
            - `customMetrics` KerasCustomMetric[]: Custom, device-specific performance metrics
              - …
            - `hasPerformance` boolean, required: If false, then no metrics are available for this target
            - `profilingError` string: Specific error during profiling (e.g. model not supported)
          - `predictions` ModelPrediction[]
            - `sampleId` integer, required
            - `startMs` number, required
            - `endMs` number, required
            - `label` string
            - `prediction` string, required
            - `predictionCorrect` boolean
            - `expectedAnomalyOutcome` string: Only set for anomaly detection projects. The expected anomaly outcome for this window — either “anomaly” or “no anomaly”. The outcome is determined by which labels are marked as anomalous in the project setup, or by the sample label if no such configuration is defined.
            - `f1Score` number: Only set for object detection projects
            - `anomalyScores` array[]: Only set for visual anomaly projects. 2D array of shape (n, n) with raw anomaly scores, where n varies based on the image input size and the specific visual anomaly algorithm used. The scores corresponds to each grid cell in the image's spatial matrix.
              - …
            - `boundingBoxes` BoundingBoxWithScore[]: Only set for object detection projects. Coordinates are scaled 0..1, not absolute values.
              - …
            - `labelMapPredictions` object: For samples with structured labels (in the form of a key/value label map), this object will contain per-key prediction info for the sample.
          - `visualization` 'featureExplorer' | 'dataExplorer' | 'none', required
          - `isSupportedOnMcu` boolean, required
          - `mcuSupportError` string
          - `profilingJobId` integer: If this is set, then we're still profiling this model. Subscribe to job updates to see when it's done (afterward the metadata will be updated).
          - `profilingJobFailed` boolean: If this is set, then the profiling job failed (get the status by getting the job logs for 'profilingJobId').
          - `additionalMetrics` AdditionalMetric[], required
            - `name` string, required
            - `value` string, required
            - `fullPrecisionValue` number, required
            - `tooltipText` string
            - `link` string
      - `train` object
        - `float32` KerasModelMetadataMetrics
          - `type` 'int8' | 'float32' | 'akida' | 'requiresRetrain', required
          - `loss` number, required: The model's loss on the validation set after training
          - `accuracy` number: The model's accuracy on the validation set after training
          - `confusionMatrix` array[], required
            - number[]
          - `report` object, required: Precision, recall, F1 and support scores
          - `onDevicePerformance` object[], required
            - `mcu` string, required
            - `name` string, required
            - `isDefault` boolean, required
            - `latency` number, required
            - `tflite` object, required
              - …
            - `eon` object, required
              - …
            - `eon_ram_optimized` object
              - …
            - `customMetrics` KerasCustomMetric[]: Custom, device-specific performance metrics
              - …
            - `hasPerformance` boolean, required: If false, then no metrics are available for this target
            - `profilingError` string: Specific error during profiling (e.g. model not supported)
          - `predictions` ModelPrediction[]
            - `sampleId` integer, required
            - `startMs` number, required
            - `endMs` number, required
            - `label` string
            - `prediction` string, required
            - `predictionCorrect` boolean
            - `expectedAnomalyOutcome` string: Only set for anomaly detection projects. The expected anomaly outcome for this window — either “anomaly” or “no anomaly”. The outcome is determined by which labels are marked as anomalous in the project setup, or by the sample label if no such configuration is defined.
            - `f1Score` number: Only set for object detection projects
            - `anomalyScores` array[]: Only set for visual anomaly projects. 2D array of shape (n, n) with raw anomaly scores, where n varies based on the image input size and the specific visual anomaly algorithm used. The scores corresponds to each grid cell in the image's spatial matrix.
              - …
            - `boundingBoxes` BoundingBoxWithScore[]: Only set for object detection projects. Coordinates are scaled 0..1, not absolute values.
              - …
            - `labelMapPredictions` object: For samples with structured labels (in the form of a key/value label map), this object will contain per-key prediction info for the sample.
          - `visualization` 'featureExplorer' | 'dataExplorer' | 'none', required
          - `isSupportedOnMcu` boolean, required
          - `mcuSupportError` string
          - `profilingJobId` integer: If this is set, then we're still profiling this model. Subscribe to job updates to see when it's done (afterward the metadata will be updated).
          - `profilingJobFailed` boolean: If this is set, then the profiling job failed (get the status by getting the job logs for 'profilingJobId').
          - `additionalMetrics` AdditionalMetric[], required
            - `name` string, required
            - `value` string, required
            - `fullPrecisionValue` number, required
            - `tooltipText` string
            - `link` string
        - `int8` KerasModelMetadataMetrics
          - `type` 'int8' | 'float32' | 'akida' | 'requiresRetrain', required
          - `loss` number, required: The model's loss on the validation set after training
          - `accuracy` number: The model's accuracy on the validation set after training
          - `confusionMatrix` array[], required
            - number[]
          - `report` object, required: Precision, recall, F1 and support scores
          - `onDevicePerformance` object[], required
            - `mcu` string, required
            - `name` string, required
            - `isDefault` boolean, required
            - `latency` number, required
            - `tflite` object, required
              - …
            - `eon` object, required
              - …
            - `eon_ram_optimized` object
              - …
            - `customMetrics` KerasCustomMetric[]: Custom, device-specific performance metrics
              - …
            - `hasPerformance` boolean, required: If false, then no metrics are available for this target
            - `profilingError` string: Specific error during profiling (e.g. model not supported)
          - `predictions` ModelPrediction[]
            - `sampleId` integer, required
            - `startMs` number, required
            - `endMs` number, required
            - `label` string
            - `prediction` string, required
            - `predictionCorrect` boolean
            - `expectedAnomalyOutcome` string: Only set for anomaly detection projects. The expected anomaly outcome for this window — either “anomaly” or “no anomaly”. The outcome is determined by which labels are marked as anomalous in the project setup, or by the sample label if no such configuration is defined.
            - `f1Score` number: Only set for object detection projects
            - `anomalyScores` array[]: Only set for visual anomaly projects. 2D array of shape (n, n) with raw anomaly scores, where n varies based on the image input size and the specific visual anomaly algorithm used. The scores corresponds to each grid cell in the image's spatial matrix.
              - …
            - `boundingBoxes` BoundingBoxWithScore[]: Only set for object detection projects. Coordinates are scaled 0..1, not absolute values.
              - …
            - `labelMapPredictions` object: For samples with structured labels (in the form of a key/value label map), this object will contain per-key prediction info for the sample.
          - `visualization` 'featureExplorer' | 'dataExplorer' | 'none', required
          - `isSupportedOnMcu` boolean, required
          - `mcuSupportError` string
          - `profilingJobId` integer: If this is set, then we're still profiling this model. Subscribe to job updates to see when it's done (afterward the metadata will be updated).
          - `profilingJobFailed` boolean: If this is set, then the profiling job failed (get the status by getting the job logs for 'profilingJobId').
          - `additionalMetrics` AdditionalMetric[], required
            - `name` string, required
            - `value` string, required
            - `fullPrecisionValue` number, required
            - `tooltipText` string
            - `link` string
      - `validation` object
        - `float32` KerasModelMetadataMetrics
          - `type` 'int8' | 'float32' | 'akida' | 'requiresRetrain', required
          - `loss` number, required: The model's loss on the validation set after training
          - `accuracy` number: The model's accuracy on the validation set after training
          - `confusionMatrix` array[], required
            - number[]
          - `report` object, required: Precision, recall, F1 and support scores
          - `onDevicePerformance` object[], required
            - `mcu` string, required
            - `name` string, required
            - `isDefault` boolean, required
            - `latency` number, required
            - `tflite` object, required
              - …
            - `eon` object, required
              - …
            - `eon_ram_optimized` object
              - …
            - `customMetrics` KerasCustomMetric[]: Custom, device-specific performance metrics
              - …
            - `hasPerformance` boolean, required: If false, then no metrics are available for this target
            - `profilingError` string: Specific error during profiling (e.g. model not supported)
          - `predictions` ModelPrediction[]
            - `sampleId` integer, required
            - `startMs` number, required
            - `endMs` number, required
            - `label` string
            - `prediction` string, required
            - `predictionCorrect` boolean
            - `expectedAnomalyOutcome` string: Only set for anomaly detection projects. The expected anomaly outcome for this window — either “anomaly” or “no anomaly”. The outcome is determined by which labels are marked as anomalous in the project setup, or by the sample label if no such configuration is defined.
            - `f1Score` number: Only set for object detection projects
            - `anomalyScores` array[]: Only set for visual anomaly projects. 2D array of shape (n, n) with raw anomaly scores, where n varies based on the image input size and the specific visual anomaly algorithm used. The scores corresponds to each grid cell in the image's spatial matrix.
              - …
            - `boundingBoxes` BoundingBoxWithScore[]: Only set for object detection projects. Coordinates are scaled 0..1, not absolute values.
              - …
            - `labelMapPredictions` object: For samples with structured labels (in the form of a key/value label map), this object will contain per-key prediction info for the sample.
          - `visualization` 'featureExplorer' | 'dataExplorer' | 'none', required
          - `isSupportedOnMcu` boolean, required
          - `mcuSupportError` string
          - `profilingJobId` integer: If this is set, then we're still profiling this model. Subscribe to job updates to see when it's done (afterward the metadata will be updated).
          - `profilingJobFailed` boolean: If this is set, then the profiling job failed (get the status by getting the job logs for 'profilingJobId').
          - `additionalMetrics` AdditionalMetric[], required
            - `name` string, required
            - `value` string, required
            - `fullPrecisionValue` number, required
            - `tooltipText` string
            - `link` string
        - `int8` KerasModelMetadataMetrics
          - `type` 'int8' | 'float32' | 'akida' | 'requiresRetrain', required
          - `loss` number, required: The model's loss on the validation set after training
          - `accuracy` number: The model's accuracy on the validation set after training
          - `confusionMatrix` array[], required
            - number[]
          - `report` object, required: Precision, recall, F1 and support scores
          - `onDevicePerformance` object[], required
            - `mcu` string, required
            - `name` string, required
            - `isDefault` boolean, required
            - `latency` number, required
            - `tflite` object, required
              - …
            - `eon` object, required
              - …
            - `eon_ram_optimized` object
              - …
            - `customMetrics` KerasCustomMetric[]: Custom, device-specific performance metrics
              - …
            - `hasPerformance` boolean, required: If false, then no metrics are available for this target
            - `profilingError` string: Specific error during profiling (e.g. model not supported)
          - `predictions` ModelPrediction[]
            - `sampleId` integer, required
            - `startMs` number, required
            - `endMs` number, required
            - `label` string
            - `prediction` string, required
            - `predictionCorrect` boolean
            - `expectedAnomalyOutcome` string: Only set for anomaly detection projects. The expected anomaly outcome for this window — either “anomaly” or “no anomaly”. The outcome is determined by which labels are marked as anomalous in the project setup, or by the sample label if no such configuration is defined.
            - `f1Score` number: Only set for object detection projects
            - `anomalyScores` array[]: Only set for visual anomaly projects. 2D array of shape (n, n) with raw anomaly scores, where n varies based on the image input size and the specific visual anomaly algorithm used. The scores corresponds to each grid cell in the image's spatial matrix.
              - …
            - `boundingBoxes` BoundingBoxWithScore[]: Only set for object detection projects. Coordinates are scaled 0..1, not absolute values.
              - …
            - `labelMapPredictions` object: For samples with structured labels (in the form of a key/value label map), this object will contain per-key prediction info for the sample.
          - `visualization` 'featureExplorer' | 'dataExplorer' | 'none', required
          - `isSupportedOnMcu` boolean, required
          - `mcuSupportError` string
          - `profilingJobId` integer: If this is set, then we're still profiling this model. Subscribe to job updates to see when it's done (afterward the metadata will be updated).
          - `profilingJobFailed` boolean: If this is set, then the profiling job failed (get the status by getting the job logs for 'profilingJobId').
          - `additionalMetrics` AdditionalMetric[], required
            - `name` string, required
            - `value` string, required
            - `fullPrecisionValue` number, required
            - `tooltipText` string
            - `link` string
    - `impulseAddedToProject` object
      - `impulseId` integer, required
      - `link` string, required
    - `createdInPostProcessing` boolean
  - `projectDataType` 'audio' | 'image' | 'motion' | 'other', required
  - `jobError` string
  - `workers` object[], required
    - `workerId` string, required
    - `status` 'pending' | 'ready' | 'busy', required
  - `nextRunIndex` integer, required: Index of the next run to be created. Used to pre-populate the name of the next run.
  - `canExtendSearch` boolean, required: Whether the search can be extended to evaluate more candidate models. Extending is possible if the search space contains candidate models that are expected to perform better than the current best candidate. And extending is also possible if the previous run was paused due to the total runtime limit being exceeded.
  - `isWhitelabel` boolean, required
  - `totalTrainingTimeExceeded` boolean, required: Whether the total training time has exceeded the defined limit for the current run.

---

[API](https://skmtc.dev/edgeimpulse/apis/edge-impulse-api.md) - [All operations](https://skmtc.dev/edgeimpulse/apis/edge-impulse-api/llms.txt) - [OpenAPI document](https://skmtc.dev/edgeimpulse/apis/edge-impulse-api/revisions/e2a976d38427?raw)
