Observation List

https://api.sigopt.com/v1/experiments/EXPERIMENT_ID/observations

Retrieves a Pagination of all Observation objects for this experiment. Observations are sorted in by IDs in descending order (so the newest observations are first).

Request Method: GET

Parameters

NameTypeRequired?Description
afterstringNOptional. Returns items with ids after after.
beforestringNOptional. Returns items with ids before before.
limitintNOptional. Limit the number of items returned. The maximum value is 100

Response

Pagination object.

Examples

Basic Observation List Request

observations = conn.experiments(EXPERIMENT_ID).observations().fetch()
Response
{
  "count": 3,
  "data": [
    {
      "assignments": {
        "degree": 2,
        "gamma": 3.6,
        "kernel": "rbf"
      },
      "created": 1560895639,
      "experiment": "1",
      "failed": false,
      "id": "1",
      "metadata": null,
      "object": "observation",
      "suggestion": "1",
      "value": 1,
      "value_stddev": null,
      "values": [
        {
          "name": "Accuracy",
          "object": "metric_evaluation",
          "value": 1,
          "value_stddev": null
        }
      ]
    },
    {
      "assignments": {
        "degree": 2,
        "gamma": 3.6,
        "kernel": "rbf"
      },
      "created": 1560895639,
      "experiment": "1",
      "failed": false,
      "id": "1",
      "metadata": {
        "estimated_training_time_s": 302
      },
      "object": "observation",
      "suggestion": "1",
      "value": 1,
      "value_stddev": 0.1,
      "values": [
        {
          "name": "Accuracy",
          "object": "metric_evaluation",
          "value": 1,
          "value_stddev": 0.1
        }
      ]
    },
    {
      "assignments": {
        "degree": 2,
        "gamma": 3.6,
        "kernel": "rbf"
      },
      "created": 1560895639,
      "experiment": "1",
      "failed": true,
      "id": "2",
      "metadata": null,
      "object": "observation",
      "suggestion": "2",
      "value": null,
      "value_stddev": null,
      "values": []
    }
  ],
  "object": "pagination",
  "paging": {
    "after": "2",
    "before": null
  }
}

Observation List Request with Limit

observations = conn.experiments(EXPERIMENT_ID).observations().fetch(
  limit=1
  )
Response
{
  "count": 3,
  "data": [
    {
      "assignments": {
        "degree": 2,
        "gamma": 3.6,
        "kernel": "rbf"
      },
      "created": 1560895639,
      "experiment": "1",
      "failed": false,
      "id": "1",
      "metadata": null,
      "object": "observation",
      "suggestion": "1",
      "value": 1,
      "value_stddev": null,
      "values": [
        {
          "name": "Accuracy",
          "object": "metric_evaluation",
          "value": 1,
          "value_stddev": null
        }
      ]
    }
  ],
  "object": "pagination",
  "paging": {
    "after": "1",
    "before": null
  }
}